2023-11-30 12:57:03 +01:00
|
|
|
<?php
|
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo '
|
2023-12-01 17:21:47 +01:00
|
|
|
<br><br><span><big><b>CARICO SUGLI AUTOMEZZI IL '.date('d/m/Y', strtotime($dt_carico)).'</b></big></span><br>';
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
$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 "
|
2023-12-28 14:24:49 +01:00
|
|
|
<table cellspacing='0' style='table-layout:fixed;'>
|
|
|
|
<col width='35'><col width='275'><col width='50'><col width='70'><col width='45'><col width='65'><col width='65'>
|
|
|
|
<tr>
|
|
|
|
<td class='first_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($totale_qta, 3, ',', '.')." kg</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($totale_ven, 2, ',', '.')." €</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '.'</td>
|
|
|
|
</tr>
|
|
|
|
</table>';
|
2024-01-15 15:30:45 +01:00
|
|
|
}
|
2023-12-28 14:24:49 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo "
|
2023-12-28 14:24:49 +01:00
|
|
|
<br/>
|
2023-11-30 12:57:03 +01:00
|
|
|
<table cellspacing='0' style='table-layout:fixed;'>
|
2023-12-28 14:24:49 +01:00
|
|
|
<col width='150'><col width='250'>
|
2023-11-30 12:57:03 +01:00
|
|
|
<tr>
|
2023-12-28 14:24:49 +01:00
|
|
|
<th bgcolor='#ffffff' class='full_cell1 cell-padded' width='150'>Targa: ".$rs[$r]['targa']."</th>
|
|
|
|
<th bgcolor='#ffffff' class='full_cell cell-padded' width='250'>Automezzo: ".$rs[$r]['nome'].'</th>
|
2023-11-30 12:57:03 +01:00
|
|
|
</tr>
|
2023-12-28 14:24:49 +01:00
|
|
|
</table>';
|
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo "
|
2023-12-28 14:24:49 +01:00
|
|
|
<table class='table table-bordered' cellspacing='0' style='table-layout:fixed;'>
|
|
|
|
<col width='35'><col width='275'><col width='50'><col width='70'><col width='45'><col width='65'><col width='65'>
|
|
|
|
<tr>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell1 cell-padded' width='10%'>Codice</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' >Descrizione</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='20%'>Sub.Cat.</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>Quantità</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>P. Ven.</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>Totale</th>
|
|
|
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>Utente</th>
|
|
|
|
</tr>";
|
2024-01-15 15:30:45 +01:00
|
|
|
$targa = $rs[$r]['targa'];
|
|
|
|
$totale_qta = 0.000;
|
|
|
|
$totale_ven = 0.00;
|
|
|
|
}
|
|
|
|
echo '
|
2023-12-28 14:24:49 +01:00
|
|
|
<tr>';
|
2024-01-15 15:30:45 +01:00
|
|
|
$qta = number_format($rs[$r]['qta'], 3, ',', '.').' '.$rs[$r]['um'];
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
$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'];
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo "
|
2023-12-28 14:24:49 +01:00
|
|
|
<td class='first_cell cell-padded'>".$rs[$r]['codice']."</td>
|
|
|
|
<td class='table_cell cell-padded'>".$rs[$r]['descrizione']."</td>
|
|
|
|
<td class='table_cell cell-padded'>".$rs[$r]['subcategoria']."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".$qta."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($prz_vendita, 2, ',', '.')." €</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($totv, 2, ',', '.')." €</td>
|
|
|
|
<td class='table_cell cell-padded'>".ucfirst($rs[$r]['username']).'</td>
|
|
|
|
</tr>';
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
$totale_ven = $totale_ven + $totv;
|
|
|
|
if ($rs[$r]['um'] == 'kg') {
|
|
|
|
$totale_qta = $totale_qta + $rs[$r]['qta'];
|
2023-11-30 12:57:03 +01:00
|
|
|
}
|
|
|
|
}
|
2024-01-15 15:30:45 +01:00
|
|
|
} else {
|
|
|
|
echo 'Nessun articolo caricato sugli automezzi il '.date('d/m/Y', strtotime($dt_carico)),'.';
|
|
|
|
}
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo '
|
2023-12-01 17:21:47 +01:00
|
|
|
</table>';
|
2023-11-30 12:57:03 +01:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
if ($targa != '') {
|
|
|
|
echo "
|
2023-11-30 12:57:03 +01:00
|
|
|
<table cellspacing='0' style='table-layout:fixed;'>
|
|
|
|
<tr>
|
2023-12-01 17:21:47 +01:00
|
|
|
<td class='first_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($totale_qta, 3, ',', '.')." kg</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".' '."</td>
|
|
|
|
<td class='table_cell text-right cell-padded'>".number_format($totale_ven, 2, ',', '.')." €</td>
|
|
|
|
<td class='table_cell cell-padded'>".' '.'</td>
|
2023-11-30 12:57:03 +01:00
|
|
|
</tr>
|
2023-12-01 17:21:47 +01:00
|
|
|
</table>';
|
2024-01-15 15:30:45 +01:00
|
|
|
}
|