fix: Revert commit 46372fe

This commit is contained in:
Deepesh Garg
2021-08-22 18:02:51 +05:30
parent 9542da80c5
commit 571178ffbe

View File

@@ -691,7 +691,7 @@ class PaymentEntry(AccountsController):
"cost_center": self.cost_center
}, item=self)
dr_or_cr = "credit" if self.payment_type == 'Receive' else "debit"
dr_or_cr = "credit" if erpnext.get_party_account_type(self.party_type) == 'Receivable' else "debit"
for d in self.get("references"):
gle = party_gl_dict.copy()
@@ -700,11 +700,11 @@ class PaymentEntry(AccountsController):
"against_voucher": d.reference_name
})
allocated_amount_in_company_currency = abs(flt(flt(d.allocated_amount) * flt(d.exchange_rate),
self.precision("paid_amount")))
allocated_amount_in_company_currency = flt(flt(d.allocated_amount) * flt(d.exchange_rate),
self.precision("paid_amount"))
gle.update({
dr_or_cr + "_in_account_currency": abs(d.allocated_amount),
dr_or_cr + "_in_account_currency": d.allocated_amount,
dr_or_cr: allocated_amount_in_company_currency
})