From 6868863e542e208df5d63d1e8d2e5a68e7912cf0 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 2 May 2024 10:32:20 +0200 Subject: [PATCH] fix: refs #6602 refactor code --- .../reports/collection-label/collection-label.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index fe32a0e2b..f2f697ae6 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -1,9 +1,7 @@ -const qrCode = require('qrcode'); -const jsBarcode = require('jsbarcode'); - const {DOMImplementation, XMLSerializer} = require('xmldom'); const vnReport = require('../../../core/mixins/vn-report.js'); -const {TRUE} = require('node-sass'); +const {toDataURL} = require('qrcode'); +const jsBarcode = require('jsbarcode'); module.exports = { name: 'collection-label', @@ -50,7 +48,7 @@ module.exports = { table: 'ticket', id: ticketFk }); - return qrCode.toDataURL(QRdata, {margin: 0}); + return toDataURL(QRdata, {margin: 0}); }, getBarcode(id) { const xmlSerializer = new XMLSerializer();