From 10d2d4c9c4de6c3642f415cbe93fad694cc7a8fa Mon Sep 17 00:00:00 2001 From: ivanm Date: Tue, 26 Nov 2024 18:01:49 +0100 Subject: [PATCH 1/3] fix: hotfix entry_splitByShelving --- db/routines/vn/procedures/entry_splitByShelving.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/entry_splitByShelving.sql b/db/routines/vn/procedures/entry_splitByShelving.sql index 3201900e6..f5de36098 100644 --- a/db/routines/vn/procedures/entry_splitByShelving.sql +++ b/db/routines/vn/procedures/entry_splitByShelving.sql @@ -23,12 +23,13 @@ BEGIN LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers, bb.stickers buyStickers FROM itemShelving ish + JOIN shelving sh ON sh.id = ish.shelvingFk JOIN (SELECT b.id, b.itemFk, b.stickers FROM buy b WHERE b.entryFk = vFromEntryFk ORDER BY b.stickers DESC LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk - WHERE ish.shelvingFk = vShelvingCode COLLATE utf8_general_ci + WHERE sh.code = vShelvingCode COLLATE utf8_general_ci AND NOT ish.isSplit GROUP BY ish.id; From c550f711c6cc52802f40511612aef21eddfc09e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 26 Nov 2024 17:55:36 +0000 Subject: [PATCH 2/3] Actualizar db/routines/vn/triggers/travel_beforeUpdate.sql --- db/routines/vn/triggers/travel_beforeUpdate.sql | 4 ---- 1 file changed, 4 deletions(-) diff --git a/db/routines/vn/triggers/travel_beforeUpdate.sql b/db/routines/vn/triggers/travel_beforeUpdate.sql index 5a27b43b4..256dd35f8 100644 --- a/db/routines/vn/triggers/travel_beforeUpdate.sql +++ b/db/routines/vn/triggers/travel_beforeUpdate.sql @@ -20,10 +20,6 @@ BEGIN CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk); END IF; - IF NOT (NEW.isRaid <=> OLD.isRaid) OR NOT (NEW.daysInForward <=> OLD.daysInForward) THEN - CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward); - END IF; - IF NOT (NEW.awbFk <=> OLD.awbFk)THEN SELECT COUNT(*) INTO vHasAnyInvoiceBooked FROM travel t From 0afae5c2d62f651abbae46b6313eb09f512a1152 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 27 Nov 2024 10:40:47 +0100 Subject: [PATCH 3/3] fix: refs #7266 Minor changes --- .../reports/buy-label-barcode/buy-label-barcode.html | 12 ++++++------ .../reports/buy-label-barcode/buy-label-barcode.js | 5 ++++- .../reports/buy-label-qr/assets/css/style.css | 3 +++ .../templates/reports/buy-label-qr/buy-label-qr.html | 11 +++++------ print/templates/reports/buy-label-qr/buy-label-qr.js | 5 ++++- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/print/templates/reports/buy-label-barcode/buy-label-barcode.html b/print/templates/reports/buy-label-barcode/buy-label-barcode.html index f14f0b70b..c787942c4 100644 --- a/print/templates/reports/buy-label-barcode/buy-label-barcode.html +++ b/print/templates/reports/buy-label-barcode/buy-label-barcode.html @@ -38,7 +38,7 @@
- {{buy.itemFk}} + {{formatNumber(buy.itemFk)}}
@@ -56,7 +56,7 @@ {{'LAID'}}
- {{buy.entryFk}} + {{formatNumber(buy.entryFk)}}
@@ -73,17 +73,17 @@ - +
- {{buy.buyFk}} + {{formatNumber(buy.buyFk)}}
- +
{{date}}
- +
{{`${buy.labelNum}/${buy.quantity / (packing || buy.packing)}`}}
diff --git a/print/templates/reports/buy-label-barcode/buy-label-barcode.js b/print/templates/reports/buy-label-barcode/buy-label-barcode.js index 8c39a7046..509d9f502 100755 --- a/print/templates/reports/buy-label-barcode/buy-label-barcode.js +++ b/print/templates/reports/buy-label-barcode/buy-label-barcode.js @@ -9,7 +9,7 @@ module.exports = { this.date = Date.vnNew(); this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]); if (!this.buys.length) throw new UserError(`Empty data source`); - this.date = moment(this.date).format('WW/E'); + this.date = moment(this.date).format('WW/DD'); }, methods: { getBarcode(data) { @@ -25,6 +25,9 @@ module.exports = { margin: 0 }); return new XMLSerializer().serializeToString(svgNode); + }, + formatNumber(number) { + return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number); } }, props: { diff --git a/print/templates/reports/buy-label-qr/assets/css/style.css b/print/templates/reports/buy-label-qr/assets/css/style.css index 0e288704b..36db0fdef 100644 --- a/print/templates/reports/buy-label-qr/assets/css/style.css +++ b/print/templates/reports/buy-label-qr/assets/css/style.css @@ -34,6 +34,9 @@ html { background-color: black; color: white; } +.sm-txt { + font-size: 18px; +} .md-txt { font-size: 20px; } diff --git a/print/templates/reports/buy-label-qr/buy-label-qr.html b/print/templates/reports/buy-label-qr/buy-label-qr.html index 00e64b57d..00ede5488 100644 --- a/print/templates/reports/buy-label-qr/buy-label-qr.html +++ b/print/templates/reports/buy-label-qr/buy-label-qr.html @@ -11,8 +11,8 @@ - - {{buy.buyFk}} + + {{formatNumber(buy.buyFk)}} @@ -28,7 +28,7 @@
- {{buy.itemFk}} + {{formatNumber(buy.itemFk)}}
@@ -78,8 +78,7 @@
{{'LAID'}}
-
- {{buy.entryFk}} +
@@ -103,7 +102,7 @@
- Entrada: {{buy.entryFk}} + Entrada: {{formatNumber(buy.entryFk)}}
diff --git a/print/templates/reports/buy-label-qr/buy-label-qr.js b/print/templates/reports/buy-label-qr/buy-label-qr.js index 74470ad6d..614e40816 100755 --- a/print/templates/reports/buy-label-qr/buy-label-qr.js +++ b/print/templates/reports/buy-label-qr/buy-label-qr.js @@ -9,7 +9,7 @@ module.exports = { this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]); if (!this.buys.length) throw new UserError(`Empty data source`); this.qr = await this.getQr(this.buys[0].buyFk); - this.date = moment(this.date).format('WW/E'); + this.date = moment(this.date).format('WW/DD'); }, methods: { getQr(data) { @@ -24,6 +24,9 @@ module.exports = { margin: 0, errorCorrectionLevel: 'L' }); + }, + formatNumber(number) { + return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number); } }, props: {