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

23 lines
652 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',
type: 'Number',
description: 'The collection id',
http: {source: 'path'}
}
],
http: {
path: `/:id/itemShelvingSaleByCollection`,
verb: 'POST'
}
});
Self.itemShelvingSaleByCollection = async id => {
await Self.rawSql(`CALL vn.itemShelvingSale_addByCollection(?)`, [id]);
};
};