Skip to content

Commit

Permalink
refactor: handle purchase invoice as reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Jun 28, 2024
1 parent ad7efd5 commit 9ec6aef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,9 @@ def get_dr_and_account_for_advances(self, reference):
if reference.reference_doctype == "Sales Invoice":
return "credit", reference.account

if reference.reference_doctype == "Purchase Invoice":
return "debit", 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":
Expand Down

0 comments on commit 9ec6aef

Please sign in to comment.