grouping and packing added
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-02-25 13:40:53 +01:00
parent 0be9458672
commit 8a137e7713
1 changed files with 5 additions and 2 deletions

View File

@ -75,7 +75,8 @@ module.exports = Self => {
t.name type, u.id userId, t.name type, u.id userId,
intr.description AS intrastat, i.stems, intr.description AS intrastat, i.stems,
ori.code AS origin, t.name AS type, ori.code AS origin, t.name AS type,
ic.name AS category, i.density, tc.description AS taxClass ic.name AS category, i.density, tc.description AS taxClass,
b.grouping, b.packing
FROM item i FROM item i
JOIN itemType t ON t.id = i.typeFk JOIN itemType t ON t.id = i.typeFk
LEFT JOIN itemCategory ic ON ic.id = t.categoryFk LEFT JOIN itemCategory ic ON ic.id = t.categoryFk
@ -84,7 +85,9 @@ module.exports = Self => {
LEFT JOIN intrastat intr ON intr.id = i.intrastatFk LEFT JOIN intrastat intr ON intr.id = i.intrastatFk
LEFT JOIN producer pr ON pr.id = i.producerFk LEFT JOIN producer pr ON pr.id = i.producerFk
LEFT JOIN origin ori ON ori.id = i.originFk LEFT JOIN origin ori ON ori.id = i.originFk
LEFT JOIN taxClass tc ON tc.id = i.taxClassFk` LEFT JOIN taxClass tc ON tc.id = i.taxClassFk
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = t.warehouseFk
LEFT JOIN vn.buy b ON b.id = lb.buy_id`
); );
if (ctx.args.tags) { if (ctx.args.tags) {