Esempio n. 1
0
$pdf->setPrintFooter(false);
$pdf->SetAutoPageBreak(1,1);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2)));
$nuw = new numberstowords_it();
//azzero il contatore di effetti
$numefftot = 0;
$passo=100;
$anagrafica = new Anagrafica();
while ($effetto = gaz_dbi_fetch_array($result))
    {
    $client = $anagrafica->getPartner($effetto['clfoco']);
    $banapp = gaz_dbi_get_row($gTables['banapp'],"codice",$effetto['banapp']);
    $banacc = $anagrafica->getPartner($effetto['banacc']);
    $impwords = $nuw->euro2assegno($effetto['impeff']);
    if ($effetto['salacc'] == 'S')
        $salcon = 'a SALDO della Ns. Fattura N. ';
    else    $salcon = 'in CONTO della Ns. Fattura N. ';
    if ($client['pariva'] > 0)
        $cfpiva = 'P.I. '.$client['pariva'];
    elseif (! empty ($client['codfis']))
        $cfpiva = 'C.F. '.$client['codfis'];
    else    $cfpiva = '';
    //formatto le date
    $scadenza = substr($effetto['scaden'],8,2).'-'.substr($effetto['scaden'],5,2).'-'.substr($effetto['scaden'],0,4);
    $datafatt = substr($effetto['datfat'],8,2).'-'.substr($effetto['datfat'],5,2).'-'.substr($effetto['datfat'],0,4);
    if ($numefftot == 3)
        {
        $pdf->AddPage();
        $numefftot = 0;
Esempio n. 2
0
while ($rigo = gaz_dbi_fetch_array($rs_rig)) {
    $totale +=$rigo['prelis'];
    if ($pdf->GetY() <= 185) {
        $pdf->Cell(140,6,$rigo['descri'],0,0,'L');
        $pdf->Cell(20,6,$admin_aziend['curr_name'],0,0,'R');
        $pdf->Cell(30,6,gaz_format_number($rigo['prelis']),0,1,'R');
    } else {
        $pdf->Cell(140,6,$rigo['descri'],0,0,'L');
        $pdf->Cell(20,6,$admin_aziend['curr_name'],0,0,'R');
        $pdf->Cell(30,6,gaz_format_number($rigo['prelis']),0,1,'R');
        $pdf->SetY(277);
        $pdf->Cell(130,12,'>>> --- SEGUE SU PAGINA SUCCESSIVA --- >>>',1,1,'C');
        $pdf->AddPage();
    }
}
$impwords = $nuw->euro2assegno($totale);
$pdf->Cell(190,1,'','B',1);
$pdf->Cell(50,6,'PER UN TOTALE DI',0,0,'L');
$pdf->SetFont('helvetica','',14);
$pdf->Cell(110,6,$impwords,'BTL',0,'R',1);
$pdf->Cell(30,6,gaz_format_number($totale),'BTR',1,'R',1);
$pdf->SetFont('helvetica','',12);
$pdf->MultiCell(190,6,$text2,0,'L',0);
$piede='ad uso interno';
if ($pdf->GetY() <= 133) {
    $pdf->SetY(136);
    $pdf->SetFont('helvetica','',12);
    $pdf->Cell(190,5,$datafirma.' _____________________________________',0,1,'R');
    $pdf->SetFont('helvetica','',8);
    $pdf->Cell(90,4,'Copia '.$descridoc.' ad uso interno',0,0,'R');
    $pdf->Cell(70,4,'firma',0,0,'R');