fix: incorrect stock reco sle

(cherry picked from commit 597d5aff02)
This commit is contained in:
Mihir Kandoi
2025-07-14 16:25:29 +05:30
committed by Mergify
parent 6e10b53e24
commit 1322cc1378

View File

@@ -1089,15 +1089,12 @@ class StockReconciliation(StockController):
} }
) )
if ( if add_new_sle and not frappe.db.get_value(
add_new_sle
and not frappe.db.get_value(
"Stock Ledger Entry", "Stock Ledger Entry",
{"voucher_detail_no": row.name, "actual_qty": ("<", 0), "is_cancelled": 0}, {"voucher_detail_no": row.name, "actual_qty": ("<", 0), "is_cancelled": 0},
"name", "name",
)
and not row.current_serial_and_batch_bundle
): ):
if not not row.current_serial_and_batch_bundle:
self.set_current_serial_and_batch_bundle(voucher_detail_no, save=True) self.set_current_serial_and_batch_bundle(voucher_detail_no, save=True)
row.reload() row.reload()