commit
644f404c1b
@ -128,7 +128,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Remainig Benefits (Yearly)",
|
"label": "Remaining Benefits (Yearly)",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -445,7 +445,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-06-28 18:25:01.490375",
|
"modified": "2018-06-29 18:25:01.490375",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Employee Benefit Application",
|
"name": "Employee Benefit Application",
|
||||||
|
@ -57,12 +57,12 @@ class EmployeeBenefitApplication(Document):
|
|||||||
non_pro_rata_amount += max_benefit_amount
|
non_pro_rata_amount += max_benefit_amount
|
||||||
|
|
||||||
if pro_rata_amount == 0 and non_pro_rata_amount == 0:
|
if pro_rata_amount == 0 and non_pro_rata_amount == 0:
|
||||||
frappe.throw(_("Please add the remainig benefits {0} to any of the existing component").format(self.remaining_benefit))
|
frappe.throw(_("Please add the remaining benefits {0} to any of the existing component").format(self.remaining_benefit))
|
||||||
elif non_pro_rata_amount > 0 and non_pro_rata_amount < rounded(self.remaining_benefit):
|
elif non_pro_rata_amount > 0 and non_pro_rata_amount < rounded(self.remaining_benefit):
|
||||||
frappe.throw(_("You can claim only an amount of {0}, the rest amount {1} should be in the application \
|
frappe.throw(_("You can claim only an amount of {0}, the rest amount {1} should be in the application \
|
||||||
as pro-rata component").format(non_pro_rata_amount, self.remaining_benefit - non_pro_rata_amount))
|
as pro-rata component").format(non_pro_rata_amount, self.remaining_benefit - non_pro_rata_amount))
|
||||||
elif non_pro_rata_amount == 0:
|
elif non_pro_rata_amount == 0:
|
||||||
frappe.throw(_("Please add the remainig benefits {0} to the application as \
|
frappe.throw(_("Please add the remaining benefits {0} to the application as \
|
||||||
pro-rata component").format(self.remaining_benefit))
|
pro-rata component").format(self.remaining_benefit))
|
||||||
|
|
||||||
def validate_max_benefit_for_component(self):
|
def validate_max_benefit_for_component(self):
|
||||||
|
@ -143,7 +143,7 @@ def get_last_payroll_period_benefits(employee, sal_slip_start_date, sal_slip_end
|
|||||||
remaining_benefit = max_benefits - get_total_benefit_dispensed(employee, sal_struct, sal_slip_start_date, payroll_period)
|
remaining_benefit = max_benefits - get_total_benefit_dispensed(employee, sal_struct, sal_slip_start_date, payroll_period)
|
||||||
if remaining_benefit > 0:
|
if remaining_benefit > 0:
|
||||||
have_remaining = True
|
have_remaining = True
|
||||||
# Set the remainig benefits to flexi non pro-rata component in the salary structure
|
# Set the remaining benefits to flexi non pro-rata component in the salary structure
|
||||||
salary_components_array = []
|
salary_components_array = []
|
||||||
for d in sal_struct.get("earnings"):
|
for d in sal_struct.get("earnings"):
|
||||||
if d.is_flexible_benefit == 1:
|
if d.is_flexible_benefit == 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user