refator: parametrizardo con ?
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
537c383cd2
commit
8f54365350
|
@ -203,7 +203,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 = ${userConfig.warehouseFk}
|
||||
JOIN itemType it ON it.id = i.typeFk AND lb.warehouse_id = ?
|
||||
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
|
||||
|
@ -211,7 +211,7 @@ module.exports = Self => {
|
|||
LEFT JOIN origin ori ON ori.id = i.originFk
|
||||
LEFT JOIN entry e ON e.id = b.entryFk AND e.created >= DATE_SUB(? ,INTERVAL 1 YEAR)
|
||||
LEFT JOIN supplier s ON s.id = e.supplierFk`
|
||||
, [date]);
|
||||
, [userConfig.warehouseFk, date]);
|
||||
|
||||
if (ctx.args.tags) {
|
||||
let i = 1;
|
||||
|
|
|
@ -182,11 +182,11 @@ 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 = ${userConfig.warehouseFk}
|
||||
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id AND lb.warehouse_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`
|
||||
);
|
||||
, [userConfig.warehouseFk]);
|
||||
|
||||
if (ctx.args.tags) {
|
||||
let i = 1;
|
||||
|
|
Loading…
Reference in New Issue