gest366/modules/articoli/widgets/articoli.dashboard.php

23 lines
823 B
PHP
Raw Permalink Normal View History

2021-02-24 20:40:04 +00:00
<?php
include_once(__DIR__."/../../../core.php");
$rs = $dbo->fetchArray("SELECT id, descrizione, qta, threshold_qta, um AS unitamisura FROM mg_articoli WHERE qta < threshold_qta AND attivo=1 ORDER BY qta ASC");
$n_articoli = sizeof($rs);
if( sizeof($rs)>0 ){
echo "<table class=\"table table-hover table-striped\">\n";
echo "<tr><th width='80%'>"._("Articolo")."</th>\n";
echo "<th width='20%'>Q.t&agrave;</th></tr>\n";
for( $i=0; $i<sizeof($rs); $i++ ){
echo "<tr><td><a href='".$rootdir."/editor.php?id_module=".$modules_info['Articoli']['id']."&id_record=".$rs[$i]['id']."'>".$rs[$i]['descrizione']."</a></td>\n";
echo "<td><big>".$rs[$i]['qta']." ".$rs[$i]['unitamisura']."</big></td></tr>\n";
}
echo "</table>\n";
}
else{
echo "<p>Non ci sono articoli in esaurimento.</p>\n";
}
?>