fix: add new delivery note button in Sales Order (#20199)

* fix: add new delivery note button in Sales Order

* fix: removed debugger

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Pranav Nachnekar 2020-01-07 05:59:35 +00:00 committed by Nabin Hait
parent 7c8aaba449
commit 971458043d

View File

@ -6,7 +6,7 @@
frappe.ui.form.on("Sales Order", {
setup: function(frm) {
frm.custom_make_buttons = {
'Delivery Note': 'Delivery',
'Delivery Note': 'Delivery Note',
'Pick List': 'Pick List',
'Sales Invoice': 'Invoice',
'Material Request': 'Material Request',
@ -135,7 +135,6 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
}
if(doc.status !== 'Closed') {
if(doc.status !== 'On Hold') {
allow_delivery = this.frm.doc.items.some(item => item.delivered_by_supplier === 0 && item.qty > flt(item.delivered_qty))
&& !this.frm.doc.skip_delivery_note
@ -697,4 +696,4 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
});
}
});
$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));