mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 18:24:10 +00:00
Merge pull request #56478 from mihir-kandoi/messages/maintenance
chore: rewrite user-facing messages in maintenance module
This commit is contained in:
@@ -294,10 +294,11 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
|
|
||||||
for row in voucher_nos:
|
for row in voucher_nos:
|
||||||
if row.voucher_type != "Maintenance Schedule":
|
if row.voucher_type != "Maintenance Schedule":
|
||||||
msg = f"""Serial and Batch Bundle {row.name}
|
frappe.throw(
|
||||||
should have voucher type as 'Maintenance Schedule'"""
|
_(
|
||||||
|
"Serial and Batch Bundle {0} should have voucher type as 'Maintenance Schedule'"
|
||||||
frappe.throw(_(msg))
|
).format(row.name)
|
||||||
|
)
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
self.db_set("status", "Draft")
|
self.db_set("status", "Draft")
|
||||||
@@ -332,14 +333,14 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
amc_start_date
|
amc_start_date
|
||||||
):
|
):
|
||||||
throw(
|
throw(
|
||||||
_("Serial No {0} is under warranty upto {1}").format(
|
_("Serial No {0} is under warranty until {1}").format(
|
||||||
serial_no, sr_details.warranty_expiry_date
|
serial_no, sr_details.warranty_expiry_date
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if sr_details.amc_expiry_date and getdate(sr_details.amc_expiry_date) >= getdate(amc_start_date):
|
if sr_details.amc_expiry_date and getdate(sr_details.amc_expiry_date) >= getdate(amc_start_date):
|
||||||
throw(
|
throw(
|
||||||
_("Serial No {0} is under maintenance contract upto {1}").format(
|
_("Serial No {0} is under maintenance contract until {1}").format(
|
||||||
serial_no, sr_details.amc_expiry_date
|
serial_no, sr_details.amc_expiry_date
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user