From 3853fc740490b950e355aaec95b2c207a36432be Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Oct 2019 08:50:11 +0200 Subject: [PATCH 1/3] descuadre de horas #1766 rollback --- .../worker/back/methods/worker-time-control/addTime.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/worker/back/methods/worker-time-control/addTime.js b/modules/worker/back/methods/worker-time-control/addTime.js index 9864142bf..5548654bc 100644 --- a/modules/worker/back/methods/worker-time-control/addTime.js +++ b/modules/worker/back/methods/worker-time-control/addTime.js @@ -33,7 +33,13 @@ module.exports = Self => { const subordinate = await Worker.findById(data.workerFk); - return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [ - subordinate.userFk, null, data.timed, true]); + return Self.create({ + userFk: subordinate.userFk, + timed: data.timed, + manual: 1 + }); + + /* return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [ + subordinate.userFk, null, data.timed, true]); */ }; }; From 2d90af906f50c98a3d5c7d7add91116718714cba Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 15 Oct 2019 09:48:02 +0200 Subject: [PATCH 2/3] #1771 rpt-delivery-note campo tasa con 2 decimales --- print/report/rpt-delivery-note/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/print/report/rpt-delivery-note/index.js b/print/report/rpt-delivery-note/index.js index 08e2e8827..be6bb83c5 100755 --- a/print/report/rpt-delivery-note/index.js +++ b/print/report/rpt-delivery-note/index.js @@ -59,8 +59,8 @@ module.exports = { percent(input) { return new Intl.NumberFormat('es', { style: 'percent', - minimumFractionDigits: 0, - maximumFractionDigits: 0 + minimumFractionDigits: 2, + maximumFractionDigits: 2 }).format(parseFloat(input)); }, date(input) { From 3595524286a5901bc3ccd6d6e7b80fec48d65688 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 15 Oct 2019 13:18:56 +0200 Subject: [PATCH 3/3] #1794 index de balance pierde la companyFk --- modules/client/front/balance/index/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/client/front/balance/index/index.js b/modules/client/front/balance/index/index.js index 9e150f1b5..ad5d8e683 100644 --- a/modules/client/front/balance/index/index.js +++ b/modules/client/front/balance/index/index.js @@ -9,7 +9,7 @@ class Controller { this.$translate = $translate; this.accessToken = vnToken.token; - this.companyFk = vnConfig.companyFk; + this.vnConfig = vnConfig; this.filter = { include: { relation: 'company', @@ -29,6 +29,17 @@ class Controller { }, }; } + + get companyFk() { + if (!this._companyFk) + return this.vnConfig.companyFk; + + return this._companyFk; + } + + set companyFk(id) { + this._companyFk = id; + } setOrder(value) { this.params.params.companyFk = value; this.filter.where.companyFk = value;