diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 799730edd5..4e08287004 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -781,7 +781,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ if(k=="price_list_rate") { if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true; } - frappe.model.set_value(d.doctype, d.name, k, v); + if(v) { + frappe.model.set_value(d.doctype, d.name, k, v); + } } } diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 74e9fb655c..bf6941b347 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -47,6 +47,7 @@ $.extend(erpnext, { fields: [ { "fieldtype": "Link", + "fieldname": "serial_no", "options": "Serial No", "label": __("Serial No"), "get_query": function () { @@ -60,6 +61,7 @@ $.extend(erpnext, { }, { "fieldtype": "Button", + "fieldname": "add", "label": __("Add") } ]