diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index ed29316030f..1b81b97392c 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -216,7 +216,7 @@ class StockReconciliation(StockController): if row.qty and not row.valuation_rate: frappe.throw(_("Valuation Rate required for Item {0} at row {1}").format(row.item_code, row.idx)) - if ((previous_sle and row.qty == previous_sle.get("qty_after_transaction") + if (not item.has_batch_no and (previous_sle and row.qty == previous_sle.get("qty_after_transaction") and (row.valuation_rate == previous_sle.get("valuation_rate") or row.qty == 0)) or (not previous_sle and not row.qty)): continue diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index 4204aee342b..2a68fb6f4e0 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -61,9 +61,11 @@ frappe.query_reports["Batch-Wise Balance History"] = { "options": "Batch", "get_query": function() { let item_code = frappe.query_report.get_filter_value('item_code'); - return { - filters: { - "item": item_code + if (item_code) { + return { + filters: { + "item": item_code + } } } }