mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 17:53:49 +00:00
Merge pull request #44495 from devdiogenes/prevent-set_payment_schedule-si-return
fix: Prevent set_payment_schedule when creating Sales Invoice that is return
This commit is contained in:
@@ -1049,7 +1049,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user