Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: payments irrespective of party types (backport #37828) #43040

Open
wants to merge 12 commits into
base: version-14-hotfix
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: indentation error
# Reference: 58114e7
  • Loading branch information
dj12djdjs committed Sep 3, 2024
commit 477b71104dfc34fdde3321a01f5f77c3a7dc1a2f
9 changes: 4 additions & 5 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,13 +1089,12 @@ def add_party_gl_entries(self, gl_entries):

gl_entries.append(gle)

if self.unallocated_amount:
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
exchange_rate = self.get_exchange_rate()
base_unallocated_amount = self.unallocated_amount * exchange_rate
if self.unallocated_amount:
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
exchange_rate = self.get_exchange_rate()
base_unallocated_amount = self.unallocated_amount * exchange_rate

gle = party_gl_dict.copy()

gle.update(
{
dr_or_cr + "_in_account_currency": self.unallocated_amount,
Expand Down
Loading