8144-devToTest_2448 #3216
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue