From b7a369a41c77fa14b05cc25656b775d91ab40678 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 13 Dec 2022 18:05:29 +0100 Subject: [PATCH] refs #4204 Added param URL labelCount and changes in the css --- modules/ticket/back/methods/ticket/collectionLabel.js | 7 ++++++- .../reports/collection-label/assets/css/style.css | 3 ++- .../reports/collection-label/collection-label.html | 6 +++--- .../templates/reports/collection-label/collection-label.js | 5 +++++ .../templates/reports/collection-label/sql/labelsData.sql | 1 - 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/ticket/back/methods/ticket/collectionLabel.js b/modules/ticket/back/methods/ticket/collectionLabel.js index 064ca0210..f63e5d91f 100644 --- a/modules/ticket/back/methods/ticket/collectionLabel.js +++ b/modules/ticket/back/methods/ticket/collectionLabel.js @@ -11,7 +11,12 @@ module.exports = Self => { required: true, description: 'The ticket id', http: {source: 'path'} - }, + }, { + arg: 'labelCount', + type: 'number', + required: true, + description: 'The number of labels' + } ], returns: [ { diff --git a/print/templates/reports/collection-label/assets/css/style.css b/print/templates/reports/collection-label/assets/css/style.css index f92d5bf1e..eb300f850 100644 --- a/print/templates/reports/collection-label/assets/css/style.css +++ b/print/templates/reports/collection-label/assets/css/style.css @@ -13,11 +13,12 @@ html { font-size: 29px; margin-left: -13px; } -.outline { +#outline { border: 1px solid black; padding: 5px; height: 37px; width: 100px; + max-width: 100px; } #nickname { font-size: 22px; diff --git a/print/templates/reports/collection-label/collection-label.html b/print/templates/reports/collection-label/collection-label.html index b7f783a88..0ec05e1cf 100644 --- a/print/templates/reports/collection-label/collection-label.html +++ b/print/templates/reports/collection-label/collection-label.html @@ -12,13 +12,13 @@
- {{labelData.workerCode || '---'}} + {{labelData.workerCode || '---'}} - {{labelData.labelCount || 0}} + {{labelCount || 0}} - {{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}} + {{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}
{{labelData.agencyDescription ? labelData.agencyDescription.toUpperCase() : '---'}}
diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index fd412791b..fdbde49b2 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -11,6 +11,11 @@ module.exports = { type: Number, required: true, description: 'The ticket or collection id' + }, + labelCount: { + type: Number, + required: true, + description: 'The number of labels' } }, async serverPrefetch() { diff --git a/print/templates/reports/collection-label/sql/labelsData.sql b/print/templates/reports/collection-label/sql/labelsData.sql index 9afac79d0..2f82d20ed 100644 --- a/print/templates/reports/collection-label/sql/labelsData.sql +++ b/print/templates/reports/collection-label/sql/labelsData.sql @@ -13,7 +13,6 @@ SELECT c.itemPackingTypeFk code, TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour, DATE_FORMAT(t.shipped, '%d/%m/%y') shipped, t.nickName, - tt.labelCount, COUNT(*) lineCount FROM vn.ticket t JOIN vn.ticketCollection tc ON tc.ticketFk = t.id