[hotfix] don't override default print format if specified in POS Sales Invoice

This commit is contained in:
Anand Doshi 2014-07-28 19:55:13 +05:30
parent 11586eda4c
commit 07d3261467

View File

@ -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();
}