2022-10-17 13:13:27 +00:00
|
|
|
module.exports = Self => {
|
|
|
|
Self.remoteMethodCtx('invoiceInPdf', {
|
2022-11-02 12:55:06 +00:00
|
|
|
description: 'Returns the invoiceIn pdf',
|
2022-10-17 13:13:27 +00:00
|
|
|
accessType: 'READ',
|
|
|
|
accepts: [
|
|
|
|
{
|
|
|
|
arg: 'id',
|
|
|
|
type: 'number',
|
|
|
|
required: true,
|
2022-11-02 12:55:06 +00:00
|
|
|
description: 'The invoiceIn id',
|
2022-10-17 13:13:27 +00:00
|
|
|
http: {source: 'path'}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
returns: [
|
|
|
|
{
|
|
|
|
arg: 'body',
|
|
|
|
type: 'file',
|
|
|
|
root: true
|
|
|
|
}, {
|
|
|
|
arg: 'Content-Type',
|
|
|
|
type: 'String',
|
|
|
|
http: {target: 'header'}
|
|
|
|
}, {
|
|
|
|
arg: 'Content-Disposition',
|
|
|
|
type: 'String',
|
|
|
|
http: {target: 'header'}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
http: {
|
2022-10-24 13:15:23 +00:00
|
|
|
path: '/:id/invoice-in-pdf',
|
2022-10-17 13:13:27 +00:00
|
|
|
verb: 'GET'
|
2024-05-10 12:58:52 +00:00
|
|
|
},
|
|
|
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
2022-10-17 13:13:27 +00:00
|
|
|
});
|
|
|
|
|
2023-03-14 07:17:46 +00:00
|
|
|
Self.invoiceInPdf = (ctx, id) => Self.printReport(ctx, id, 'invoiceIn');
|
2022-10-17 13:13:27 +00:00
|
|
|
};
|