37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
module.exports = Self => {
|
|
Self.remoteMethodCtx('balanceCompensationPdf', {
|
|
description: 'Returns the the debit balances compensation pdf',
|
|
accessType: 'READ',
|
|
accepts: [
|
|
{
|
|
arg: 'id',
|
|
type: 'number',
|
|
required: true,
|
|
description: 'The receipt id',
|
|
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: {
|
|
path: '/:id/balance-compensation-pdf',
|
|
verb: 'GET'
|
|
}
|
|
});
|
|
|
|
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
|
};
|