1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 15:22:24 +01:00

Fix stampa inventario

This commit is contained in:
MatteoPistorello 2021-05-28 11:16:53 +02:00
parent 39da07674f
commit 57a08eeac8

View File

@ -43,7 +43,7 @@ $query = Query::getQuery($structure, $where, 0, []);
$query = Modules::replaceAdditionals($id_module, $query);
// Modifiche alla query principale
$query = preg_replace('/ FROM `mg_articoli` /', ' FROM mg_articoli LEFT JOIN (SELECT idarticolo, SUM(qta) AS qta_totale FROM mg_movimenti WHERE data <='.prepare($period_end).' GROUP BY idarticolo) movimenti ON movimenti.idarticolo=mg_articoli.id ', $query);
$query = preg_replace('/FROM `mg_articoli`/', ' FROM mg_articoli LEFT JOIN (SELECT idarticolo, SUM(qta) AS qta_totale FROM mg_movimenti WHERE data <='.prepare($period_end).' GROUP BY idarticolo) movimenti ON movimenti.idarticolo=mg_articoli.id ', $query);
$query = preg_replace('/^SELECT /', 'SELECT mg_articoli.prezzo_acquisto,', $query);
$query = preg_replace('/^SELECT /', 'SELECT mg_articoli.prezzo_vendita,', $query);