0 HAVING 2=2 ".$add_having." ORDER BY codice ASC"; $rs = $dbo->fetchArray($query); $totrows = sizeof($rs); $body .= '

INVENTARIO AL '.date('d/m/Y')."

\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; for ($r = 0; $r < sizeof($rs); ++$r) { $body .= "\n"; $body .= " \n"; $body .= " \n"; $body .= " \n"; $body .= " \n"; $body .= " \n"; $body .= " \n"; $body .= "\n"; $totale_qta += $rs[$r]['qta']; $totale_acquisto += ($rs[$r]['prezzo_acquisto'] * $rs[$r]['qta']); } // Totali $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "\n"; $body .= "
CodiceDescrizionePrezzo di venditaQ.tàPrezzo di acquistoValore totale
".$rs[$r]['codice']."".$rs[$r]['descrizione']."".Translator::numberToLocale($rs[$r]['prezzo_vendita'])." €".$rs[$r]['um'].' '.Translator::numberToLocale($rs[$r]['qta'])."".Translator::numberToLocale($rs[$r]['prezzo_acquisto'])." €".Translator::numberToLocale(($rs[$r]['prezzo_acquisto'] * $rs[$r]['qta']))." €
TOTALE:".Translator::numberToLocale($totale_qta)."".Translator::numberToLocale($totale_acquisto)." €
\n"; $report_name = 'inventario.pdf';