diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9ea5a51e3f5..703df796c06 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -355,7 +355,8 @@ class SalesInvoice(SellingController): "print_format": print_format, "allow_edit_rate": pos.get("allow_user_to_edit_rate"), "allow_edit_discount": pos.get("allow_user_to_edit_discount"), - "campaign": pos.get("campaign") + "campaign": pos.get("campaign"), + "allow_print_before_pay": pos.get("allow_print_before_pay") } def update_time_sheet(self, sales_invoice): diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 1944c2d3132..df487833a8c 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -631,6 +631,7 @@ erpnext.pos.PointOfSale = class PointOfSale { this.frm.allow_edit_rate = r.message.allow_edit_rate; this.frm.allow_edit_discount = r.message.allow_edit_discount; this.frm.doc.campaign = r.message.campaign; + this.frm.allow_print_before_pay = r.message.allow_print_before_pay; } } @@ -672,7 +673,7 @@ erpnext.pos.PointOfSale = class PointOfSale { } set_form_action() { - if(this.frm.doc.docstatus == 1 || (this.frm.doc.allow_print_before_pay == 1&&this.frm.doc.items.length>0)){ + if(this.frm.doc.docstatus == 1 || (this.frm.allow_print_before_pay == 1 && this.frm.doc.items.length > 0)){ this.page.set_secondary_action(__("Print"), async() => { if(this.frm.doc.docstatus != 1 ){ await this.frm.save();