mirror of
https://github.com/frappe/books.git
synced 2025-04-07 02:31:50 +00:00
Merge pull request #1085 from AbleKSaju/fix-discount-amount
fix: calculation of tax amount
This commit is contained in:
commit
8a7559bc4e
@ -173,6 +173,7 @@ export abstract class InvoiceItem extends Doc {
|
|||||||
'party',
|
'party',
|
||||||
'exchangeRate',
|
'exchangeRate',
|
||||||
'item',
|
'item',
|
||||||
|
'quantity',
|
||||||
'itemTaxedTotal',
|
'itemTaxedTotal',
|
||||||
'itemDiscountedTotal',
|
'itemDiscountedTotal',
|
||||||
'setItemDiscountAmount',
|
'setItemDiscountAmount',
|
||||||
|
@ -433,9 +433,10 @@ export default defineComponent({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectedItemRow.setItemDiscountAmount = true;
|
await this.selectedItemRow.set('setItemDiscountAmount', true);
|
||||||
this.selectedItemRow.itemDiscountAmount = this.fyo.pesa(
|
await this.selectedItemRow.set(
|
||||||
Number(this.selectedValue)
|
'itemDiscountAmount',
|
||||||
|
this.fyo.pesa(Number(this.selectedValue))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -541,9 +541,12 @@ export default defineComponent({
|
|||||||
existingItems[0].rate = item.rate as Money;
|
existingItems[0].rate = item.rate as Money;
|
||||||
}
|
}
|
||||||
|
|
||||||
existingItems[0].quantity = quantity
|
await existingItems[0].set(
|
||||||
? (existingItems[0].quantity as number) + quantity
|
'quantity',
|
||||||
: (existingItems[0].quantity as number) + 1;
|
quantity
|
||||||
|
? (existingItems[0].quantity as number) + quantity
|
||||||
|
: (existingItems[0].quantity as number) + 1
|
||||||
|
);
|
||||||
|
|
||||||
await this.applyPricingRule();
|
await this.applyPricingRule();
|
||||||
await this.sinvDoc.runFormulas();
|
await this.sinvDoc.runFormulas();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user