From 8e19b46bd93f4353f4922c628ccfc9de8b83c94c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 21:26:25 +0530 Subject: [PATCH] fix: debit in transaction currency (cherry picked from commit e4acf20a62727ea94c439ec81a877fff8950198e) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c32c62afc23..98d1850bd8f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1318,7 +1318,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project, @@ -1352,6 +1352,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, + "debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project,