From 434c3ac2f93e9798304872753bc36689858fc73a Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 28 Feb 2025 10:32:16 +0100 Subject: [PATCH] fix: refs #6553 workerBusiness v3 --- .../back/methods/worker/getWorkerBusiness.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/worker/back/methods/worker/getWorkerBusiness.js b/modules/worker/back/methods/worker/getWorkerBusiness.js index cefde70085..34b4054ad9 100644 --- a/modules/worker/back/methods/worker/getWorkerBusiness.js +++ b/modules/worker/back/methods/worker/getWorkerBusiness.js @@ -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 ` -- 2.40.1