From 2e8a94458d3789d87c47d177695753adaab65495 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 1 Dec 2016 16:00:10 +0530 Subject: [PATCH] allow user to edit serial no for credit note, debit note --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index ccdd87ff1d..4ac81b1893 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -198,7 +198,7 @@ function hide_fields(doc) { item_fields_stock = ['warehouse_section', 'received_qty', 'rejected_qty']; cur_frm.fields_dict['items'].grid.set_column_disp(item_fields_stock, - (cint(doc.update_stock)==1 ? true : false)); + (cint(doc.update_stock)==1 || cint(doc.is_return)==1 ? true : false)); cur_frm.refresh_fields(); } diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 5609fcecac..57e0faa8ed 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -307,7 +307,7 @@ cur_frm.cscript.hide_fields = function(doc) { item_fields_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse', 'expense_account', 'warehouse'] cur_frm.fields_dict['items'].grid.set_column_disp(item_fields_stock, - (cint(doc.update_stock)==1 ? true : false)); + (cint(doc.update_stock)==1 || cint(doc.is_return)==1 ? true : false)); // India related fields if (frappe.boot.sysdefaults.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']);