refs #5513 minor fixes

This commit is contained in:
Alexandre Riera 2023-05-30 13:47:09 +02:00
parent 37b2920157
commit 1fd51c191f
1 changed files with 1 additions and 2 deletions

View File

@ -24,7 +24,7 @@ module.exports = Self => {
}
});
Self.getItemsPackaging = async(id, entry) => {
const [result] = await Self.rawSql(`
return Self.rawSql(`
WITH entryTmp AS (
SELECT i.id, SUM(b.quantity) quantity
FROM vn.entry e
@ -46,6 +46,5 @@ module.exports = Self => {
AND b.created > (util.VN_CURDATE() - INTERVAL bc.monthsAgo MONTH)
GROUP BY b.itemFk
ORDER BY et.quantity DESC, quantityTotal DESC`, [entry, id, id]);
return result;
};
};