mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
[hotfix] don't override default print format if specified in POS Sales Invoice
This commit is contained in:
@@ -34,8 +34,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if document is POS then change default print format to "POS Invoice"
|
// 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) {
|
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";
|
locals.DocType[cur_frm.doctype].default_print_format = "POS Invoice";
|
||||||
cur_frm.setup_print_layout();
|
cur_frm.setup_print_layout();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user