fix: refs #7644 Update in print method #2961

Merged
guillermo merged 2 commits from 7644-updateInPrint into master 2024-09-16 05:11:46 +00:00
1 changed files with 7 additions and 0 deletions

View File

@ -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], myOptions);
return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`];
};
};