From bc0ef0becac2b80c7e70dde61292b5555080f9eb Mon Sep 17 00:00:00 2001 From: RicardoJohann Date: Mon, 10 Dec 2018 10:13:03 -0200 Subject: [PATCH] Add Serial Number button in Delivery Note and Sales Invoice's Packing List (#16080) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 4 ++++ erpnext/selling/doctype/quotation/quotation.js | 2 +- erpnext/stock/doctype/delivery_note/delivery_note.js | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index c26f527eaa..91a44b377d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -313,6 +313,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte erpnext.setup_serial_no(); }, + packed_items_on_form_rendered: function(doc, grid_row) { + erpnext.setup_serial_no(); + }, + make_sales_return: function() { frappe.model.open_mapped_doc({ method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return", diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index c708de037f..6f7bfb3feb 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -206,7 +206,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){ } -frappe.ui.form.on("Quotation Item", "items_on_form_rendered", function(frm, cdt, cdn) { +frappe.ui.form.on("Quotation Item", "items_on_form_rendered", "packed_items_on_form_rendered", function(frm, cdt, cdn) { // enable tax_amount field if Actual }) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index 9a154846e5..f8a34972b7 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -223,6 +223,10 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( erpnext.setup_serial_no(); }, + packed_items_on_form_rendered: function(doc, grid_row) { + erpnext.setup_serial_no(); + }, + close_delivery_note: function(doc){ this.update_status("Closed") },