fix: check warehouse account before accessing

This commit is contained in:
Kavin
2025-11-07 15:49:59 +05:30
parent 29c976e9ae
commit 79b3af6d3e

View File

@@ -599,7 +599,7 @@ class SubcontractingReceipt(SubcontractingController):
for item in self.items:
if flt(item.rate) and flt(item.qty):
if warehouse_account.get(item.warehouse):
if warehouse_account and warehouse_account.get(item.warehouse):
stock_value_diff = frappe.db.get_value(
"Stock Ledger Entry",
{