Skip to content

Commit

Permalink
Merge pull request #44495 from devdiogenes/prevent-set_payment_schedu…
Browse files Browse the repository at this point in the history
…le-si-return

fix: Prevent set_payment_schedule when creating Sales Invoice that is return
  • Loading branch information
ruthra-kumar authored Dec 9, 2024
2 parents a6aaaa5 + d1dc7ec commit a08a66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/delivery_note/delivery_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ def get_pending_qty(item_row):
automatically_fetch_payment_terms = cint(
frappe.db.get_single_value("Accounts Settings", "automatically_fetch_payment_terms")
)
if automatically_fetch_payment_terms:
if automatically_fetch_payment_terms and not doc.is_return:
doc.set_payment_schedule()

return doc
Expand Down

0 comments on commit a08a66d

Please sign in to comment.