Skip to content

Commit

Permalink
fix: prevent set_payment_schedule on return documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Dec 9, 2024
1 parent 94a0725 commit 2560beb
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 @@ -1046,7 +1046,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 2560beb

Please sign in to comment.