fix termination report
This commit is contained in:
parent
5eb594b508
commit
a06ee93538
|
|
@ -339,7 +339,7 @@ msgstr "قيمة التذكرة"
|
|||
#. module: hr_termination
|
||||
#: model:ir.model.fields.selection,name:hr_termination.selection__employee_termination_report__type__all
|
||||
msgid "All"
|
||||
msgstr "الكل"
|
||||
msgstr "الكــل"
|
||||
|
||||
#. module: hr_termination
|
||||
#: model:ir.model.fields,help:hr_termination.field_account_move__state
|
||||
|
|
@ -988,7 +988,7 @@ msgstr "اخر يوم عمل"
|
|||
#. module: hr_termination
|
||||
#: model:ir.model.fields.selection,name:hr_termination.selection__employee_termination_report__type__leave
|
||||
msgid "Leave"
|
||||
msgstr ""
|
||||
msgstr "الإجازات"
|
||||
|
||||
#. module: hr_termination
|
||||
#: model:ir.model.fields,field_description:hr_termination.field_hr_termination__leave_balance
|
||||
|
|
@ -1270,7 +1270,7 @@ msgstr ""
|
|||
#. module: hr_termination
|
||||
#: model:ir.model.fields.selection,name:hr_termination.selection__employee_termination_report__type__salary
|
||||
msgid "Salary"
|
||||
msgstr "مرتب"
|
||||
msgstr "الرواتب"
|
||||
|
||||
#. module: hr_termination
|
||||
#: model:ir.model.fields,field_description:hr_termination.field_hr_termination__salary_amount
|
||||
|
|
@ -1589,7 +1589,7 @@ msgstr " %s لا توجد قيمة لقاعدة الراتب"
|
|||
#. module: hr_termination
|
||||
#: model:ir.model.fields.selection,name:hr_termination.selection__employee_termination_report__type__ticket
|
||||
msgid "Ticket"
|
||||
msgstr "التذاكر"
|
||||
msgstr "تذاكر السفر"
|
||||
|
||||
#. module: hr_termination
|
||||
#: model_terms:ir.ui.view,arch_db:hr_termination.hr_termination_report
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@
|
|||
<th style=" border: 1px solid gray;border-bottom:0px;text-align:center;color:#FFFFFF">
|
||||
سنوات الخدمة(سنة/شهر/يوم)
|
||||
</th>
|
||||
<t t-if="type == 'all' or type == 'termination'">
|
||||
<th style="border: 1px solid gray;border-bottom:0px;text-align:center;color:#FFFFFF">
|
||||
سبب إنهاء الخدمة
|
||||
</th>
|
||||
</t>
|
||||
<t t-if="type == 'all' or type == 'leave'">
|
||||
<th style="border: 1px solid gray;border-bottom:0px;text-align:center;color:#FFFFFF">
|
||||
رصيد الإجازة
|
||||
|
|
@ -55,10 +57,11 @@
|
|||
قيمة نهاية الخدمة
|
||||
</th>
|
||||
</t>
|
||||
|
||||
<t t-if="type == 'all'">
|
||||
<th style="border: 1px solid gray;border-bottom:0px;text-align:center;background-color:#263f79;color:#FFFFFF">
|
||||
إجمالي المستحق
|
||||
</th>
|
||||
</t>
|
||||
</tr>
|
||||
<t t-if="type == 'all'">
|
||||
<tr>
|
||||
|
|
@ -124,7 +127,7 @@
|
|||
نهاية الخدمة لأكبر من 5 سنة
|
||||
</th>
|
||||
<th style="border: 1px solid gray;border-top:0px;background-color:#263f79;color:#FFFFFF"/>
|
||||
<th style="border: 1px solid gray;border-top:0px;background-color:#263f79;color:#FFFFFF"/>
|
||||
<!--th style="border: 1px solid gray;border-top:0px;background-color:#263f79;color:#FFFFFF"/-->
|
||||
</tr>
|
||||
</t>
|
||||
</thead>
|
||||
|
|
@ -151,9 +154,11 @@
|
|||
<td style=" border: 1px solid gray;page-break-inside: avoid">
|
||||
<t t-esc="data[key]['experiences_year']"/>
|
||||
</td>
|
||||
<t t-if="type == 'all' or type == 'termination'">
|
||||
<td style="border: 1px solid gray;page-break-inside: avoid">
|
||||
<t t-esc="data[key]['termination_reson']"/>
|
||||
</td>
|
||||
</t>
|
||||
<t t-if="type == 'all' or type == 'leave'">
|
||||
<td style=" border: 1px solid gray;page-break-inside: avoid">
|
||||
<t t-esc="round(data[key]['remind_leave_day'],2)"/>
|
||||
|
|
@ -186,10 +191,11 @@
|
|||
<t t-esc="round(data[key]['termination_price'],2)"/>
|
||||
</td>
|
||||
</t>
|
||||
<t t-if="type == 'all' ">
|
||||
<td style=" border: 1px solid gray;page-break-inside: avoid">
|
||||
<t t-esc="round(data[key]['total'],2)"/>
|
||||
</td>
|
||||
|
||||
</t>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
|
@ -204,8 +210,8 @@
|
|||
<t t-esc="round(data['total_rule'][rule],2)"/>
|
||||
</td>
|
||||
</t>
|
||||
<td style="background-color:#263f79;"></td>
|
||||
<td style="background-color:#263f79;"></td>
|
||||
<td t-if="type == 'all' or type == 'termination'" style="background-color:#263f79;"></td>
|
||||
<td t-if="type == 'all' or type == 'termination'" style="background-color:#263f79;"></td>
|
||||
|
||||
<td t-if="type == 'all' or type == 'leave'" style=" border: 1px solid gray;background-color:#263f79;color:#FFFFFF">
|
||||
<t t-esc="round(data['total_sum']['remaining_leaves'],2)"/> </td>
|
||||
|
|
@ -221,7 +227,7 @@
|
|||
<t t-esc="round(data['total_sum']['amount'],2)"/> </td>
|
||||
<td t-if="type == 'all' or type == 'termination'" style=" border: 1px solid gray;background-color:#263f79;color:#FFFFFF">
|
||||
<t t-esc="round(data['total_sum']['termination_price'],2)"/></td>
|
||||
<td style=" border: 1px solid gray;background-color:#263f79;color:#FFFFFF"> <t t-esc="round(data['total_sum']['total'],2)"/></td>
|
||||
<td t-if="type == 'all' " style=" border: 1px solid gray;background-color:#263f79;color:#FFFFFF"> <t t-esc="round(data['total_sum']['total'],2)"/></td>
|
||||
|
||||
</tr>
|
||||
<!-- </t>-->
|
||||
|
|
|
|||
|
|
@ -596,8 +596,8 @@ class ReportTerminationPublic(models.AbstractModel):
|
|||
if type == 'all' or type == 'termination':
|
||||
cause_amount, five_cause_amount, amount = self.get_cause_amount(emp.first_hiring_date, cause_type_name,
|
||||
end_date, emp)
|
||||
if type == 'all' or type == 'ticket':
|
||||
ticket = self.env['hr.ticket.request'].search([('employee_id', '=', emp.id), ('state', '=', 'done')])
|
||||
if emp.check_nationality ==False and (type == 'all' or type == 'ticket'):
|
||||
ticket = self.env['hr.ticket.request'].search([('employee_id', '=', emp.id), ('state', '=', 'done'),('mission_check','=',False)])
|
||||
if ticket:
|
||||
if len(ticket) != year:
|
||||
if len(ticket) < year:
|
||||
|
|
@ -606,12 +606,12 @@ class ReportTerminationPublic(models.AbstractModel):
|
|||
else:
|
||||
ticket_num = 0
|
||||
else:
|
||||
if year < 2:
|
||||
#if year < 2:
|
||||
ticket_num = year
|
||||
ticket_price = ticket_num * emp.contract_id.ticket_allowance
|
||||
else:
|
||||
ticket_num = 2
|
||||
ticket_price = ticket_num * emp.contract_id.ticket_allowance
|
||||
#else:
|
||||
#ticket_num = 2
|
||||
#ticket_price = ticket_num * emp.contract_id.ticket_allowance
|
||||
number_year = ' سنه %s : شهر%s : يوم%s' % (year, month, day)
|
||||
salary = 0.0
|
||||
result = self.get_salary_rules_and_loans(emp, end_date, emp.first_hiring_date, cause_type_name)
|
||||
|
|
@ -759,12 +759,12 @@ class TerminationReportXls(models.AbstractModel):
|
|||
sheet.write(4, not_salary + 2, ('نهاية الخدمة لأقل من5 سنة'), format2)
|
||||
sheet.write(4, not_salary + 3, ('قيمة نهاية الخدمة لأكبر من 5 سنة'), format2)
|
||||
sheet.write(3, not_salary + 5, ('قيمة نهاية الخدمة'), format2)
|
||||
sheet.write(3, not_salary + 4, ('إجمالي المستحق'), format2)
|
||||
#sheet.write(3, not_salary + 4, ('إجمالي المستحق'), format2)
|
||||
|
||||
if type == 'salary':
|
||||
sheet.write(3, len_of_salary + 6, ('إجمالي المستحق'), format2)
|
||||
if type != 'salary' and type != 'all' and type != 'termination':
|
||||
sheet.write(3, not_salary + 4, ('إجمالي المستحق'), format2)
|
||||
#if type != 'salary' and type != 'all' and type != 'termination':
|
||||
#sheet.write(3, not_salary + 4, ('إجمالي المستحق'), format2)
|
||||
row = 4
|
||||
for key in mykey:
|
||||
row += 1
|
||||
|
|
@ -798,14 +798,15 @@ class TerminationReportXls(models.AbstractModel):
|
|||
sheet.write(row, data_row + 2, final_dic[key]['ticket'], format2)
|
||||
sheet.write(row, data_row + 3, final_dic[key]['ticket_price'], format2)
|
||||
if type == 'termination':
|
||||
sheet.write(row, data_row + 1, final_dic[key]['termination_reson'], format2)
|
||||
sheet.write(row, data_row + 2, final_dic[key]['five_year_price'], format2)
|
||||
sheet.write(row, data_row + 3, final_dic[key]['amount'], format2)
|
||||
sheet.write(row, data_row + 4, final_dic[key]['termination_price'], format2)
|
||||
sheet.write(row, data_row + 5, final_dic[key]['total'], format2)
|
||||
#sheet.write(row, data_row + 5, final_dic[key]['total'], format2)
|
||||
if type == 'salary':
|
||||
sheet.write(row, len_of_salary + 6, final_dic[key]['total'], format2)
|
||||
if type != 'salary' and type != 'all' and type != 'termination':
|
||||
sheet.write(row, data_row + 4, final_dic[key]['total'], format2)
|
||||
#if type != 'salary' and type != 'all' and type != 'termination':
|
||||
#sheet.write(row, data_row + 4, final_dic[key]['total'], format2)
|
||||
y = len(final_dic) + 1 + len_of_salary + 1
|
||||
sheet.merge_range(y, 1, y, 2, _('الاجمالى'), format2)
|
||||
m = 3
|
||||
|
|
|
|||
Loading…
Reference in New Issue