chore: modify error msg

(cherry picked from commit f7004aa8c3)
This commit is contained in:
l0gesh29
2026-01-11 14:32:15 +05:30
committed by Mergify
parent bfd6375508
commit fe0431a6d0

View File

@@ -886,7 +886,9 @@ class SalesInvoice(SellingController):
if data.time_sheet:
status = frappe.db.get_value("Timesheet", data.time_sheet, "status")
if status not in ["Submitted", "Payslip", "Partially Billed"]:
frappe.throw(_("Timesheet {0} is already completed or cancelled").format(data.time_sheet))
frappe.throw(
_("Timesheet {0} cannot be invoiced in its current state").format(data.time_sheet)
)
def set_pos_fields(self, for_validate=False):
"""Set retail related fields from POS Profiles"""