); $pdf = new Report_template(); $pdf->setVars($admin_aziend,$title); $pdf->setFooterMargin(22); $pdf->setTopMargin(43); $pdf->setRiporti(''); $pdf->AddPage(); $paymov = new Schedule; $paymov->setScheduledPartner($admin_aziend['mascli']); if (sizeof($paymov->Partners) > 0) { $anagrafica = new Anagrafica(); foreach ($paymov->Partners as $p){ $anagrafica = new Anagrafica(); $prt = $anagrafica->getPartner($p); $pdf->SetFont('helvetica','B',10); $pdf->SetFillColor(200,255,200); $pdf->Ln(2); $pdf->Cell(186,5,$prt['ragso1']." ".$prt['ragso2']." tel:".$prt['telefo']." fax:".$prt['fax']." mob:".$prt['cell']." ",1,1,'',1,'',1); $pdf->SetFont('helvetica','',9); $paymov->getPartnerStatus($p,substr($_GET['date'],0,10)); foreach ($paymov->PartnerStatus as $k=>$v){ $pdf->SetTextColor(255,0,0); $pdf->SetFillColor(230,255,230); $pdf->Cell(56,5,"REF: ".$k,1,0,'',1,'',1); $pdf->SetTextColor(0); $pdf->Cell(130,5, $paymov->docData[$k]['descri'].' n.'. $paymov->docData[$k]['numdoc'].'/'. $paymov->docData[$k]['seziva'].' '. $paymov->docData[$k]['datdoc'] ,1,1);
array('lun' => 25,'nam'=>$script_transl['datfat']), array('lun' => 36,'nam'=>$script_transl['amount']) ) ); $aRiportare = array('top'=>array(array('lun' => 166,'nam'=>'da riporto : '), array('lun' => 20,'nam'=>'') ), 'bot'=>array(array('lun' => 166,'nam'=>'a riportare : '), array('lun' => 20,'nam'=>'') ) ); $pdf = new Report_template(); $pdf->setVars($admin_aziend,$title); $pdf->setFooterMargin(22); $pdf->setTopMargin(43); $pdf->SetFillColor(160, 255,220 ); $pdf->setRiporti(''); $pdf->AddPage(); $config = new Config; $paymov = new Schedule; $ctrl_pm=0; $pdf->SetFont('helvetica','',10); $pdf->Cell(100,6,$d['d'][1]['descri'],1,1,'L',1,'',1); while (list($k, $mv) = each($d['d'])) { if ($ctrl_pm <> $mv["id_tesdoc_ref"]){ } $pdf->Cell(30,6,$mv['id_tesdoc_ref'],'LTB',0,'L',0,'',1); $pdf->Cell(70,6,$mv['t']['descri'],1,0,'L',0,'',1); $pdf->Cell(25,6,$mv['t']["numdoc"].'/'.$mv['t']['seziva'],1,0,'C',0); $pdf->Cell(25,6,gaz_format_date($mv['t']["datdoc"]),1,0,'C',0);
$pdf->Cell(18,4,$scadenza,'LR',0,'L'); $pdf->Cell(18,4,$emission,'R',0,'L'); $pdf->Cell(100,4,$cliente["indspe"].' '.sprintf("%05d",$cliente["capspe"]).' '.$cliente["citspe"].' ('.$cliente["prospe"].') P.IVA '.$cliente["pariva"],0,0,'L'); $pdf->Cell(30,4,'CAB '.$banapp["codcab"],'R',0,'R'); $pdf->Cell(24,4,'','R',1,'R'); $pdf->Cell(18,4,'','LRB',0,'L'); $pdf->Cell(18,4,$saldoacco,'RB',0,'R'); $pdf->Cell(80,4,'Fatt.n.'.$a_row["numfat"].' del '.$datafatt,'B',0,'L'); $pdf->Cell(20,4,'','B'); $pdf->Cell(30,4,$banapp["descri"],'RB',0,'R'); $aRiportare['top'][1]['nam'] = gaz_format_number($totaletipo); $aRiportare['bot'][1]['nam'] = gaz_format_number($totaletipo); $pdf->setRiporti($aRiportare); $pdf->Cell(24,4,gaz_format_number($a_row["impeff"]),'RB',1,'R'); //aggiorno il db solo se non è una ristampa if ($a_row["status"] <> 'DISTINTATO') { gaz_dbi_put_row($gTables['effett'], "id_tes",$a_row["id_tes"],"status",'DISTINTATO'); gaz_dbi_put_row($gTables['effett'], "id_tes",$a_row["id_tes"],"banacc",$_GET['ba']); } $ctrltipo = $a_row["tipeff"]; } $pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2))); $pdf->setRiporti(); $pdf->Cell(190,4,$totnumtipo.' '.$descreff.' per un totale di € '.gaz_format_number($totaletipo),1,1,'R',1); $pdf->SetFont('helvetica','B',12); $pdf->Cell(80); $pdf->Cell(80,10,'TOTALE DEGLI EFFETTI VERSATI € ',1,0,'L'); $pdf->Cell(30,10,gaz_format_number($totaleff),1,1,'R',1); $pdf->Output(); ?>
$pdf->AddPage(); $result = gaz_dbi_dyn_query($gTables['assist'].".*, ".$gTables['anagra'].".ragso1, ".$gTables['anagra'].".ragso2, ".$gTables['anagra'].".telefo, ".$gTables['anagra'].".fax, ".$gTables['anagra'].".cell, ".$gTables['anagra'].".e_mail ", $gTables['assist']. " LEFT JOIN ".$gTables['clfoco']." ON ".$gTables['assist'].".clfoco = ".$gTables['clfoco'].".codice". " LEFT JOIN ".$gTables['anagra'].' ON '.$gTables['clfoco'].'.id_anagra = '.$gTables['anagra'].'.id', $where, "clfoco, DATA ASC", $limit, $passo); $totale_ore = -1; while ($row = gaz_dbi_fetch_array($result)) { if ( $row["ragso1"] != $vrag ) { $pdf->SetFont('helvetica','B',10); $pdf->SetFillColor(255,255,255); if ( $totale_ore != -1 ) { $pdf->Cell(158,5,'Totale Ore :','LTB',0,'R',1,'',1); $pdf->Cell(12,5,gaz_format_number($totale_ore),1,1,'R',1); } $totale_ore ++; //$pdf->SetFont('helvetica','B',10); //$pdf->SetFillColor(255,255,255); $pdf->Ln(2); if ( $row['fax'] != "" ) $fax = "fax: ".$row['fax']; else $fax = ""; if ( $row['cell'] != "" ) $mob = "mob:".$row['cell']; else $mob = ""; if ( $row['telefo'] != "" ) $tel = "tel:".$row['telefo'];