diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js index c155c3d8b..4d36dda7d 100644 --- a/modules/entry/back/methods/entry/print.js +++ b/modules/entry/back/methods/entry/print.js @@ -53,6 +53,13 @@ module.exports = Self => { } if (!merger._doc) throw new UserError('The entry not have stickers'); + + await Self.rawSql(` + UPDATE buy + SET printedStickers = stickers + WHERE entryFk = ? + `, [id], options); + return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`]; }; };