fix(discount-amount): Print hide discount_amount if print without amount (#15704)
This commit is contained in:
parent
4bb90add1d
commit
ff0deedca9
@ -255,13 +255,13 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
|
||||
var dn_item_fields = frappe.meta.docfield_map['Delivery Note Item'];
|
||||
var dn_fields_copy = dn_fields;
|
||||
var dn_item_fields_copy = dn_item_fields;
|
||||
|
||||
if (doc.print_without_amount) {
|
||||
dn_fields['currency'].print_hide = 1;
|
||||
dn_item_fields['rate'].print_hide = 1;
|
||||
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)
|
||||
@ -270,6 +270,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;
|
||||
}
|
||||
|
@ -75,7 +75,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