From 713c4bf1050fb8c126255baa34e36c00c8e36c38 Mon Sep 17 00:00:00 2001 From: Chris Lomame Date: Thu, 4 Jul 2019 15:55:05 +0100 Subject: [PATCH] fix(Payslip) - 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 #3784 --- .../modules/offdays/modals/offday.modal.html | 3 ++- .../reports/payslipGenerator.handlebars | 24 +++++++++---------- .../payroll/reports/payslipGenerator.js | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/client/src/modules/offdays/modals/offday.modal.html b/client/src/modules/offdays/modals/offday.modal.html index c760069564..a1a907b389 100644 --- a/client/src/modules/offdays/modals/offday.modal.html +++ b/client/src/modules/offdays/modals/offday.modal.html @@ -24,7 +24,8 @@ + on-change="OffdayModalCtrl.onDateChange(date)" + allow-future-date="true">
diff --git a/server/controllers/payroll/reports/payslipGenerator.handlebars b/server/controllers/payroll/reports/payslipGenerator.handlebars index fa9dfc9e9b..f908b4c357 100644 --- a/server/controllers/payroll/reports/payslipGenerator.handlebars +++ b/server/controllers/payroll/reports/payslipGenerator.handlebars @@ -34,16 +34,16 @@ {{translate "TABLE.COLUMNS.RUBRICS"}} - {{translate 'TABLE.COLUMNS.RATE'}} ( % ) + {{translate 'TABLE.COLUMNS.RATE'}} ( % ) {{translate 'TABLE.COLUMNS.DAYS'}} - {{translate 'TABLE.COLUMNS.DAILY_RATE'}} - {{translate "TABLE.COLUMNS.RESULT"}} + {{translate 'TABLE.COLUMNS.DAILY_RATE'}} + {{translate "TABLE.COLUMNS.RESULT"}} {{translate 'TABLE.COLUMNS.DAY_WORKED'}} - {{ working_day }} + {{ working_day }} {{currency (multiply daily_salary ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} {{currency (multiply dailyWorkedValue ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} @@ -51,20 +51,20 @@ {{#each holidaysPaid}} {{ label }} - {{ holiday_percentage }} - {{ holiday_nbdays }} - {{currency (multiply daily_salary ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} - {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} + {{ holiday_percentage }} + {{ holiday_nbdays }} + {{currency (multiply dailyRate ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} + {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} {{/each}} {{#each offDaysPaid}} {{ label }} - {{ offday_percentage }} - 1 - {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} - {{currency (multiply value ../payrollPeriod.exchangeRate) ../payrollPeriod.currency }} + {{ offday_percentage }} + 1 + {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} + {{currency (multiply value ../../payrollPeriod.exchangeRate) ../../payrollPeriod.currency }} {{/each}} diff --git a/server/controllers/payroll/reports/payslipGenerator.js b/server/controllers/payroll/reports/payslipGenerator.js index f26eb3a8a3..f1ba84011d 100644 --- a/server/controllers/payroll/reports/payslipGenerator.js +++ b/server/controllers/payroll/reports/payslipGenerator.js @@ -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;