2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

if item has discount use it as amount

its help wen add item first time and discount is zero
This commit is contained in:
Abdallah A. Zaqout 2023-06-10 11:46:17 -07:00 committed by Alan
parent bef87b0afa
commit 494e25e3d6

View File

@ -256,7 +256,7 @@ export abstract class Invoice extends Transactional {
};
let amount = item.amount!;
if (this.enableDiscounting && !this.discountAfterTax) {
if (this.enableDiscounting && !this.discountAfterTax && !item.itemDiscountedTotal?.isZero()) {
amount = item.itemDiscountedTotal!;
}