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