Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-09-16 07:16:13 +02:00
commit 2e34f1bbe6
2 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,6 @@ class Controller extends Dialog {
} }
}; };
this.getAmountPaid();
this.$http.get(`Clients/findOne`, {filter}) this.$http.get(`Clients/findOne`, {filter})
.then(res => { .then(res => {
this.receipt.email = res.data.email; this.receipt.email = res.data.email;
@ -52,6 +51,7 @@ class Controller extends Dialog {
set companyFk(value) { set companyFk(value) {
this.receipt.companyFk = value; this.receipt.companyFk = value;
this.getAmountPaid();
} }
set description(value) { set description(value) {

View File

@ -53,6 +53,13 @@ module.exports = Self => {
} }
if (!merger._doc) throw new UserError('The entry not have stickers'); 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"`]; return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`];
}; };
}; };