if ($Cliente == "Tutti" and $Fornitore == "Tutti"): ?>
echo $titolo ?>
Ciente:
echo $Cliente ?>
Fornitore:
echo $Fornitore ?>
N. Ord
N. Fatt
Data Fattura
Fornitore
Cliente
Importo
Incassata?
$query = "
select
O.*,
F.nome as NomeFornitore,
C.nome as NomeCliente
from
$tordini O
inner join $tfornitori F on F.idfornitori = O.idfornitore
inner join $tclienti C on C.idclienti = O.idcliente
where
O.dataspedfattura <> '' and
O.dataspedfattura <> '0000-00-00' and
$where
order by
$order_by
" ;
list($n, $d) = $db->RecuperaDati($query) ;
for ($i=0; $i<$n; $i++)
{
?>
echo $d['IdOrdini'][$i] ?>
echo $d['NumFattura'][$i] ?>
echo ItaDate($d['DataSpedFattura'][$i]) ?>
echo $d['NomeFornitore'][$i] ?>
echo $d['NomeCliente'][$i] ?>
echo nfe($d['ImportoFattura'][$i]) ?>
echo SiNo($d['SaldoFattura'][$i]) ?>
}
?>
elseif ($Cliente == "Tutti" and $Fornitore != "Tutti") : ?>
echo $titolo ?>
Fornitore:
echo $Fornitore ?>
N. Ord
N. Fatt
Data Fattura
Cliente
Importo
Imponibile
Incassata?
$totImporto = 0 ;
$totImponibile = 0 ;
$totIncassato = 0 ;
$query = "
select
O.*,
F.nome as NomeFornitore,
C.nome as NomeCliente
from
$tordini O
inner join $tfornitori F on F.idfornitori = O.idfornitore
inner join $tclienti C on C.idclienti = O.idcliente
where
O.dataspedfattura <> '' 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] ;
?>
echo $d['IdOrdini'][$i] ?>
echo $d['NumFattura'][$i] ?>
echo ItaDate($d['DataSpedFattura'][$i]) ?>
echo $d['NomeCliente'][$i] ?>
echo nfe($d['ImportoFattura'][$i]) ?>
echo ($imponibile) ?>
echo SiNo($d['SaldoFattura'][$i]) ?>
}
?>
echo $i ?>
echo nfe($totImporto) ?>
echo nfe($totImponibile) ?>
echo nfe($totIncassato) ?>
elseif ($Cliente != "Tutti" and $Fornitore == "Tutti") : ?>
echo $titolo ?>
Cliente:
echo $Cliente ?>
N. Ord
N. Fatt
Data Fattura
Fornitore
Importo
Imponibile
Incassata?
$totImporto = 0 ;
$totImponibile = 0 ;
$totIncassato = 0 ;
$query = "
select
O.*,
F.nome as NomeFornitore,
C.nome as NomeCliente
from
$tordini O
inner join $tfornitori F on F.idfornitori = O.idfornitore
inner join $tclienti C on C.idclienti = O.idcliente
where
O.dataspedfattura <> '' 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] ;
?>