refactor: handle purchase invoice as reference

This commit is contained in:
ruthra kumar
2024-06-28 20:48:22 +05:30
parent ad7efd5939
commit 9ec6aef95d

View File

@@ -1312,6 +1312,9 @@ class PaymentEntry(AccountsController):
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":