fix: stock ledger entry was not created against stock reco

This commit is contained in:
Rohit Waghchaure
2021-01-15 18:18:17 +05:30
parent f9da40e9af
commit c516fc7ca4
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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
}
}
}
}