View Revisions: Issue #1581
Summary | 0001581: Informe alertas Stock no saca productos con stock 0 | ||
---|---|---|---|
Revision | 2022-05-26 13:11 by hpuig | ||
Description | Solucion: cambiar la consulta SQL por: SELECT p.ref ref, e.ref almacen, p.seuil_stock_alerte alerta_stock, IF(w.reel, w.reel, 0) stock, e.rowid rowid, p.rowid prodid FROM llx_product p LEFT JOIN llx_product_stock w ON w.fk_product = p.rowid LEFT JOIN llx_entrepot e ON w.fk_entrepot = e.rowid WHERE 1 = 1 AND p.entity=1 AND (p.seuil_stock_alerte>w.reel OR (w.reel is null AND p.seuil_stock_alerte > 0)) ORDER BY p.ref ASC; |
||
Revision | 2022-05-12 18:06 by jmenent | ||
Description | Solucion: cambiar la consulta SQL por: SELECT p.ref ref, e.ref almacen, p.seuil_stock_alerte alerta_stock, w.reel stock, e.rowid rowid, p.rowid prodid FROM llx_product p LEFT JOIN llx_product_stock w ON w.fk_product = p.rowid LEFT JOIN llx_entrepot e ON w.fk_entrepot = e.rowid WHERE 1 = 1 AND p.entity=1 AND (p.seuil_stock_alerte>w.reel OR (w.reel is null AND p.seuil_stock_alerte > 0)) ORDER BY p.ref ASC; |