From 2b54a581f8a047564b6a9f01f402c7af2c0a90a7 Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Wed, 2 Sep 2026 11:44:38 +0530 Subject: [PATCH] fix(stock): preserve exchange gain loss journals in lcv (#58505) --- .../stock/doctype/landed_cost_voucher/landed_cost_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index 53b48e58314..a70b51ceeae 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -442,7 +442,7 @@ class LandedCostVoucher(Document): # update stock & gl entries for cancelled state of PR doc.docstatus = 2 doc.update_stock_ledger(allow_negative_stock=True, via_landed_cost_voucher=True) - doc.make_gl_entries_on_cancel() + doc.make_gl_entries_on_cancel(from_repost=True) # update stock & gl entries for submit state of PR doc.docstatus = 1