From 39edcbc93b241701eecab5fc095f1e7133cd9015 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 28 Jul 2014 16:00:19 +0530 Subject: [PATCH] [minor] apply pricing rule / price list only if item_code --- erpnext/public/js/transaction.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index ae5864d491..93dd432f55 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -363,14 +363,16 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ _get_item_list: function(item) { var item_list = []; var append_item = function(d) { - item_list.push({ - "doctype": d.doctype, - "name": d.name, - "item_code": d.item_code, - "item_group": d.item_group, - "brand": d.brand, - "qty": d.qty - }); + if (d.item_code) { + item_list.push({ + "doctype": d.doctype, + "name": d.name, + "item_code": d.item_code, + "item_group": d.item_group, + "brand": d.brand, + "qty": d.qty + }); + } }; if (item) {