Skip to content

Commit

Permalink
Merge pull request #38788 from barredterra/bp-38440
Browse files Browse the repository at this point in the history
fix(pe): show split alert only on splitting (backport #38440)
  • Loading branch information
barredterra authored Dec 15, 2023
2 parents a70be42 + 77dba48 commit 4fb479e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1703,12 +1703,13 @@ def split_invoices_based_on_payment_terms(outstanding_invoices, company) -> list
if not split_rows:
continue

frappe.msgprint(
_("Splitting {0} {1} into {2} rows as per Payment Terms").format(
_(entry.voucher_type), frappe.bold(entry.voucher_no), len(split_rows)
),
alert=True,
)
if len(split_rows) > 1:
frappe.msgprint(
_("Splitting {0} {1} into {2} rows as per Payment Terms").format(
_(entry.voucher_type), frappe.bold(entry.voucher_no), len(split_rows)
),
alert=True,
)
outstanding_invoices_after_split += split_rows
continue

Expand Down

0 comments on commit 4fb479e

Please sign in to comment.