salix/modules/item/back/methods/item-shelving-sale/itemShelvingSaleByCollectio...

24 lines
684 B
JavaScript
Raw Normal View History

module.exports = Self => {
Self.remoteMethod('itemShelvingSaleByCollection', {
description: 'Insert sales of the collection in itemShelvingSale',
accessType: 'WRITE',
accepts: [
{
arg: 'id',
2023-09-28 06:08:40 +00:00
type: 'number',
description: 'The collection id',
2023-09-28 06:08:40 +00:00
required: true,
http: {source: 'path'}
}
],
http: {
path: `/:id/itemShelvingSaleByCollection`,
verb: 'POST'
}
});
Self.itemShelvingSaleByCollection = async id => {
await Self.rawSql(`CALL vn.itemShelvingSale_addByCollection(?)`, [id]);
};
};