From 6ac699d3bb44cfb9d96536a5271e2e5654d221c3 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Sat, 20 Jun 2026 23:50:50 +0530 Subject: [PATCH] fix(stock): apply precision to the additional cost amount in stock entry --- erpnext/stock/doctype/stock_entry/stock_entry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 20ddac7000d..cca5fc2bc10 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2186,6 +2186,8 @@ class StockEntry(StockController, SubcontractingInwardController): ] += flt(t.base_amount * multiply_based_on) / divide_based_on if item_account_wise_additional_cost: + precision = self.get_debit_field_precision() + for d in self.get("items"): for account, amount in item_account_wise_additional_cost.get( (d.item_code, d.name), {} @@ -2193,6 +2195,9 @@ class StockEntry(StockController, SubcontractingInwardController): if not amount: continue + amount["amount"] = flt(amount["amount"], precision) + amount["base_amount"] = flt(amount["base_amount"], precision) + gl_entries.append( self.get_gl_dict( {