mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
fix(regional): removed payment schedule validation in sales invoice for italy (backport #45852) (#45854)
fix(regional): removed payment schedule validation in sales invoice for italy (#45852)
(cherry picked from commit 494310293c)
Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com>
This commit is contained in:
@@ -331,22 +331,19 @@ def sales_invoice_on_submit(doc, method):
|
|||||||
]:
|
]:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not len(doc.payment_schedule):
|
for schedule in doc.payment_schedule:
|
||||||
frappe.throw(_("Please set the Payment Schedule"), title=_("E-Invoicing Information Missing"))
|
if not schedule.mode_of_payment:
|
||||||
else:
|
frappe.throw(
|
||||||
for schedule in doc.payment_schedule:
|
_("Row {0}: Please set the Mode of Payment in Payment Schedule").format(schedule.idx),
|
||||||
if not schedule.mode_of_payment:
|
title=_("E-Invoicing Information Missing"),
|
||||||
frappe.throw(
|
)
|
||||||
_("Row {0}: Please set the Mode of Payment in Payment Schedule").format(schedule.idx),
|
elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"):
|
||||||
title=_("E-Invoicing Information Missing"),
|
frappe.throw(
|
||||||
)
|
_("Row {0}: Please set the correct code on Mode of Payment {1}").format(
|
||||||
elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"):
|
schedule.idx, schedule.mode_of_payment
|
||||||
frappe.throw(
|
),
|
||||||
_("Row {0}: Please set the correct code on Mode of Payment {1}").format(
|
title=_("E-Invoicing Information Missing"),
|
||||||
schedule.idx, schedule.mode_of_payment
|
)
|
||||||
),
|
|
||||||
title=_("E-Invoicing Information Missing"),
|
|
||||||
)
|
|
||||||
|
|
||||||
prepare_and_attach_invoice(doc)
|
prepare_and_attach_invoice(doc)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user