SetY(-15); $this->SetFont('Helvetica','I',6); $this->Cell(190,3,'JB-Transport.de - Bautzner Str. 67 - 04347 Leipzig ***** Interne Liste - NON Public ***** by. F. Teichert ©2012','1','0','C','1'); } } $pdf = new PDF('P','mm','A4'); $pdf->AddPage(); // blau (0,160,230) // Orange (240,150, 0) // grau (200,200,200) $pdf->SetFont('Helvetica','B',12); $pdf->Image('jb_logo.png', 0, 5,230,30); $pdf->Write(20,"\n\n"); $pdf->SetFont('Helvetica','BU',7); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255); $pdf->Cell(110,3,"JB-Transport - Bautzner Str. 76 - 04347 Leipzig",'0','1','L','1'); $pdf->SetFont(''); $pdf->Cell(110,3," ",'0','1','L','1'); $adr = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$firma."'"); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255); $pdf->Cell(110,5,utf8_decode($adr['a1']),'0','1','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a2']),'0','1','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a3']),'0','1','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a4']),'0','1','L','1'); $pdf->Write(8,"\n"); $pdf->SetFont('Helvetica','BI',16); $pdf->Cell(110,8,"Monatsbericht ".($monat)."/".($jahr),'0','1','L','1'); $pdf->SetFont(''); $pdf->Write(4,"\n"); $pdf->SetFont('Courier','B',10); $pdf->SetFont(''); //--------------- neu 1. touren auslesen zu arbeitgeber , danach mit option die tourenliste $keyfirma=0; $keytour=0; $firmapreis=0; $tourmenge=0; $abnahme=0; $firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$firma."' ORDER BY typ"); while($rowfirma = $firmatouren->fetch_assoc()) { // $tour1[$keytour]['id']=$rowfirma['id']; // $tour1[$keytour]['tour']=$rowfirma['tour']; // $tour1[$keytour]['infotitel']=$rowfirma['infotitel']; // $tour1[$keytour]['preis']=$rowfirma['preis']; unset($row2); unset($tourx); $tourmenge=0; $keytour++; //----- $tourx = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND tour='".$rowfirma['id']."' and typ!=19 ORDER BY time"); $key=0; //auswertung pro tour while($row2 = $tourx->fetch_assoc()) { $tourmenge++; $tourpreis=$tourpreis+$rowfirma['preis']; $firmapreis=$firmapreis+$rowfirma['preis']; if($row2['gewicht']>$adr['kggrenze']) { $abnahme++; } $autodrei=$adr['kggrenze']*2; if($row2['gewicht']>$autodrei) { $abnahme++; } } //------ pdf ausgabe if($tourmenge>0) { $pdf->SetFont('Courier','B',10); $pdf->SetFont(''); $pdf->Cell(10,4,($tourmenge)." ",'0','0','R','1'); $pdf->Cell(7,4," x "." ",'0','0','L','1'); $pdf->Cell(28,4,utf8_decode($rowfirma['tour']),'0','0','L','1'); $pdf->Cell(90,4,utf8_decode($rowfirma['infotitel']),'0','1','L','1'); if($abnahme>0) { $pdf->Cell(10,4,($abnahme)." ",'0','0','R','1'); $pdf->Cell(7,4," x "." ",'0','0','L','1'); $pdf->Cell(28,4,utf8_decode("A-".$rowfirma['tour']),'0','0','L','1'); $pdf->Cell(90,4,utf8_decode("zusätzliches Fahrzeug"),'0','1','L','1'); $abnahme=0; } } $tourpreis=0; $tourmenge=0; } //--------- $pdf->Output('re_uebersicht_'.($datum).'.pdf','I'); exit(); //--------- $pdf->Output('re_uebersicht_'.($datum).'.pdf','I');