salix/modules/client/back/methods/client/clientDebtStatementPdf.js

49 lines
1.3 KiB
JavaScript
Raw Normal View History

2022-10-04 11:41:37 +00:00
module.exports = Self => {
Self.remoteMethodCtx('clientDebtStatementPdf', {
description: 'Returns the client debt statement pdf',
accessType: 'READ',
accepts: [
{
arg: 'id',
type: 'number',
required: true,
description: 'The client id',
http: {source: 'path'}
},
{
arg: 'recipientId',
type: 'number',
description: 'The recipient id',
required: false
},
{
arg: 'from',
type: 'string',
required: true
}
],
returns: [
{
arg: 'body',
type: 'file',
root: true
}, {
arg: 'Content-Type',
type: 'String',
http: {target: 'header'}
}, {
arg: 'Content-Disposition',
type: 'String',
http: {target: 'header'}
}
],
http: {
path: '/:id/client-debt-statement-pdf',
verb: 'GET'
2024-05-15 10:38:30 +00:00
},
accessScopes: ['DEFAULT', 'read:multimedia']
2022-10-04 11:41:37 +00:00
});
2023-03-14 07:17:46 +00:00
Self.clientDebtStatementPdf = (ctx, id) => Self.printReport(ctx, id, 'client-debt-statement');
2022-10-04 11:41:37 +00:00
};