fix: refs #6553 workerBusiness v3 #3508

Merged
carlossa merged 1 commits from 6553-workerBusinessV3 into test 2025-02-28 10:10:09 +00:00
1 changed files with 25 additions and 0 deletions

View File

@ -18,6 +18,12 @@ module.exports = Self => {
type: 'object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
},
{
arg: 'isHourlyLabor',
type: 'boolean',
description: 'isHourlyLabor',
http: {source: 'query'}
},
{
arg: 'started',
type: 'date',
@ -108,6 +114,18 @@ module.exports = Self => {
description: 'workerBusinessCategory',
http: {source: 'query'}
},
{
arg: 'workerBusinessAgreementFk',
type: 'number',
description: 'workerBusinessAgreementFk',
http: {source: 'query'}
},
{
arg: 'workerBusinessAgreementName',
type: 'string',
description: 'workerBusinessAgreementName',
http: {source: 'query'}
},
{
arg: 'occupationCodeFk',
type: 'number',
@ -177,6 +195,7 @@ module.exports = Self => {
switch (param) {
case 'started':
case 'ended':
case 'isHourlyLabor':
case 'companyCodeFk':
case 'reasonEndFk':
case 'reasondEnd':
@ -184,6 +203,8 @@ module.exports = Self => {
case 'department':
case 'workerBusinessProfessionalCategoryFk':
case 'workerBusinessProfessionalCategory':
case 'workerBusinessAgreementFk':
case 'workerBusinessAgreementName':
case 'calendarTypeFk':
case 'calendarType':
case 'workcenterFk':
@ -212,6 +233,7 @@ module.exports = Self => {
b.workerFk,
b.started,
b.ended,
b.isHourlyLabor,
b.companyCodeFk,
b.reasonEndFk,
bre.reason,
@ -229,6 +251,8 @@ module.exports = Self => {
py.description payrollDescription,
b.workerBusinessTypeFk,
wt.name workerBusinessTypeName,
b.workerBusinessAgreementFk,
wba.name workerBusinessAgreementName,
b.amount,
b.basicSalary,
b.notes
@ -240,6 +264,7 @@ module.exports = Self => {
JOIN calendarType ct ON ct.id = b.calendarTypeFk
LEFT JOIN workCenter wc ON wc.id = b.workcenterFk
LEFT JOIN payrollCategories py ON py.id = b.workerBusinessCategoryFk
LEFT JOIN workerBusinessAgreement wba ON wba.id = b.workerBusinessAgreementFk
LEFT JOIN workerBusinessType wt ON wt.id = b.workerBusinessTypeFk
) sub
`