fix: GL Entries not getting created for PR Return

This commit is contained in:
s-aga-r 2023-10-15 15:46:29 +05:30
parent afef9dc8df
commit 46add06a29

View File

@ -339,7 +339,7 @@ class PurchaseReceipt(BuyingController):
exchange_rate_map, net_rate_map = get_purchase_document_details(self) exchange_rate_map, net_rate_map = get_purchase_document_details(self)
for d in self.get("items"): for d in self.get("items"):
if d.item_code in stock_items and flt(d.valuation_rate) and flt(d.qty): if d.item_code in stock_items and flt(d.qty) and (flt(d.valuation_rate) or self.is_return):
if warehouse_account.get(d.warehouse): if warehouse_account.get(d.warehouse):
stock_value_diff = frappe.db.get_value( stock_value_diff = frappe.db.get_value(
"Stock Ledger Entry", "Stock Ledger Entry",