mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: payment allocation in invoice payment schedule (#36440)
* fix: payment allocation in invoice payment schedule (#36440)
* fix: payment allocation in invoice payment schedule
* test: payment allocation for payment terms
* chore: linting issues
(cherry picked from commit edbefee10c)
# Conflicts:
# erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
* chore: resolve conflicts
---------
Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -1672,8 +1672,13 @@ class AccountsController(TransactionBase):
|
||||
)
|
||||
self.append("payment_schedule", data)
|
||||
|
||||
allocate_payment_based_on_payment_terms = frappe.db.get_value(
|
||||
"Payment Terms Template", self.payment_terms_template, "allocate_payment_based_on_payment_terms"
|
||||
)
|
||||
|
||||
if not (
|
||||
automatically_fetch_payment_terms
|
||||
and allocate_payment_based_on_payment_terms
|
||||
and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype)
|
||||
):
|
||||
for d in self.get("payment_schedule"):
|
||||
|
||||
Reference in New Issue
Block a user