refs #5513 minor fixes
This commit is contained in:
parent
37b2920157
commit
1fd51c191f
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue