mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
refactor: handle purchase invoice as reference
This commit is contained in:
@@ -1312,6 +1312,9 @@ class PaymentEntry(AccountsController):
|
|||||||
if reference.reference_doctype == "Sales Invoice":
|
if reference.reference_doctype == "Sales Invoice":
|
||||||
return "credit", reference.account
|
return "credit", reference.account
|
||||||
|
|
||||||
|
if reference.reference_doctype == "Purchase Invoice":
|
||||||
|
return "debit", reference.account
|
||||||
|
|
||||||
if reference.reference_doctype == "Payment Entry":
|
if reference.reference_doctype == "Payment Entry":
|
||||||
# reference.account_type and reference.payment_type is only available for Reverse payments
|
# reference.account_type and reference.payment_type is only available for Reverse payments
|
||||||
if reference.account_type == "Receivable" and reference.payment_type == "Pay":
|
if reference.account_type == "Receivable" and reference.payment_type == "Pay":
|
||||||
|
|||||||
Reference in New Issue
Block a user