From d872f164fda67e1803c538863014c3fc3b6261de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Wed, 27 Nov 2024 14:55:30 +0000 Subject: [PATCH 1/2] Actualizar modules/entry/back/models/entry.js --- modules/entry/back/models/entry.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index 8ca79f531..49c3d2ec3 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -12,6 +12,7 @@ module.exports = Self => { require('../methods/entry/addFromBuy')(Self); require('../methods/entry/buyLabel')(Self); require('../methods/entry/print')(Self); + require('../methods/entry/buyLabelSupplier')(Self); Self.observe('before save', async function(ctx, options) { if (ctx.isNewInstance) return; From 30cc7a49a0f859e9c1d254a3a12d654a9dca045e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Wed, 27 Nov 2024 15:38:50 +0000 Subject: [PATCH 2/2] Actualizar modules/entry/back/methods/entry/print.js --- modules/entry/back/methods/entry/print.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js index 5b9de9a69..b604adce6 100644 --- a/modules/entry/back/methods/entry/print.js +++ b/modules/entry/back/methods/entry/print.js @@ -48,6 +48,7 @@ module.exports = Self => { for (const buy of buys) { if (buy.stickers < 1) continue; ctx.args.id = buy.id; + ctx.args.copies = buy.stickers; const pdfBuffer = await models.Entry.buyLabel(ctx, myOptions); await merger.add(new Uint8Array(pdfBuffer[0])); }