[hotfix] don't override default print format if specified in POS Sales Invoice
This commit is contained in:
parent
11586eda4c
commit
07d3261467
@ -34,8 +34,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
}
|
||||
}
|
||||
|
||||
// if document is POS then change default print format to "POS Invoice"
|
||||
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1) {
|
||||
// if document is POS then change default print format to "POS Invoice" if no default is specified
|
||||
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1 && cint(frappe.defaults.get_user_defaults("fs_pos_view"))===1
|
||||
&& !locals.DocType[cur_frm.doctype].default_print_format) {
|
||||
locals.DocType[cur_frm.doctype].default_print_format = "POS Invoice";
|
||||
cur_frm.setup_print_layout();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user