Skip to content

Commit

Permalink
fix(pe): show split alert only on splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
rtdany10 authored and barredterra committed Dec 15, 2023
1 parent a70be42 commit 77dba48
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 77dba48

Please sign in to comment.