delete it.warehouseFk
This commit is contained in:
parent
d7ca5a8247
commit
eaa7658b23
|
@ -201,7 +201,7 @@ module.exports = Self => {
|
|||
LEFT JOIN cache.visible v ON v.item_id = lb.item_id
|
||||
AND v.calc_id = @calc_id
|
||||
JOIN item i ON i.id = lb.item_id
|
||||
JOIN itemType it ON it.id = i.typeFk AND lb.warehouse_id = it.warehouseFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN buy b ON b.id = lb.buy_id
|
||||
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
LEFT JOIN itemType t ON t.id = i.typeFk
|
||||
|
|
|
@ -179,7 +179,7 @@ module.exports = Self => {
|
|||
LEFT JOIN intrastat intr ON intr.id = i.intrastatFk
|
||||
LEFT JOIN producer pr ON pr.id = i.producerFk
|
||||
LEFT JOIN origin ori ON ori.id = i.originFk
|
||||
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_id = it.warehouseFk
|
||||
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id
|
||||
LEFT JOIN buy b ON b.id = lb.buy_id
|
||||
LEFT JOIN entry e ON e.id = b.entryFk
|
||||
LEFT JOIN supplier s ON s.id = e.supplierFk`
|
||||
|
|
Loading…
Reference in New Issue