Skip to content

Commit

Permalink
fix: locale Currency and Float setting in update_employee
Browse files Browse the repository at this point in the history
In fieldtypes locale settings (example NL) . and , changes whereby the field is inproperly filled

(cherry picked from commit 17887cd)
  • Loading branch information
RJPvT authored and mergify[bot] committed Jun 10, 2022
1 parent 384ce92 commit 391ed9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/hr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ def update_employee_work_history(employee, details, date=None, cancel=False):
new_data = getdate(new_data)
elif fieldtype == "Datetime" and new_data:
new_data = get_datetime(new_data)
elif fieldtype in ["Currency", "Float"] and new_data:
new_data = flt(new_data)
setattr(employee, item.fieldname, new_data)
if item.fieldname in ["department", "designation", "branch"]:
internal_work_history[item.fieldname] = item.new
Expand Down

0 comments on commit 391ed9c

Please sign in to comment.