diff --git a/db/versions/10991-greenAsparagus/00-firstScript.sql b/db/versions/10991-greenAsparagus/00-firstScript.sql
new file mode 100644
index 0000000000..9cfc9e19d8
--- /dev/null
+++ b/db/versions/10991-greenAsparagus/00-firstScript.sql
@@ -0,0 +1,2 @@
+ALTER TABLE vn.productionConfig MODIFY COLUMN id INT(10) UNSIGNED FIRST;
+ALTER TABLE vn.productionConfig ADD scannableCodeType enum('qr','barcode') DEFAULT 'barcode' NOT NULL;
diff --git a/print/templates/reports/collection-label/collection-label.html b/print/templates/reports/collection-label/collection-label.html
index a0bfcad0ee..f313fccc4d 100644
--- a/print/templates/reports/collection-label/collection-label.html
+++ b/print/templates/reports/collection-label/collection-label.html
@@ -10,7 +10,11 @@
{{labelData.shipped || '---'}} |
-
+
+ |
+ {{labelData.workerCode || '---'}} |
+
+
|
{{labelData.workerCode || '---'}} |
diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js
index db2adeb34a..faf6792f9b 100644
--- a/print/templates/reports/collection-label/collection-label.js
+++ b/print/templates/reports/collection-label/collection-label.js
@@ -1,4 +1,6 @@
-const jsBarcode = require('jsbarcode');
+import qrcode from 'qrcode';
+import jsBarcode from 'jsbarcode';
+
const {DOMImplementation, XMLSerializer} = require('xmldom');
const vnReport = require('../../../core/mixins/vn-report.js');
@@ -31,6 +33,16 @@ module.exports = {
this.checkMainEntity(this.labelsData);
},
methods: {
+ getQR(id) {
+ let QRdata = JSON.stringify({
+ company: 'vnl',
+ user: this.userFk,
+ created: Date.vnNew(),
+ table: 'ticket',
+ id
+ });
+ return qrcode.toDataURL(QRdata, {margin: 0});
+ },
getBarcode(id) {
const xmlSerializer = new XMLSerializer();
const document = new DOMImplementation().createDocument('http://www.w3.org/1999/xhtml', 'html', null);
diff --git a/print/templates/reports/collection-label/sql/labelsData.sql b/print/templates/reports/collection-label/sql/labelsData.sql
index 61990812d6..a83381b1f2 100644
--- a/print/templates/reports/collection-label/sql/labelsData.sql
+++ b/print/templates/reports/collection-label/sql/labelsData.sql
@@ -17,7 +17,8 @@ SELECT c.itemPackingTypeFk code,
tt.labelCount,
t.nickName,
SUM(IF(sgd.id IS NULL, 1, 0)) + IF(sgd.id , 1, 0) lineCount,
- rm.routeFk
+ rm.routeFk,
+ pc.scannableCodeType
FROM vn.ticket t
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
JOIN vn.collection c ON c.id = tc.collectionFk