bug fix in presell invoice in find sell price

This commit is contained in:
Hesabix 2025-07-24 21:45:19 +00:00
parent bad8dc0f73
commit bf6ca0f8b6

View file

@ -52,7 +52,7 @@
<tr :style="{ backgroundColor: index % 2 === 0 ? '#f8f9fa' : 'white', height: '64px' }">
<td class="text-center" style="min-width: 200px;">
<Hcommoditysearch v-model="item.name" density="compact" hide-details class="my-0"
style="font-size: 0.8rem;" return-object></Hcommoditysearch>
style="font-size: 0.8rem;" return-object @update:modelValue="onCommoditySelect(item)"></Hcommoditysearch>
</td>
<td class="text-center" style="width: 100px;">
<Hnumberinput v-model="item.count" density="compact" @update:modelValue="recalculateTotals"
@ -156,7 +156,7 @@
</div>
<div class="mb-2">
<Hcommoditysearch v-model="item.name" density="compact" label="نام کالا" hide-details class="my-0"
style="font-size: 0.8rem;" return-object></Hcommoditysearch>
style="font-size: 0.8rem;" return-object @update:modelValue="onCommoditySelect(item)"></Hcommoditysearch>
</div>
<div class="d-flex justify-space-between mb-2">
<div style="width: 48%;">
@ -676,6 +676,12 @@ export default {
item.discountPercent = 0;
}
this.recalculateTotals();
},
onCommoditySelect(item) {
if (item.name && item.name.priceSell) {
item.price = item.name.priceSell;
this.recalculateTotals();
}
}
}
}