Skip to content

Commit

Permalink
fix: GL Entries not getting created for PR Return
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Oct 15, 2023
1 parent afef9dc commit 46add06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def make_item_gl_entries(self, gl_entries, warehouse_account=None):
exchange_rate_map, net_rate_map = get_purchase_document_details(self)

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):
stock_value_diff = frappe.db.get_value(
"Stock Ledger Entry",
Expand Down

0 comments on commit 46add06

Please sign in to comment.