Fix stampe Automezzi
This commit is contained in:
parent
ef08d0665d
commit
211e1f279f
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<br><br><span><big><b>CARICO SUGLI AUTOMEZZI IL '.date('d/m/Y', strtotime((string) $dt_carico)).'</b></big></span><br>';
|
<br><br><span><big><b>CARICO SUGLI AUTOMEZZI IL '.date('d/m/Y', strtotime((string) $dt_carico)).'</b></big></span><br>';
|
||||||
|
|
||||||
$targa = '';
|
$targa = '';
|
||||||
$totale_qta = 0.000;
|
$totale_qta = 0.000;
|
||||||
|
@ -11,48 +11,54 @@ if ($rs) {
|
||||||
if ($targa != $rs[$r]['targa']) {
|
if ($targa != $rs[$r]['targa']) {
|
||||||
if ($targa != '') {
|
if ($targa != '') {
|
||||||
echo "
|
echo "
|
||||||
<table cellspacing='0' style='table-layout:fixed;'>
|
<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'>
|
<col width='35'>
|
||||||
<tr>
|
<col width='275'>
|
||||||
<td class='first_cell cell-padded'>".' '."</td>
|
<col width='50'>
|
||||||
<td class='table_cell cell-padded'>".' '."</td>
|
<col width='70'>
|
||||||
<td class='table_cell cell-padded'>".' '."</td>
|
<col width='45'>
|
||||||
<td class='table_cell text-right cell-padded'>".number_format($totale_qta, 3, ',', '.')." kg</td>
|
<col width='65'>
|
||||||
<td class='table_cell text-right cell-padded'>".' '."</td>
|
<col width='65'>
|
||||||
<td class='table_cell text-right cell-padded'>".number_format($totale_ven, 2, ',', '.')." €</td>
|
<tr>
|
||||||
<td class='table_cell cell-padded'>".' '.'</td>
|
<td class='first_cell cell-padded'>".' '."</td>
|
||||||
</tr>
|
<td class='table_cell cell-padded'>".' '."</td>
|
||||||
</table>';
|
<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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<br/>
|
<br/>
|
||||||
<table cellspacing='0' style='table-layout:fixed;'>
|
<table cellspacing='0' style='table-layout:fixed;'>
|
||||||
<col width='150'><col width='250'>
|
<col width='150'><col width='250'>
|
||||||
<tr>
|
<tr>
|
||||||
<th bgcolor='#ffffff' class='full_cell1 cell-padded' width='150'>Targa: ".$rs[$r]['targa']."</th>
|
<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>
|
<th bgcolor='#ffffff' class='full_cell cell-padded' width='250'>Automezzo: ".$rs[$r]['nome'].'</th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<table class='table table-bordered' cellspacing='0' style='table-layout:fixed;'>
|
<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'>
|
<col width='35'><col width='275'><col width='50'><col width='70'><col width='45'><col width='65'><col width='65'>
|
||||||
<tr>
|
<tr>
|
||||||
<th bgcolor='#dddddd' class='full_cell1 cell-padded' width='10%'>Codice</th>
|
<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' >Descrizione</th>
|
||||||
<th bgcolor='#dddddd' class='full_cell cell-padded' width='20%'>Sub.Cat.</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%'>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%'>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%'>Totale</th>
|
||||||
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>Utente</th>
|
<th bgcolor='#dddddd' class='full_cell cell-padded' width='10%'>Utente</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
$targa = $rs[$r]['targa'];
|
$targa = $rs[$r]['targa'];
|
||||||
$totale_qta = 0.000;
|
$totale_qta = 0.000;
|
||||||
$totale_ven = 0.00;
|
$totale_ven = 0.00;
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
<tr>';
|
<tr>';
|
||||||
$qta = number_format($rs[$r]['qta'], 3, ',', '.').' '.$rs[$r]['um'];
|
$qta = number_format($rs[$r]['qta'], 3, ',', '.').' '.$rs[$r]['um'];
|
||||||
|
|
||||||
$prz_vendita = number_format($rs[$r]['prezzo_vendita'], 2);
|
$prz_vendita = number_format($rs[$r]['prezzo_vendita'], 2);
|
||||||
|
@ -60,38 +66,37 @@ if ($rs) {
|
||||||
$totv = number_format($prz_vendita, 2) * $rs[$r]['qta'];
|
$totv = number_format($prz_vendita, 2) * $rs[$r]['qta'];
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<td class='first_cell cell-padded'>".$rs[$r]['codice']."</td>
|
<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]['descrizione']."</td>
|
||||||
<td class='table_cell cell-padded'>".$rs[$r]['subcategoria']."</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'>".$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($prz_vendita, 2, ',', '.')." €</td>
|
||||||
<td class='table_cell text-right cell-padded'>".number_format($totv, 2, ',', '.')." €</td>
|
<td class='table_cell text-right cell-padded'>".number_format($totv, 2, ',', '.')." €</td>
|
||||||
<td class='table_cell cell-padded'>".ucfirst((string) $rs[$r]['username']).'</td>
|
<td class='table_cell cell-padded'>".ucfirst((string) $rs[$r]['username']).'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
$totale_ven = $totale_ven + $totv;
|
$totale_ven = $totale_ven + $totv;
|
||||||
if ($rs[$r]['um'] == 'kg') {
|
if ($rs[$r]['um'] == 'kg') {
|
||||||
$totale_qta = $totale_qta + $rs[$r]['qta'];
|
$totale_qta = $totale_qta + $rs[$r]['qta'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo '
|
||||||
|
</table>';
|
||||||
} else {
|
} else {
|
||||||
echo 'Nessun articolo caricato sugli automezzi il '.date('d/m/Y', strtotime((string) $dt_carico)),'.';
|
echo 'Nessun articolo caricato sugli automezzi il '.date('d/m/Y', strtotime((string) $dt_carico)),'.';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
|
||||||
</table>';
|
|
||||||
|
|
||||||
if ($targa != '') {
|
if ($targa != '') {
|
||||||
echo "
|
echo "
|
||||||
<table cellspacing='0' style='table-layout:fixed;'>
|
<table cellspacing='0' style='table-layout:fixed;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='first_cell cell-padded'>".' '."</td>
|
<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 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'>".number_format($totale_qta, 3, ',', '.')." kg</td>
|
||||||
<td class='table_cell text-right cell-padded'>".' '."</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 text-right cell-padded'>".number_format($totale_ven, 2, ',', '.')." €</td>
|
||||||
<td class='table_cell cell-padded'>".' '.'</td>
|
<td class='table_cell cell-padded'>".' '.'</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>';
|
</table>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ $where = [];
|
||||||
$search_targa = get('search_targa');
|
$search_targa = get('search_targa');
|
||||||
$search_nome = get('search_nome');
|
$search_nome = get('search_nome');
|
||||||
|
|
||||||
$where[] = 'movimenti.qta > 0';
|
$where[] = 'mg_movimenti.qta > 0';
|
||||||
$where[] = 'movimenti.qta > 0';
|
|
||||||
if ($search_targa) {
|
if ($search_targa) {
|
||||||
$where[] = 'an_sedi.targa like '.prepare('%'.$search_targa.'%');
|
$where[] = 'an_sedi.targa like '.prepare('%'.$search_targa.'%');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue