Additional Salary Component - naming and date fix

This commit is contained in:
Jamsheer 2018-05-15 19:20:51 +05:30
parent 120b393cf5
commit a46ce11af9
2 changed files with 35 additions and 3 deletions

View File

@ -3,7 +3,7 @@
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:salary_component",
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-05-10 12:04:08.396461",
"custom": 0,
@ -13,6 +13,38 @@
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "ASC-",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@ -306,7 +338,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-05-10 12:54:06.155708",
"modified": "2018-05-15 19:15:29.612105",
"modified_by": "Administrator",
"module": "HR",
"name": "Additional Salary Component",

View File

@ -32,7 +32,7 @@ class AdditionalSalaryComponent(Document):
if getdate(sal_start_date) <= getdate(self.from_date):
start_date = getdate(self.from_date)
if getdate(sal_end_date) > getdate(self.to_date):
end_date = getdate(self.end_date)
end_date = getdate(self.to_date)
no_of_days = date_diff(getdate(end_date), getdate(start_date))
return amount_per_day * no_of_days