Skip to content

Commit

Permalink
fix(Payslip)
Browse files Browse the repository at this point in the history
- Restaure the management of off days in payslip
- fix the displaying of daily rate for Holidays periods and offdays
- Exted the periode of definition of offdays

closes Third-Culture-Software#3784
  • Loading branch information
lomamech committed Jul 4, 2019
1 parent 47ba601 commit 713c4bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion client/src/modules/offdays/modals/offday.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

<bh-date-editor
date-value="OffdayModalCtrl.offday.date"
on-change="OffdayModalCtrl.onDateChange(date)">
on-change="OffdayModalCtrl.onDateChange(date)"
allow-future-date="true">
</bh-date-editor>

<div class="form-group" ng-class="{ 'has-error' : OffdayForm.$submitted && OffdayForm.percent_pay.$invalid }">
Expand Down
24 changes: 12 additions & 12 deletions server/controllers/payroll/reports/payslipGenerator.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@
</tr>
<tr>
<td style="width: 40%;">{{translate "TABLE.COLUMNS.RUBRICS"}}</td>
<td style="width: 25%;" class="text-center">{{translate 'TABLE.COLUMNS.RATE'}} ( % )</td>
<td style="width: 5%;" class="text-center">{{translate 'TABLE.COLUMNS.RATE'}} ( % )</td>
<td style="width: 5%;" class="text-center">{{translate 'TABLE.COLUMNS.DAYS'}} </td>
<td style="width: 15%;" class="text-center">{{translate 'TABLE.COLUMNS.DAILY_RATE'}} </td>
<td style="width: 15%;" class="text-center"> {{translate "TABLE.COLUMNS.RESULT"}}</td>
<td style="width: 25%;" class="text-center">{{translate 'TABLE.COLUMNS.DAILY_RATE'}} </td>
<td style="width: 25%;" class="text-center"> {{translate "TABLE.COLUMNS.RESULT"}}</td>
</tr>
</thead>
<tr>
<td> {{translate 'TABLE.COLUMNS.DAY_WORKED'}} </td>
<td></td>
<td> {{ working_day }} </td>
<td class="text-right"> {{ working_day }} </td>
<td class="text-right"> {{currency (multiply daily_salary ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
<td class="text-right"> {{currency (multiply dailyWorkedValue ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
</tr>

{{#each holidaysPaid}}
<tr>
<td> {{ label }} </td>
<td> {{ holiday_percentage }} </td>
<td> {{ holiday_nbdays }} </td>
<td class="text-right"> {{currency (multiply daily_salary ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
<td class="text-right"> {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
<td class="text-right"> {{ holiday_percentage }} </td>
<td class="text-right"> {{ holiday_nbdays }} </td>
<td class="text-right"> {{currency (multiply dailyRate ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} </td>
<td class="text-right"> {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} </td>
</tr>
{{/each}}

{{#each offDaysPaid}}
<tr>
<td> {{ label }} </td>
<td> {{ offday_percentage }} </td>
<td> 1 </td>
<td class="text-right"> {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
<td class="text-right"> {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} </td>
<td class="text-right"> {{ offday_percentage }} </td>
<td class="text-right"> 1 </td>
<td class="text-right"> {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} </td>
<td class="text-right"> {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} </td>
</tr>
{{/each}}
<tr>
Expand Down
1 change: 1 addition & 0 deletions server/controllers/payroll/reports/payslipGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function build(req, res, next) {
employee.rubricNonTaxable = [];
employee.rubricDiscount = [];
employee.holidaysPaid = [];
employee.offDaysPaid = [];
employee.rubricsChargeEmployee = [];
employee.rubricsChargeEnterprise = [];
employee.daily_salary = employee.basic_salary / employee.total_day;
Expand Down

0 comments on commit 713c4bf

Please sign in to comment.