(spediti in data $dataassegno) per tutte le aziende" ; else $titolo = "Situazione Assegni INVIATI" ; } elseif ($spedito == "No") $titolo = "Situazione Assegni DA INVIARE" ; else $titolo = "Situazione assegni" ; } else { /********************************************************** * Recupero il nome dell'azienda **********************************************************/ $db->query("select Nome from fornitori where idfornitori = $fornitore") ; while ($db->next_record()) $azienda = $db->f("Nome") ; if ($spedito == "Si" or $dataassegno != '') { if ($dataassegno != "") $titolo = "Situazione assegni (inviati in data $dataassegno) per l'azienda $azienda" ; else $titolo = "Situazione Assegni INVIATI per l'azienda $azienda" ; } elseif ($spedito == "No") $titolo = "Situazione Assegni DA INVIARE per l'azienda $azienda" ; else $titolo = "Situazione assegni per l'azienda $azienda" ; } /******************* * Nuova query *******************/ /************************* * filtro Num Ordine **************************/ if (isset($ordine) and ($ordine != '')) $where .= " and O.IdOrdini = $ordine" ; /************************* * filtro Numero Fattura **************************/ if (isset($fattura) and ($fattura != '')) $where .= " and O.NumFattura = $fattura" ; /************************* * filtro Data Fattura **************************/ if (isset($datafattura) and ($datafattura != '')) { $selDataFat = MySqlDate($datafattura) ; $where .= " and O.DataSpedFattura = '$selDataFat'" ; } /************************* * filtro Fornitori **************************/ if (isset($fornitore) and ($fornitore != 'tutti')) $where .= " and O.idfornitore = $fornitore" ; /************************* * filtro Clienti **************************/ if (isset($cliente) and ($cliente != 'tutti')) $where .= " and O.idcliente = $cliente" ; /************************* * filtro Banca **************************/ if (isset($banca) and ($banca != '')) $where .= " and O.BancaOrdine like '%$banca%'" ; /************************* * filtro Numero Assegno **************************/ if (isset($assegno) and ($assegno != '')) $where .= " and O.NumAssegno like '%$assegno%'" ; /************************* * filtro Data Fattura **************************/ if (isset($dataassegno) and ($dataassegno != '')) { $selDataAss = MySqlDate($dataassegno) ; $where .= " and O.DataInvAss = '$selDataAss'" ; } /************************* * filtro Spedito **************************/ if (isset($spedito) and ($spedito != 'tutti')) { if ($spedito == 'No') $where .= " and O.DaSpedire = 1" ; else $where .= " and O.DaSpedire = 0" ; } $query = " select O.*, F.nome as NomeFornitore, C.nome as NomeCliente from ordini O, fornitori F, clienti C where O.Anno = $anno and O.bancaordine <> '' and O.idfornitore = F.idfornitori and O.idcliente = C.idclienti $where order by O.idordini " ; $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'] ; ?>




RecuperaDati($query) ; for($i=0; $i<$n; $i++) { if ($dati['DaSpedire'][$i]) $sn = "No" ; else $sn = "Si" ; ?>
al
 
N. Ord N. Fatt Data Fatt Fornitore Cliente Banca N. Assegno Data Invio Ass Importo Spedito?