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 committed Nov 30, 2023
1 parent 591f4eb commit 96b13c5
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 @@ -1698,12 +1698,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 96b13c5

Please sign in to comment.