From f4ef7fdbcc3438bf2271fe2bc3a80fa334660c25 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Aug 2026 17:15:29 +0530 Subject: [PATCH] fix(stock): preserve zero return incoming rates (#58302) --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index f03541412e1..c43dce12202 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -813,7 +813,7 @@ def get_rate_for_return( if not (rate and return_against) and voucher_type in ["Sales Invoice", "Delivery Note"]: rate = frappe.db.get_value(f"{voucher_type} Item", voucher_detail_no, "incoming_rate") - if not rate and sle: + if rate is None and sle: rate = get_incoming_rate( { "item_code": sle.item_code,