Skip to content

Commit

Permalink
fix: update total tax amount when adding items in POS
Browse files Browse the repository at this point in the history
  • Loading branch information
AbleKSaju committed Jan 10, 2025
1 parent 0d4d917 commit 55e6b53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions models/baseModels/InvoiceItem/InvoiceItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export abstract class InvoiceItem extends Doc {
'party',
'exchangeRate',
'item',
'quantity',
'itemTaxedTotal',
'itemDiscountedTotal',
'setItemDiscountAmount',
Expand Down
4 changes: 2 additions & 2 deletions src/pages/POS/KeyboardModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ export default defineComponent({
);
}
this.selectedItemRow.set('setItemDiscountAmount', true);
this.selectedItemRow.set(
await this.selectedItemRow.set('setItemDiscountAmount', true);
await this.selectedItemRow.set(
'itemDiscountAmount',
this.fyo.pesa(Number(this.selectedValue))
);
Expand Down
3 changes: 2 additions & 1 deletion src/pages/POS/POS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,10 @@ export default defineComponent({
existingItems[0].rate = item.rate as Money;
}
existingItems[0].quantity = quantity
const newQynatity = quantity
? (existingItems[0].quantity as number) + quantity
: (existingItems[0].quantity as number) + 1;
await existingItems[0].set('quantity', newQynatity);
await this.applyPricingRule();
await this.sinvDoc.runFormulas();
Expand Down

0 comments on commit 55e6b53

Please sign in to comment.