fix: py error on stock ageing report (backport #54467) (#54469)

fix: py error on stock ageing report (#54467)

(cherry picked from commit f5357c233d)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2026-04-22 14:41:13 +00:00
committed by GitHub
parent 99bc2c174b
commit 090aab33fb

View File

@@ -615,5 +615,5 @@ class FIFOSlots:
sr_item = frappe.db.get_value(
"Stock Reconciliation Item", row.voucher_detail_no, ["current_qty", "qty"], as_dict=True
)
if sr_item.qty and sr_item.current_qty:
if sr_item and sr_item.qty and sr_item.current_qty:
self.stock_reco_voucher_wise_count[row.voucher_detail_no] = sr_item.current_qty