diff --git a/db/versions/11165-grayAralia/00-firstScript.sql b/db/versions/11165-grayAralia/00-firstScript.sql new file mode 100644 index 000000000..652b2343a --- /dev/null +++ b/db/versions/11165-grayAralia/00-firstScript.sql @@ -0,0 +1,3 @@ +ALTER TABLE vn.productionConfig + DROP COLUMN scannableCodeType, + DROP COLUMN scannablePreviusCodeType; diff --git a/print/templates/reports/collection-label/collection-label.html b/print/templates/reports/collection-label/collection-label.html index 65709ead0..1f57fc3d9 100644 --- a/print/templates/reports/collection-label/collection-label.html +++ b/print/templates/reports/collection-label/collection-label.html @@ -10,14 +10,10 @@ {{dashIfEmpty(labelData.shipped)}} - + {{dashIfEmpty(labelData.workerCode)}} - -
- {{dashIfEmpty(labelData.workerCode)}} - {{labelCount || labelData.labelCount || 0}} diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index f2f697ae6..4aeaca854 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -1,7 +1,5 @@ -const {DOMImplementation, XMLSerializer} = require('xmldom'); const vnReport = require('../../../core/mixins/vn-report.js'); const {toDataURL} = require('qrcode'); -const jsBarcode = require('jsbarcode'); module.exports = { name: 'collection-label', @@ -30,11 +28,8 @@ module.exports = { const labels = await this.rawSqlFromDef('labelsData', [ticketIds]); - const [{scannableCodeType}] = await this.rawSqlFromDef('barcodeType'); - if (scannableCodeType === 'qr') { - for (const labelData of labels) - labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk); - } + for (const labelData of labels) + labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk); this.labelsData = labels; this.checkMainEntity(this.labelsData); @@ -50,20 +45,6 @@ module.exports = { }); return toDataURL(QRdata, {margin: 0}); }, - getBarcode(id) { - const xmlSerializer = new XMLSerializer(); - const document = new DOMImplementation().createDocument('http://www.w3.org/1999/xhtml', 'html', null); - const svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - - jsBarcode(svgNode, id, { - xmlDocument: document, - format: 'code128', - displayValue: false, - width: 3.8, - height: 115, - }); - return xmlSerializer.serializeToString(svgNode); - }, getVertical(labelData) { let value; if (labelData.collectionFk) { diff --git a/print/templates/reports/collection-label/sql/barcodeType.sql b/print/templates/reports/collection-label/sql/barcodeType.sql deleted file mode 100644 index 0700c95a2..000000000 --- a/print/templates/reports/collection-label/sql/barcodeType.sql +++ /dev/null @@ -1,3 +0,0 @@ -SELECT scannableCodeType - FROM productionConfig - LIMIT 1 \ No newline at end of file