8144-devToTest_2448 #3216

Merged
alexm merged 256 commits from 8144-devToTest_2448 into test 2024-11-19 07:36:04 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 9c0af7f7c6 - Show all commits

View File

@ -2,7 +2,7 @@ const {Report, Email} = require('vn-print');
module.exports = Self => {
Self.printReport = async function(ctx, id, reportName) {
const args = Object.assign({}, ctx.args);
const args = Object.assign({id}, ctx.args);
const params = {lang: ctx.req.getLocale()};
delete args.ctx;

View File

@ -53,8 +53,7 @@ module.exports = Self => {
if (hasDmsCmr.length)
throw new UserError('This ticket already has a cmr saved');
Object.assign(ctx.args, {id: ticket.$cmrFk});
const response = await models.Cmr.print(ctx, myOptions);
const response = await models.Cmr.print(ctx, ticket.$cmrFk, myOptions);
const pdfStream = Readable.from(Buffer.from(response[0]));
const data = {
workerFk: ctx.req.accessToken.userId,