Skip to content

Commit

Permalink
chore: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dj12djdjs committed Sep 3, 2024
1 parent 477b711 commit 2f2afca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,10 +1067,16 @@ def add_party_gl_entries(self, gl_entries):
is_return = frappe.db.get_value(d.reference_doctype, d.reference_name, "is_return")
payable_party_types = get_party_types_from_account_type("Payable")
receivable_party_types = get_party_types_from_account_type("Receivable")
if is_return and self.party_type in receivable_party_types and (self.payment_type == "Pay"):
if (
is_return
and self.party_type in receivable_party_types
and (self.payment_type == "Pay")
):
reverse_dr_or_cr = 1
elif (
is_return and self.party_type in payable_party_types and (self.payment_type == "Receive")
is_return
and self.party_type in payable_party_types
and (self.payment_type == "Receive")
):
reverse_dr_or_cr = 1

Expand Down

0 comments on commit 2f2afca

Please sign in to comment.