[Fix] Allow Print Before Pay in POS (#20151)
Print Button does not show even when Print Before Pay is enabled in the POS Profile.
This commit is contained in:
parent
71649fe141
commit
5cc7648e9c
@ -355,7 +355,8 @@ class SalesInvoice(SellingController):
|
|||||||
"print_format": print_format,
|
"print_format": print_format,
|
||||||
"allow_edit_rate": pos.get("allow_user_to_edit_rate"),
|
"allow_edit_rate": pos.get("allow_user_to_edit_rate"),
|
||||||
"allow_edit_discount": pos.get("allow_user_to_edit_discount"),
|
"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):
|
def update_time_sheet(self, sales_invoice):
|
||||||
|
@ -631,6 +631,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
this.frm.allow_edit_rate = r.message.allow_edit_rate;
|
this.frm.allow_edit_rate = r.message.allow_edit_rate;
|
||||||
this.frm.allow_edit_discount = r.message.allow_edit_discount;
|
this.frm.allow_edit_discount = r.message.allow_edit_discount;
|
||||||
this.frm.doc.campaign = r.message.campaign;
|
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() {
|
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() => {
|
this.page.set_secondary_action(__("Print"), async() => {
|
||||||
if(this.frm.doc.docstatus != 1 ){
|
if(this.frm.doc.docstatus != 1 ){
|
||||||
await this.frm.save();
|
await this.frm.save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user