2022-10-28 12:49:22 +00:00
|
|
|
module.exports = Self => {
|
2022-11-02 14:54:23 +00:00
|
|
|
Self.remoteMethodCtx('balanceCompensationPdf', {
|
2022-10-28 12:49:22 +00:00
|
|
|
description: 'Returns the the debit balances compensation pdf',
|
|
|
|
accessType: 'READ',
|
|
|
|
accepts: [
|
|
|
|
{
|
|
|
|
arg: 'id',
|
|
|
|
type: 'number',
|
|
|
|
required: true,
|
|
|
|
description: 'The receipt id',
|
2023-03-13 14:05:19 +00:00
|
|
|
http: {source: 'path'}
|
2022-10-28 12:49:22 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
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-11-02 14:54:23 +00:00
|
|
|
path: '/:id/balance-compensation-pdf',
|
2022-10-28 12:49:22 +00:00
|
|
|
verb: 'GET'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-03-13 14:05:19 +00:00
|
|
|
Self.balanceCompensationPdf = (ctx, id) => Self.sendPdf(ctx, id, 'balance-compensation');
|
2022-10-28 12:49:22 +00:00
|
|
|
};
|