CARICO SUGLI AUTOMEZZI IL '.date('d/m/Y', strtotime((string) $dt_carico)).'
'; $targa = ''; $totale_qta = 0.000; $totale_ven = 0.00; if ($rs) { for ($r = 0; $r < sizeof($rs); ++$r) { if ($targa != $rs[$r]['targa']) { if ($targa != '') { echo "
".' '." ".' '." ".' '." ".number_format($totale_qta, 3, ',', '.')." kg ".' '." ".number_format($totale_ven, 2, ',', '.')." € ".' '.'
'; } echo "
Targa: ".$rs[$r]['targa']." Automezzo: ".$rs[$r]['nome'].'
'; echo " "; $targa = $rs[$r]['targa']; $totale_qta = 0.000; $totale_ven = 0.00; } echo ' '; $qta = number_format($rs[$r]['qta'], 3, ',', '.').' '.$rs[$r]['um']; $prz_vendita = number_format($rs[$r]['prezzo_vendita'], 2); $prz_vendita += ($prz_vendita / 100) * $rs[$r]['iva']; $totv = number_format($prz_vendita, 2) * $rs[$r]['qta']; echo " '; $totale_ven = $totale_ven + $totv; if ($rs[$r]['um'] == 'kg') { $totale_qta = $totale_qta + $rs[$r]['qta']; } } } else { echo 'Nessun articolo caricato sugli automezzi il '.date('d/m/Y', strtotime((string) $dt_carico)),'.'; } echo '
Codice Descrizione Sub.Cat. Quantità P. Ven. Totale Utente
".$rs[$r]['codice']." ".$rs[$r]['descrizione']." ".$rs[$r]['subcategoria']." ".$qta." ".number_format($prz_vendita, 2, ',', '.')." € ".number_format($totv, 2, ',', '.')." € ".ucfirst((string) $rs[$r]['username']).'
'; if ($targa != '') { echo "
".' '." ".' '." ".' '." ".number_format($totale_qta, 3, ',', '.')." kg ".' '." ".number_format($totale_ven, 2, ',', '.')." € ".' '.'
'; }