Visualizzazione giacenza per depositi dell'utente in riepilogo prodotto rosso gargano
All checks were successful
PVM/pipeline/head This commit looks good
All checks were successful
PVM/pipeline/head This commit looks good
This commit is contained in:
@@ -2131,7 +2131,9 @@ class DeliveryPlan {
|
|||||||
$query
|
$query
|
||||||
= KendoService::queryInitializerService($data, "get-riepiloghi-giorno", "cod_msgr, articolo", false, false);
|
= KendoService::queryInitializerService($data, "get-riepiloghi-giorno", "cod_msgr, articolo", false, false);
|
||||||
|
|
||||||
$query->setDateVar("dataCons", $dataCons);
|
$query
|
||||||
|
->setDateVar("dataCons", $dataCons)
|
||||||
|
->setVar("userName", count(User::get_current_userAllDepos()) > 0 ? User::get_current_username() : null);
|
||||||
|
|
||||||
return $query->execute();
|
return $query->execute();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ WITH Consegne AS (SELECT mtb_aart.cod_msgr,
|
|||||||
Giacenze AS (SELECT cod_mart, SUM(qta_esistente) AS qta_esistente
|
Giacenze AS (SELECT cod_mart, SUM(qta_esistente) AS qta_esistente
|
||||||
FROM giacenzaArticolo
|
FROM giacenzaArticolo
|
||||||
INNER JOIN mtb_depo md ON giacenzaArticolo.cod_mdep = md.cod_mdep
|
INNER JOIN mtb_depo md ON giacenzaArticolo.cod_mdep = md.cod_mdep
|
||||||
|
LEFT OUTER JOIN wtb_depo wd ON md.cod_mdep = wd.cod_mdep AND wd.user_name = '[userName]'
|
||||||
LEFT OUTER JOIN mtb_depo_tipi mdt ON md.flag_tipo_negozio = mdt.cod_tipo_depo
|
LEFT OUTER JOIN mtb_depo_tipi mdt ON md.flag_tipo_negozio = mdt.cod_tipo_depo
|
||||||
WHERE ISNULL(gestisci_colli, 1) = 1
|
WHERE ISNULL(gestisci_colli, 1) = 1
|
||||||
|
AND ('[userName]' IS NULL OR wd.cod_mdep IS NOT NULL)
|
||||||
GROUP BY cod_mart),
|
GROUP BY cod_mart),
|
||||||
TempResult AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS row_number,
|
TempResult AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS row_number,
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user