Merge branch 'develop' into healthcare_refactor

This commit is contained in:
Rucha Mahabal
2020-04-09 19:16:31 +05:30
committed by GitHub
40 changed files with 486 additions and 1048 deletions

View File

@@ -259,7 +259,8 @@
"bold": 1,
"fieldname": "emergency_phone_number",
"fieldtype": "Data",
"label": "Emergency Phone"
"label": "Emergency Phone",
"options": "Phone"
},
{
"bold": 1,
@@ -480,7 +481,8 @@
{
"fieldname": "cell_number",
"fieldtype": "Data",
"label": "Mobile"
"label": "Mobile",
"options": "Phone"
},
{
"fieldname": "prefered_contact_email",
@@ -787,7 +789,7 @@
"idx": 24,
"image_field": "image",
"links": [],
"modified": "2020-01-09 04:23:55.611366",
"modified": "2020-04-08 12:25:34.306695",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",
@@ -834,6 +836,5 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
"track_changes": 1
}
"title_field": "employee_name"
}

View File

@@ -687,8 +687,7 @@ def add_leaves(events, start, end, filter_conditions=None):
"to_date": d.to_date,
"docstatus": d.docstatus,
"color": d.color,
"title": cstr(d.employee_name) + \
(d.half_day and _(" (Half Day)") or ""),
"title": cstr(d.employee_name) + (' ' + _('(Half Day)') if d.half_day else ''),
}
if e not in events:
events.append(e)

View File

@@ -356,13 +356,13 @@ class SalarySlip(TransactionBase):
def eval_condition_and_formula(self, d, data):
try:
condition = d.condition.strip() if d.condition else None
condition = d.condition.strip().replace("\n", " ") if d.condition else None
if condition:
if not frappe.safe_eval(condition, self.whitelisted_globals, data):
return None
amount = d.amount
if d.amount_based_on_formula:
formula = d.formula.strip() if d.formula else None
formula = d.formula.strip().replace("\n", " ") if d.formula else None
if formula:
amount = flt(frappe.safe_eval(formula, self.whitelisted_globals, data), d.precision("amount"))
if amount: