From 76001ec022b6e35995872e765f7cc52703c366fe Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 14 Dec 2022 16:15:41 +0100 Subject: [PATCH] refs #4204 labelCount argument not required --- modules/ticket/back/methods/ticket/collectionLabel.js | 2 +- print/templates/reports/collection-label/collection-label.html | 2 +- print/templates/reports/collection-label/collection-label.js | 2 +- print/templates/reports/collection-label/sql/labelsData.sql | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/ticket/collectionLabel.js b/modules/ticket/back/methods/ticket/collectionLabel.js index f63e5d91f..7601961fb 100644 --- a/modules/ticket/back/methods/ticket/collectionLabel.js +++ b/modules/ticket/back/methods/ticket/collectionLabel.js @@ -14,7 +14,7 @@ module.exports = Self => { }, { arg: 'labelCount', type: 'number', - required: true, + required: false, description: 'The number of labels' } ], diff --git a/print/templates/reports/collection-label/collection-label.html b/print/templates/reports/collection-label/collection-label.html index 0ec05e1cf..2fd77079f 100644 --- a/print/templates/reports/collection-label/collection-label.html +++ b/print/templates/reports/collection-label/collection-label.html @@ -15,7 +15,7 @@ {{labelData.workerCode || '---'}} - {{labelCount || 0}} + {{labelCount || labelData.labelCount || 0}} {{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}} diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index fdbde49b2..e73afaeea 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -14,7 +14,7 @@ module.exports = { }, labelCount: { type: Number, - required: true, + required: false, description: 'The number of labels' } }, diff --git a/print/templates/reports/collection-label/sql/labelsData.sql b/print/templates/reports/collection-label/sql/labelsData.sql index 2f82d20ed..1846c6893 100644 --- a/print/templates/reports/collection-label/sql/labelsData.sql +++ b/print/templates/reports/collection-label/sql/labelsData.sql @@ -12,6 +12,7 @@ SELECT c.itemPackingTypeFk code, TIME_FORMAT(t.shipped, '%H:%i') shippedHour, TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour, DATE_FORMAT(t.shipped, '%d/%m/%y') shipped, + tt.labelCount, t.nickName, COUNT(*) lineCount FROM vn.ticket t