From 67ff306fe7e2e4cef09bccd8be1722428921927d Mon Sep 17 00:00:00 2001 From: ajmalroshan123 Date: Mon, 11 Nov 2024 09:54:53 +0530 Subject: [PATCH] fix: updated the logic to set default value --- aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js index c937558..16cb1b8 100644 --- a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js +++ b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js @@ -880,7 +880,7 @@ function calculate_discounted_stone_charge_and_print(frm) { total_stone_charge += stone_charge ; }); } - let discount = total_stone_charge - frm.doc.custom_discount_final; + let discount = total_stone_charge - frm.doc.custom_discount_final || 0; frm.set_value("discount_amount", discount); }