Landed cost voucher: fixes for serialized item

This commit is contained in:
Nabin Hait
2015-03-27 15:38:31 +05:30
parent 712440c045
commit 54c865e77c
7 changed files with 37 additions and 18 deletions

View File

@@ -53,11 +53,11 @@ def get_bin(item_code, warehouse):
bin_obj.ignore_permissions = True
return bin_obj
def update_bin(args, allow_negative_stock=False):
def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False):
is_stock_item = frappe.db.get_value('Item', args.get("item_code"), 'is_stock_item')
if is_stock_item == 'Yes':
bin = get_bin(args.get("item_code"), args.get("warehouse"))
bin.update_stock(args, allow_negative_stock)
bin.update_stock(args, allow_negative_stock, via_landed_cost_voucher)
return bin
else:
frappe.msgprint(_("Item {0} ignored since it is not a stock item").format(args.get("item_code")))