Skip to content

Commit

Permalink
fix: Unable to allocate advance against invoice (#35007)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 authored Apr 25, 2023
1 parent 72b5c1f commit f7b50f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,10 @@ def set_payment_schedule(self):
)
self.append("payment_schedule", data)

if not automatically_fetch_payment_terms:
if not (
automatically_fetch_payment_terms
and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype)
):
for d in self.get("payment_schedule"):
if d.invoice_portion:
d.payment_amount = flt(
Expand Down

0 comments on commit f7b50f2

Please sign in to comment.