Merge pull request #29142 from ruchamahabal/accounting-dimension-mapping
fix: map Accounting Dimensions for Bank Entry against Payroll Entry
This commit is contained in:
commit
ae3d2b4438
@ -398,23 +398,24 @@ class PayrollEntry(Document):
|
||||
currencies = []
|
||||
multi_currency = 0
|
||||
company_currency = erpnext.get_company_currency(self.company)
|
||||
accounting_dimensions = get_accounting_dimensions() or []
|
||||
|
||||
exchange_rate, amount = self.get_amount_and_exchange_rate_for_journal_entry(self.payment_account, je_payment_amount, company_currency, currencies)
|
||||
accounts.append({
|
||||
accounts.append(self.update_accounting_dimensions({
|
||||
"account": self.payment_account,
|
||||
"bank_account": self.bank_account,
|
||||
"credit_in_account_currency": flt(amount, precision),
|
||||
"exchange_rate": flt(exchange_rate),
|
||||
})
|
||||
}, accounting_dimensions))
|
||||
|
||||
exchange_rate, amount = self.get_amount_and_exchange_rate_for_journal_entry(payroll_payable_account, je_payment_amount, company_currency, currencies)
|
||||
accounts.append({
|
||||
accounts.append(self.update_accounting_dimensions({
|
||||
"account": payroll_payable_account,
|
||||
"debit_in_account_currency": flt(amount, precision),
|
||||
"exchange_rate": flt(exchange_rate),
|
||||
"reference_type": self.doctype,
|
||||
"reference_name": self.name
|
||||
})
|
||||
}, accounting_dimensions))
|
||||
|
||||
if len(currencies) > 1:
|
||||
multi_currency = 1
|
||||
|
Loading…
Reference in New Issue
Block a user