mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
fix: Incorrect translation syntax
This commit is contained in:
@@ -84,7 +84,7 @@ def get_benefit_pro_rata_ratio_amount(employee, on_date, sal_struct):
|
||||
pay_against_benefit_claim, max_benefit_amount = frappe.db.get_value("Salary Component", sal_struct_row.salary_component, ["pay_against_benefit_claim", "max_benefit_amount"])
|
||||
except TypeError:
|
||||
# show the error in tests?
|
||||
frappe.throw(_("Unable to find Salary Component {0}".format(sal_struct_row.salary_component)))
|
||||
frappe.throw(_("Unable to find Salary Component {0}").format(sal_struct_row.salary_component))
|
||||
if sal_struct_row.is_flexible_benefit == 1 and pay_against_benefit_claim != 1:
|
||||
total_pro_rata_max += max_benefit_amount
|
||||
if total_pro_rata_max > 0:
|
||||
|
||||
@@ -364,11 +364,11 @@ class SalarySlip(TransactionBase):
|
||||
return amount
|
||||
|
||||
except NameError as err:
|
||||
frappe.throw(_("Name error: {0}".format(err)))
|
||||
frappe.throw(_("Name error: {0}").format(err))
|
||||
except SyntaxError as err:
|
||||
frappe.throw(_("Syntax error in formula or condition: {0}".format(err)))
|
||||
frappe.throw(_("Syntax error in formula or condition: {0}").format(err))
|
||||
except Exception as e:
|
||||
frappe.throw(_("Error in formula or condition: {0}".format(e)))
|
||||
frappe.throw(_("Error in formula or condition: {0}").format(e))
|
||||
raise
|
||||
|
||||
def add_employee_benefits(self, payroll_period):
|
||||
@@ -705,11 +705,11 @@ class SalarySlip(TransactionBase):
|
||||
if condition:
|
||||
return frappe.safe_eval(condition, self.whitelisted_globals, data)
|
||||
except NameError as err:
|
||||
frappe.throw(_("Name error: {0}".format(err)))
|
||||
frappe.throw(_("Name error: {0}").format(err))
|
||||
except SyntaxError as err:
|
||||
frappe.throw(_("Syntax error in condition: {0}".format(err)))
|
||||
frappe.throw(_("Syntax error in condition: {0}").format(err))
|
||||
except Exception as e:
|
||||
frappe.throw(_("Error in formula or condition: {0}".format(e)))
|
||||
frappe.throw(_("Error in formula or condition: {0}").format(e))
|
||||
raise
|
||||
|
||||
def get_salary_slip_row(self, salary_component):
|
||||
|
||||
@@ -57,8 +57,8 @@ class StaffingPlan(Document):
|
||||
and sp.to_date >= %s and sp.from_date <= %s and sp.company = %s
|
||||
""", (staffing_plan_detail.designation, self.from_date, self.to_date, self.company))
|
||||
if overlap and overlap [0][0]:
|
||||
frappe.throw(_("Staffing Plan {0} already exist for designation {1}"
|
||||
.format(overlap[0][0], staffing_plan_detail.designation)))
|
||||
frappe.throw(_("Staffing Plan {0} already exist for designation {1}")
|
||||
.format(overlap[0][0], staffing_plan_detail.designation))
|
||||
|
||||
def validate_with_parent_plan(self, staffing_plan_detail):
|
||||
if not frappe.get_cached_value('Company', self.company, "parent_company"):
|
||||
|
||||
Reference in New Issue
Block a user