mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 15:38:39 +00:00
fix(stock): apply precision to the additional cost amount in stock entry
This commit is contained in:
@@ -2186,6 +2186,8 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
] += flt(t.base_amount * multiply_based_on) / divide_based_on
|
] += flt(t.base_amount * multiply_based_on) / divide_based_on
|
||||||
|
|
||||||
if item_account_wise_additional_cost:
|
if item_account_wise_additional_cost:
|
||||||
|
precision = self.get_debit_field_precision()
|
||||||
|
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
for account, amount in item_account_wise_additional_cost.get(
|
for account, amount in item_account_wise_additional_cost.get(
|
||||||
(d.item_code, d.name), {}
|
(d.item_code, d.name), {}
|
||||||
@@ -2193,6 +2195,9 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
if not amount:
|
if not amount:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
amount["amount"] = flt(amount["amount"], precision)
|
||||||
|
amount["base_amount"] = flt(amount["base_amount"], precision)
|
||||||
|
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict(
|
self.get_gl_dict(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user