refactor: handle purchase invoice as reference

(cherry picked from commit 9ec6aef95d)
This commit is contained in:
ruthra kumar
2024-06-28 20:48:22 +05:30
committed by Mergify
parent cb703ff17c
commit 3c58e0af50

View File

@@ -1217,6 +1217,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":