mirror of
https://github.com/frappe/books.git
synced 2025-01-03 15:17:30 +00:00
fix: show item discount amount & percent
This commit is contained in:
parent
b072253755
commit
c483c4bf73
@ -323,7 +323,15 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
for (const item of this.sinvDoc.items) {
|
||||
itemDiscounts.add(item.itemDiscountedTotal as Money);
|
||||
if (item.setItemDiscountAmount) {
|
||||
itemDiscounts = itemDiscounts.add(item.itemDiscountAmount as Money);
|
||||
}
|
||||
|
||||
if (item.amount && (item.itemDiscountPercent as number) > 1) {
|
||||
itemDiscounts = itemDiscounts.add(
|
||||
item.amount.percent(item.itemDiscountPercent as number)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this.itemDiscounts = itemDiscounts;
|
||||
|
Loading…
Reference in New Issue
Block a user