From 737a504a357bd34916201f8deac2e56cf69d6e21 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 19 Sep 2019 17:01:26 +0530 Subject: [PATCH] fix: get_bin_details_and_serial_nos() takes at least 3 arguments (4 given) --- erpnext/selling/sales_common.js | 2 +- erpnext/stock/get_item_details.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index b1b64a3e4ec..623ada1445e 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -209,7 +209,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ args: { item_code: item.item_code, warehouse: item.warehouse, - has_batch_no: has_batch_no, + has_batch_no: has_batch_no || 0, stock_qty: item.stock_qty, serial_no: item.serial_no || "", }, diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 0828a5ca543..55cd6f956b1 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -724,7 +724,7 @@ def get_serial_no_details(item_code, warehouse, stock_qty, serial_no): return {'serial_no': serial_no} @frappe.whitelist() -def get_bin_details_and_serial_nos(item_code, warehouse, has_batch_no, stock_qty=None, serial_no=None): +def get_bin_details_and_serial_nos(item_code, warehouse, has_batch_no=None, stock_qty=None, serial_no=None): bin_details_and_serial_nos = {} bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse)) if flt(stock_qty) > 0: