fix(discount-amount): Print hide discount_amount if print without amount (#15705)
This commit is contained in:
parent
22731e39ba
commit
e45868a3c6
@ -279,6 +279,7 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
|
||||
dn_item_fields['discount_percentage'].print_hide = 1;
|
||||
dn_item_fields['price_list_rate'].print_hide = 1;
|
||||
dn_item_fields['amount'].print_hide = 1;
|
||||
dn_item_fields['discount_amount'].print_hide = 1;
|
||||
dn_fields['taxes'].print_hide = 1;
|
||||
} else {
|
||||
if (dn_fields_copy['currency'].print_hide != 1)
|
||||
@ -287,6 +288,8 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
|
||||
dn_item_fields['rate'].print_hide = 0;
|
||||
if (dn_item_fields_copy['amount'].print_hide != 1)
|
||||
dn_item_fields['amount'].print_hide = 0;
|
||||
if (dn_item_fields_copy['discount_amount'].print_hide != 1)
|
||||
dn_item_fields['discount_amount'].print_hide = 0
|
||||
if (dn_fields_copy['taxes'].print_hide != 1)
|
||||
dn_fields['taxes'].print_hide = 0;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class DeliveryNote(SellingController):
|
||||
item_meta = frappe.get_meta("Delivery Note Item")
|
||||
print_hide_fields = {
|
||||
"parent": ["grand_total", "rounded_total", "in_words", "currency", "total", "taxes"],
|
||||
"items": ["rate", "amount", "price_list_rate", "discount_percentage"]
|
||||
"items": ["rate", "amount", "discount_amount", "price_list_rate", "discount_percentage"]
|
||||
}
|
||||
|
||||
for key, fieldname in print_hide_fields.items():
|
||||
|
Loading…
x
Reference in New Issue
Block a user