query("select * from $tfornitori where idfornitori = $selFor") ; while ($db->next_record()) $nomefor = $db->f("Nome") ; $Fornitore = "$nomefor" ; } /************************* * filtro Clienti **************************/ if (isset($selCli) and ($selCli != 'tutti') and ($selCli != '')) { $where .= " and O.idcliente = $selCli" ; $db->query("select * from $tclienti where idclienti = $selCli") ; while ($db->next_record()) $nomecli = $db->f("Nome") ; $Cliente = "$nomecli" ; } /************************* * filtro Inaccasate **************************/ if (isset($selInc) and ($selInc != 'tutti') and ($selInc != '')) $where .= " and O.SaldoFattura = $selInc" ; /*************************************** * controllo la colonna da ordinare ***************************************/ switch($ordinaper) { case 0: // numero ordine $order_by = "O.idordini $direction" ; break ; case 1: // numero fattura $order_by = "O.NumFattura $direction, O.idordini" ; break ; case 2: // data fattura $order_by = "O.DataSpedFattura $direction, O.NumFattura" ; break ; case 3: // fornitore $order_by = "F.Nome $direction, O.NumFattura" ; break ; case 4: // cliente $order_by = "C.Nome $direction, O.NumFattura" ; break ; case 5: // importo fattura $order_by = "O.ImportoFattura $direction, O.NumFattura" ; break ; case 6: // fattura incassata? $order_by = "O.SaldoFattura $direction, O.NumFattura" ; break ; } $arrParGen = array() ; $arrParGen = RecuperaParametriGenerali($arrParGen, $tparametri) ; $nome = $arrParGen['NomeAgenzia'] ; $sede = "Sede operativa: " . $arrParGen['IndirizzoAgenzia'] ; $datisede = "Telefono: " . $arrParGen['TelefonoAgenzia'] . " Fax: " . $arrParGen['FaxAgenzia'] . " -- P.I. " . $arrParGen['PartitaIvaAgenzia'] ; $emailsede = "Email: " . $arrParGen['MailAgenzia'] ; ?> <? echo TITLE ?>




Ciente:
Fornitore:
'' and O.dataspedfattura <> '0000-00-00' and $where order by $order_by " ; list($n, $d) = $db->RecuperaDati($query) ; for ($i=0; $i<$n; $i++) { ?>
N. Ord N. Fatt Data Fattura Fornitore Cliente Importo Incassata?
Fornitore:
'' and O.dataspedfattura <> '0000-00-00' and O.NumFattura <> '9999' and $where order by $order_by " ; list($n, $d) = $db->RecuperaDati($query) ; for ($i=0; $i<$n; $i++) { $totImporto += $d['ImportoFattura'][$i] ; $imponibile = nfe((100 * $d['ImportoFattura'][$i]) / 120) ; $totImponibile += ((100 * $d['ImportoFattura'][$i]) / 120) ; if ($d['SaldoFattura'][$i]) $totIncassato += $d['ImportoFattura'][$i] ; ?>
N. Ord N. Fatt Data Fattura Cliente Importo Imponibile Incassata?
 
   
Cliente:
'' and O.dataspedfattura <> '0000-00-00' and O.NumFattura <> '9999' and $where order by $order_by " ; list($n, $d) = $db->RecuperaDati($query) ; for ($i=0; $i<$n; $i++) { $totImporto += $d['ImportoFattura'][$i] ; $imponibile = nfe((100 * $d['ImportoFattura'][$i]) / 120) ; $totImponibile += ((100 * $d['ImportoFattura'][$i]) / 120) ; if ($d['SaldoFattura'][$i]) $totIncassato += $d['ImportoFattura'][$i] ; ?>
N. Ord N. Fatt Data Fattura Fornitore Importo Imponibile Incassata?