barcode error in sales_invoice fixed.
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index d34261d..e15565a 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -310,8 +310,10 @@
var callback = function(r, rt) {
cur_frm.cscript.item_code(doc, cdt, cdn);
}
- get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname,
+ if(d.barcode) {
+ get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname,
doc, cdt, cdn, 1, callback);
+ }
}
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query =