fix: discount ledger entry in case of multicurrency invoice (#31024)
This commit is contained in:
parent
3714e36b44
commit
f915a9cef7
@ -1130,11 +1130,10 @@ class AccountsController(TransactionBase):
|
||||
{
|
||||
"account": item.discount_account,
|
||||
"against": supplier_or_customer,
|
||||
dr_or_cr: flt(discount_amount, item.precision("discount_amount")),
|
||||
dr_or_cr
|
||||
+ "_in_account_currency": flt(
|
||||
dr_or_cr: flt(
|
||||
discount_amount * self.get("conversion_rate"), item.precision("discount_amount")
|
||||
),
|
||||
dr_or_cr + "_in_account_currency": flt(discount_amount, item.precision("discount_amount")),
|
||||
"cost_center": item.cost_center,
|
||||
"project": item.project,
|
||||
},
|
||||
@ -1149,11 +1148,11 @@ class AccountsController(TransactionBase):
|
||||
{
|
||||
"account": income_or_expense_account,
|
||||
"against": supplier_or_customer,
|
||||
rev_dr_cr: flt(discount_amount, item.precision("discount_amount")),
|
||||
rev_dr_cr
|
||||
+ "_in_account_currency": flt(
|
||||
rev_dr_cr: flt(
|
||||
discount_amount * self.get("conversion_rate"), item.precision("discount_amount")
|
||||
),
|
||||
rev_dr_cr
|
||||
+ "_in_account_currency": flt(discount_amount, item.precision("discount_amount")),
|
||||
"cost_center": item.cost_center,
|
||||
"project": item.project or self.project,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user