mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
refactor: handle purchase invoice as reference
(cherry picked from commit 9ec6aef95d)
This commit is contained in:
@@ -1217,6 +1217,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