Allow print before pay in POS (#11590)
This commit is contained in:
parent
eb3982044b
commit
135a54ca93
@ -286,6 +286,36 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "allow_print_before_pay",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Allow Print Before Pay",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
|||||||
@ -1505,11 +1505,15 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
me.make_menu_list()
|
me.make_menu_list()
|
||||||
}, "fa fa-plus")
|
}, "fa fa-plus")
|
||||||
|
|
||||||
if (this.frm.doc.docstatus == 1) {
|
if (this.frm.doc.docstatus == 1 || this.pos_profile_data["allow_print_before_pay"]) {
|
||||||
this.page.set_secondary_action(__("Print"), function () {
|
this.page.set_secondary_action(__("Print"), function () {
|
||||||
|
me.create_invoice();
|
||||||
var html = frappe.render(me.print_template_data, me.frm.doc)
|
var html = frappe.render(me.print_template_data, me.frm.doc)
|
||||||
me.print_document(html)
|
me.print_document(html)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.frm.doc.docstatus == 1) {
|
||||||
this.page.add_menu_item(__("Email"), function () {
|
this.page.add_menu_item(__("Email"), function () {
|
||||||
me.email_prompt()
|
me.email_prompt()
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user