fix: incorrect dr/cr on Adv Payment against Journals

This commit is contained in:
ruthra kumar
2024-06-25 13:52:38 +05:30
parent 42d401a1dd
commit f6c1dffb35

View File

@@ -1313,12 +1313,17 @@ class PaymentEntry(AccountsController):
return "credit", reference.account
if reference.reference_doctype == "Payment Entry":
# reference.account_type and reference.payment_type is only available for Reverse payments
if reference.account_type == "Receivable" and reference.payment_type == "Pay":
return "credit", self.party_account
else:
return "debit", self.party_account
return "debit", reference.account
if reference.reference_doctype == "Journal Entry":
if self.party_type == "Customer" and self.payment_type == "Receive":
return "credit", reference.account
else:
return "debit", reference.account
def add_advance_gl_for_reference(self, gl_entries, invoice):
args_dict = {