$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
     $height = 12;
     $pdf->AddPage();
     $pdf->SetFillColor(255, 255, 255);
     $pdf->SetFont('Arial', '', 7);
     $subtot = array();
     foreach ($dtKary as $lstKary) {
         $noe += 1;
         $pdf->Cell(3 / 100 * $width, $height, $noe, 1, 0, 'C', 1);
         $pdf->Cell(13 / 100 * $width, $height, $optNmKar[$lstKary], 1, 0, 'L', 1);
         $pdf->Cell(7 / 100 * $width, $height, $optTipe[$optTipeId[$lstKary]], 1, 0, 'C', 1);
         $pdf->Cell(10 / 100 * $width, $height, number_format($dtGaji[$lstKary], 0), 1, 0, 'R', 1);
         $totGaji += $dtGaji[$lstKary];
         foreach ($test as $barisTgl => $isiTgl) {
             $pdf->Cell(1.5 / 100 * $width, $height, $dtAbsens[$lstKary][$isiTgl], 1, 0, 'C', 1);
             $akhirX = $pdf->GetX();
         }
         foreach ($klmpkAbsn as $brsKet => $hslKet) {
             $pdf->Cell(2 / 100 * $width, $height, $brt[$lstKary][$hslKet['kodeabsen']], 1, 0, 'C', 1);
             $subtot[$lstKary]['total'] += $brt[$lstKary][$hslKet['kodeabsen']];
         }
         $pdf->Cell(5 / 100 * $width, $height, $subtot[$lstKary]['total'], 1, 1, 'R', 1);
     }
     $pdf->Output();
     break;
 case 'excel':
     //echo "warning:".$strx;
     //=================================================
     $tab .= "Print Time:" . date('Y-m-d H:i:s') . "<br>By:" . $_SESSION['empl']['name'];
     $dt = date("His");
     $nop_ = "daftar_remise_" . $dt;
Beispiel #2
0
 /**
  * PDF image renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
     // Check for a pagebreak first
     if ($pdf->checkPageBreakPDF($this->height + 5)) {
         $this->y = $pdf->GetY();
     }
     $curx = $pdf->GetX();
     // If current position (left)set "."
     if ($this->x == ".") {
         $this->x = $pdf->GetX();
     } else {
         $this->x = $pdf->addMarginX($this->x);
         $pdf->SetX($curx);
     }
     if ($this->y == ".") {
         //-- first check for a collision with the last picture
         if (isset($lastpicbottom)) {
             if ($pdf->PageNo() == $lastpicpage && $lastpicbottom >= $pdf->GetY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) {
                 $pdf->SetY($lastpicbottom + 5);
             }
         }
         $this->y = $pdf->GetY();
     } else {
         $pdf->SetY($this->y);
     }
     if ($pdf->getRTL()) {
         $pdf->Image($this->file, $pdf->getPageWidth() - $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
     } else {
         $pdf->Image($this->file, $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
     }
     $lastpicpage = $pdf->PageNo();
     $pdf->lastpicpage = $pdf->getPage();
     $lastpicleft = $this->x;
     $lastpicright = $this->x + $this->width;
     $lastpicbottom = $this->y + $this->height;
     // Setup for the next line
     if ($this->line == "N") {
         $pdf->SetY($lastpicbottom);
     }
 }
Beispiel #3
0
 /**
  * PDF line renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     if ($this->x1 == ".") {
         $this->x1 = $pdf->GetX();
     }
     if ($this->y1 == ".") {
         $this->y1 = $pdf->GetY();
     }
     if ($this->x2 == ".") {
         $this->x2 = $pdf->getMaxLineWidth();
     }
     if ($this->y2 == ".") {
         $this->y2 = $pdf->GetY();
     }
     if ($pdf->getRTL()) {
         $pdf->Line($pdf->getPageWidth() - $this->x1, $this->y1, $pdf->getPageWidth() - $this->x2, $this->y2);
     } else {
         $pdf->Line($this->x1, $this->y1, $this->x2, $this->y2);
     }
 }
Beispiel #4
0
 }
 if (!is_null($row['ta_Email']) && $row['ta_Email'] != '') {
     $contatti .= $row['ta_Email'] . '  ';
 }
 $pdf->Cell(135, 6, ' ' . $contatti, 1, 1);
 $pdf->Cell(40, 6, 'Tutor scolastico ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' prof. ' . utf8_decode($row['TUT_Nome']) . ' ' . utf8_decode($row['TUT_Cognome']), 1, 1);
 $pdf->Cell(40, 6, 'Contatti ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' ' . $row['TUT_Cellulare'] . '  ' . $row['TUT_Email'], 1, 1);
 /*	$pdf->Cell(40,12,'Applicazione competenze ',1,0,'R',1);
 		$pdf->MultiCell(135,4,' '.utf8_decode($row['STA_Compito']),1,1);*/
 $pdf->Ln(3);
 $pdf->SetFont('abac', '', 11);
 $pdf->Cell(0, 8, "Polizze assicurative", 0, 2);
 $pdf->SetFont('abalc', '', 9);
 $pdf->Rect($pdf->GetX() + 6, $pdf->GetY(), 169, 8);
 $pdf->Cell(6);
 $pdf->Cell(0, 4, "INAIL Codice PAT n. " . $rsmeucci['INAIL_Pat'] . " - Infortuni sul lavoro Polizza n. " . $rsmeucci['ASS_Infortuni'], 0, 2);
 $pdf->Cell(0, 4, "Responsabilità civile Polizza n. " . $rsmeucci['ASS_RespCivile'] . " (Compagnia assicurativa " . $rsmeucci['ASS_Compagnia'] . ")");
 $pdf->Ln(5);
 $pdf->SetFont('abac', '', 11);
 $pdf->Cell(0, 8, "Obiettivi e modalità del Tirocinio", 0, 2);
 $pdf->SetFont('abalc', '', 9);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Orientamento: Prendere coscienza delle abilità specifiche necessarie all'inserimento in un settore produttivo e delle possibilità di autorealizzazione in un ambiente diverso da quello familiare e scolastico.", 'TLR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Socializzazione: Formare o potenziare le abilità comunicative e rafforzare determinate abilità cognitive, sociali e professionali; sviluppare le capacità di adattamento al fine di assumere atteggiamenti idonei rispetto all'ambiente operativo in cui gli alunni vengono inseriti.", 'LR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Sviluppo di abilità: Acquisire la capacità di rendersi autonomo nello svolgere i compiti assegnati; Sviluppare precisione ed accuratezza nell'effettuare il lavoro assegnato.", 'LR', 2);
 $pdf->Cell(6);
 $pdf->MultiCell(169, 4, "Comportamento: Educazione al rispetto degli orari; sviluppare un corretto rapporto con gli altri dipendenti; capire l'importanza della cura delle attrezzature.", 'LR', 2);
 }
 //================================
 $pdf = new PDF('L', 'pt', 'A4');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 10;
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetFont('Arial', '', 4.5);
 if ($modPil != '2') {
     $ang = 1;
     $totalThn = count($dtThnBudget);
     $totalThn = $totalThn + 1;
     foreach ($dtThnBudget as $brsThnBudget) {
         if ($ang == 1) {
             $bmilY = $pdf->GetY();
             $bmilX = $pdf->GetX();
             $pdf->SetY($bmilY + 10);
             $pdf->Cell(15, $height, $ang, 1, 0, 'C');
             $modPil == '0' ? $pdf->Cell(50, $height, $brsThnBudget, 1, 0, 'L') : $pdf->Cell(50, $height, $brsThnBudget . "[" . $dtJmlhThnTnm[$thnBudget][$brsThnBudget] . "]", 1, 0, 'L');
         } else {
             if ($ang < $totalThn) {
                 $bmilY = $pdf->GetY();
                 $bmilX = $pdf->GetX();
                 $pdf->SetY($bmilY + 10);
                 $pdf->Cell(15, $height, $ang, 1, 0, 'C');
                 $modPil == '0' ? $pdf->Cell(50, $height, $brsThnBudget, 1, 0, 'L') : $pdf->Cell(50, $height, $brsThnBudget . "[" . $dtJmlhThnTnm[$thnBudget][$brsThnBudget] . "]", 1, 0, 'L');
             }
         }
         $ang += 1;
         for ($pdfAngk = 1; $pdfAngk <= $totalUnit + 1; $pdfAngk++) {
             if ($pdfAngk != $totalUnit + 1) {
    $strv = "select namabarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $bar->kodebarang . "'";
    $resv = mysql_query($strv);
    $barv = mysql_fetch_object($resv);
    $namabarang = $barv->namabarang;
    $pdf->Cell(8, 5, $no, 1, 0, 'L', 1);
    $pdf->Cell(42, 5, $bar->nopo, 1, 0, 'L', 1);
    $pdf->Cell(28, 5, $kodebarang, 1, 0, 'C', 1);
    $pdf->Cell(80, 5, $namabarang, 1, 0, 'L', 1);
    $pdf->Cell(15, 5, $satuan, 1, 0, 'L', 1);
    $pdf->Cell(18, 5, number_format($jumlah, 2, '.', ','), 1, 1, 'R', 1);
}
//footer================================
//                $dtpenerima=namakaryawan($dbname,$conn,$penerima);
//                $dtpengetahui=namakaryawan($dbname,$conn,$pengetahui);
$dptinY = $pdf->GetY();
$dptinX = $pdf->GetX();
$pdf->SetY($dptinY + 25);
$pdf->SetX($dptinX);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 8);
if (substr($expend, 0, 1) == 'S') {
    $dert = $_SESSION['lang']['expeditor'];
    $duer = $optSupplier[$expend];
} else {
    $dert = $_SESSION['lang']['dibawa'];
    $duer = $optKary[$expend];
}
$pdf->Cell(50, $height, $_SESSION['lang']['penerima'] . ",", 0, 0, 'C', 0);
$pdf->Cell(70, $height, $dert . ",", 0, 0, 'C', 0);
$pdf->Cell(65, $height, $_SESSION['lang']['pengirim'] . ",", 0, 1, 'C', 0);
$pdf->ln(25);
Beispiel #7
0
     if ($nama_bagian != '') {
         $pdf->AddPage();
     }
     $nama_bagian = $outbox->nama_bagian;
     $pdf->ChapterTitle($nama_bagian);
 }
 if ($pdf->GetY() >= 175) {
     $pdf->AddPage();
 }
 $i++;
 $pdf->Cell(-6);
 $pdf->Cell(6, $margin, $i, 0, 0);
 $pdf->Cell(30, $margin, $outbox->no_surat, 0, 0);
 $pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_masuk)), 0, 0);
 $pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_surat)), 0, 0);
 $current_x1 = $pdf->GetX();
 $current_y1 = $pdf->GetY();
 $pdf->Cell(90);
 $current_x2 = $pdf->GetX();
 $current_y2 = $pdf->GetY();
 $pdf->Cell(50);
 $current_x3 = $pdf->GetX();
 $current_y3 = $pdf->GetY();
 $pdf->Cell(35);
 $pdf->Cell(30, $margin, $outbox->nama_jenis, 0, 0);
 $pdf->Cell(0, $margin, $outbox->first_name, 0, 0);
 $pdf->SetXY($current_x3, $current_y3);
 $pdf->MultiCell(35, $margin, $outbox->ptt, 0, 'L');
 $y3 = $pdf->getY();
 $pdf->SetXY($current_x2, $current_y2);
 $pdf->MultiCell(50, $margin, $outbox->tujuan, 0, 'L');
		foreach($tab_liste_item as $item_id)	// Pour chaque item...
		{
			$releve_PDF->VertCellFit($releve_PDF->cases_largeur, $releve_PDF->etiquette_hauteur, $tab_item[$item_id][0]['item_ref'], 1 /*border*/, 0 /*br*/, TRUE /*fill*/);
			$releve_HTML_table_head .= '<th title="'.html($tab_item[$item_id][0]['item_nom']).'"><img alt="'.html($tab_item[$item_id][0]['item_ref']).'" src="./_img/php/etiquette.php?dossier='.$_SESSION['BASE'].'&amp;nom='.urlencode($tab_item[$item_id][0]['item_ref']).'&amp;size=8" /></th>';
		}
	}
	else
	{
		foreach($tab_eleve as $tab)	// Pour chaque élève...
		{
			extract($tab);	// $eleve_id $eleve_nom $eleve_prenom $eleve_id_gepi
			$releve_PDF->VertCellFit($releve_PDF->cases_largeur, $releve_PDF->etiquette_hauteur, $eleve_nom.' '.$eleve_prenom, 1 /*border*/, 0 /*br*/, TRUE /*fill*/);
			$releve_HTML_table_head .= '<th><img alt="'.html($eleve_nom.' '.$eleve_prenom).'" src="./_img/php/etiquette.php?dossier='.$_SESSION['BASE'].'&amp;nom='.urlencode($eleve_nom).'&amp;prenom='.urlencode($eleve_prenom).'&amp;size=8" /></th>';
		}
	}
	$releve_PDF->SetX( $releve_PDF->GetX()+2 );
	$releve_PDF->choisir_couleur_fond('gris_moyen');
	$releve_PDF->Cell($releve_PDF->cases_largeur , $releve_PDF->etiquette_hauteur , '[ * ]'  , 1 , 0 , 'C' , true , '');
	$releve_PDF->Cell($releve_PDF->cases_largeur , $releve_PDF->etiquette_hauteur , '[ ** ]' , 1 , 1 , 'C' , true , '');
	$checkbox_vide = ($affichage_checkbox) ? '<th class="nu">&nbsp;</th>' : '' ;
	$releve_HTML_table_head .= '<th class="nu">&nbsp;</th><th>[ * ]</th><th>[ ** ]</th>'.$checkbox_vide.'</tr></thead>'."\r\n";
	// lignes suivantes
	$releve_HTML_table_body = '';
	if($tableau_tri_objet=='eleve')
	{
		foreach($tab_eleve as $tab)	// Pour chaque élève...
		{
			extract($tab);	// $eleve_id $eleve_nom $eleve_prenom $eleve_id_gepi
			$releve_PDF->choisir_couleur_fond('gris_clair');
			$releve_PDF->CellFit($releve_PDF->intitule_largeur , $releve_PDF->cases_hauteur , pdf($eleve_nom.' '.$eleve_prenom) , 1 , 0 , 'L' , true , '');
			$releve_HTML_table_body .= '<tr><td>'.html($eleve_nom.' '.$eleve_prenom).'</td>';
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(80, 5, $dOrder['nopp'], 0, 0, 'L');
$pdf->Cell(15, 5, 'Qty', 0, 0, 'L');
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(10, 5, $dOrderJum['jumlah'], 0, 1, 'L');
$pdf->Cell(15, 5, '', 0, 0, 'L');
$pdf->Cell(10, 5, '', 0, 0, 'C');
$pdf->Cell(80, 5, '', 0, 0, 'L');
$pdf->Cell(15, 5, 'Approx Value', 0, 0, 'L');
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(10, 5, $dOrder['matauang'] . '. ' . number_format($dOrder['nilaipermintaan'], 2), 0, 1, 'L');
$pdf->SetFont('Arial', '', 5);
$pdf->Cell(15, 5, '(Bank by price lowest quotation)', 0, 0, 'L');
$pdf->SetFont('Arial', '', 7);
$pdf->Ln();
$awalXjudulno = $pdf->GetX();
$awalYjudulatas = $pdf->GetY();
$pdf->Cell(10, 5, 'No', 1, 0, 'C');
$awalXjudulsup = $pdf->GetX();
$pdf->Cell(50, 5, 'Supplier & Place', 1, 0, 'C');
$awalXjudulbp = $pdf->GetX();
$pdf->Cell(35, 5, 'Basic Price', 1, 0, 'C');
$awalXjudulppn = $pdf->GetX();
$pdf->Cell(30, 5, 'PPN 10%', 1, 0, 'C');
$awalXjudulfp = $pdf->GetX();
$pdf->Cell(35, 5, 'Final Price', 1, 0, 'C');
$awalXjudulpy = $pdf->GetX();
$akhirXjudulpy = $pdf->GetX() + 35;
$pdf->Cell(35, 5, 'Payment', 1, 1, 'C');
$pdf->SetFont('Arial', '', 7);
$iData = "select * from " . $dbname . ".log_perintaanhargaht where nomor='" . $nodph . "' ";
Beispiel #10
0
 } else {
     $sql .= "ORDER BY substr(billno,3,10)";
 }
 // echo "<pre>$sql</pre>";
 $result = $mysqli->query($sql);
 $data = array();
 while ($row = $result->fetch_assoc()) {
     $data[] = $row;
 }
 $result->close();
 $first = true;
 foreach ($data as $d) {
     if (isset($_GET['printaddress']) && $_GET['printaddress'] == 'Y') {
         $pdf->AddPage();
         $pdf->SetFont('Arial', '', 10);
         $x = $pdf->GetX() + 60;
         $y = $pdf->GetY() + 85;
         $pdf->SetXY($x, $y);
         $w = $pdf->h - $pdf->bMargin - $pdf->y;
         $pdf->RotatedCell(270, $w, 6, $d['party_name'], 0, 1, 'L');
         $pdf->RotatedCell(270, $w, 6, $d['party_address'], 0, 1, 'L');
         $pdf->RotatedCell(270, $w, 6, $d['party_city'], 0, 1, 'L');
     } else {
         $invoice = $d['sale_master_id'];
         $partyName = $d['party_name'];
         $partyCity = $d['party_city'];
         $billno = $d['billno'];
         $date = $d['sale_date_fmt'];
         $billteNo = $d['billte_no'];
         $transporter = $d['transporter_name'];
         $address = $d['party_address'];
Beispiel #11
0
 $business_id = $gd['business_id'];
 //check if line is paid
 $lp = mysql_query("select * from ebpls_transaction_payment_or_details a, ebpls_transaction_payment_or b where a.trans_id='{$owner_id}' and a.payment_id='{$business_id}' and a.ts between '{$date_from} 00:00:00' and '{$date_to} 23:59:59' and a.or_no = b.or_no");
 //echo "select * from tempbusnature where owner_id='$owner_id' and business_id='$business_id' and recpaid='1'";
 //$lp = mysql_query("select * from tempbusnature a, ebpls_buss_nature b,   ebpls_transaction_payment_or_details c where owner_id='$owner_id' and business_id='$business_id' and recpaid='1' and a.bus_code=b.natureid and
 //a.owner_id=c.trans_id and a.business_id=c.payment_id and c.ts between  '$date_from 00:00:00' and '$date_to 23:59:59'");
 while ($gp = mysql_fetch_assoc($lp)) {
     //get details
     $f = 0;
     $pdf->SetX(5);
     $pdf->Cell(50, 5, $gd[fulln], 1, 0, 'C');
     $pdf->Cell(240, 5, $gd[business_name] . "/" . $gd[business_add], 1, 0, 'L');
     //get or
     $getor = mysql_query("select * from ebpls_transaction_payment_or_details a, ebpls_transaction_payment_or b where a.trans_id='{$owner_id}' and a.payment_id='{$business_id}' and a.or_no=b.or_no");
     $getor = mysql_fetch_assoc($getor);
     $RX = $pdf->GetX();
     $pdf->Cell(40, 5, '', 1, 0, 'C');
     //$pdf->Cell(40,5,$getor[or_no],1,0,'C');
     //get paytax/fee
     $gettax = mysql_Query("select * from tempassess a where a.owner_id='{$owner_id}' and a.business_id='{$business_id}'");
     $dfv = 0;
     while ($gett = mysql_fetch_assoc($gettax)) {
         //while ($dfv < $v) {
         $dfv++;
         //display
         $f++;
         $disp = mysql_Query("select sum(amount) from ebpls_payment_details a, rpt_temp_abs b where a.owner_id='{$owner_id}' and a.business_id='{$business_id}' and a.tfoid='{$tfoid[$f]}' and a.tfoid = b.tfoid and or_no = '{$gp['payment_code']}' order by or_no asc");
         //echo "select * from ebpls_payment_details a where a.owner_id='$owner_id' and a.business_id='$business_id' and a.tfoid='$tfoid[$f]' <br>";
         //$disp = mysql_Query("select * from tempassess a where a.owner_id='$owner_id' and a.business_id='$business_id' and a.natureid='$gp[bus_code]' and a.tfoid='$tfoid[$f]'");
         $cntm = mysql_num_rows($disp);
         if ($tfoid[$f] != '') {
	foreach($tab_repartition_quantitatif as $item_id => $tab_effectifs)
	{
		$somme += max(4,max($tab_effectifs));
	}
	$sacoche_pdf->tableau_devoir_repartition_nominative_initialiser($somme);
	foreach($tab_item_id as $item_id=>$tab_infos_item)
	{
		// 1ère ligne : nouvelle page si besoin + référence du devoir et des codes si besoin
		$sacoche_pdf->tableau_devoir_repartition_nominative_entete($groupe_nom,$date_fr,$description,$tab_init_quantitatif,$tab_repartition_quantitatif[$item_id]);
		// ligne de répartition pour 1 item : référence item
		$sacoche_pdf->tableau_saisie_reference_item($tab_infos_item[0],$tab_infos_item[1]);
		// ligne de répartition pour 1 item : cases répartition nominative
		foreach($tab_repartition_nominatif[$item_id] as $code=>$tab_eleves)
		{
			// Ecrire les noms ; plus court avec MultiCell() mais pb des retours à la ligne pour les noms trop longs
			$memo_X = $sacoche_pdf->GetX();
			$memo_Y = $sacoche_pdf->GetY();
			foreach($tab_eleves as $key => $eleve_texte)
			{
				$sacoche_pdf->CellFit($sacoche_pdf->cases_largeur , $sacoche_pdf->lignes_hauteur , pdf($eleve_texte) , 0 , 2 , 'L' , false , '');
			}
			// Ajouter la bordure
			$sacoche_pdf->SetXY($memo_X , $memo_Y);
			$sacoche_pdf->Cell($sacoche_pdf->cases_largeur , $sacoche_pdf->cases_hauteur , '' , 1 , 0 , 'C' , false , '');
		}
		$sacoche_pdf->SetXY($sacoche_pdf->marge_gauche , $sacoche_pdf->GetY()+$sacoche_pdf->cases_hauteur);
	}
	$sacoche_pdf->Output($dossier_export.$fnom_export.'_repartition_nominative.pdf','F');
	//
	// c'est fini...
	//
Beispiel #13
0
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('Desincorporación en el Mes por el Conceptos 60'), 0, 0, '', true);
// Faltantes de Bienes por Investigar
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['desin_f'], 'B', 1, 'C', true);
$pdf->setY($yt + 55);
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('Existencia Final'), 0, 0, '', true);
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['existencia_final'], 'B', 1, 'C', true);
$pdf->setY($yt + 65);
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('TOTALES IGUALES'), 0, 0, '', true);
$pdf->setX($x + 120);
$pdf->Celda(50, $lh2, $data['total'], 'B', 0, 'C', true);
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['total2'], 'B', 1, 'C', true);
$pdf->setY($yt + 100);
$pdf->SetDrawColor(0, 0, 0);
$y = $pdf->GetY();
$pdf->SetY($y + 30);
$pdf->SetX($pdf->GetX() + 8);
$pdf->Cell(70, $lh, $pdf->capitalizar("{$header['responsable']}"), 0, 1, 'C', false);
$pdf->SetX($pdf->GetX() + 8);
$pdf->Cell(70, $lh, utf8_decode("Nombre y Apellido del {$header['cargo']}"), 'T', 0, 'C', false);
$pdf->SetX($pdf->GetX() + 19);
$pdf->Cell(70, $lh, 'Sello de la Unidad', 'T', 0, 'C', false);
$pdf->SetX($pdf->GetX() + 19);
$pdf->Cell(70, $lh, "Firma", 'T', 1, 'C', false);
$pdf->Ln(5);
$pdf->Output('bm4.pdf', 'D');
 } else {
     $spek = "";
 }
 $nopp = substr($bar->nopp, 0, 3);
 $sSat = "select satuan,namabarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $bar->kodebarang . "'";
 $qSat = mysql_query($sSat) or die(mysql_error());
 $rSat = mysql_fetch_assoc($qSat);
 $satuan = $rSat['satuan'];
 $namabarang = $rSat['namabarang'];
 $i++;
 if ($no != 1) {
     $pdf->SetY($akhirY);
 }
 $posisiY = $pdf->GetY();
 $pdf->Cell(8, 4, $no, 0, 0, 'L', 0);
 $pdf->SetX($pdf->GetX());
 $pdf->Cell(15, 5, $bar->kodebarang, 0, 0, 'C', 0);
 if ($spek == '' && $bar->catatan == '') {
     $pdf->MultiCell(84, 5, $namabarang, 0, 'J', 0);
 } else {
     if ($spek != '' && $bar->catatan == '') {
         $pdf->MultiCell(84, 5, $namabarang . "\n" . $spek, 0, 'J', 0);
     } else {
         if ($spek == '' && $bar->catatan != '') {
             $pdf->MultiCell(84, 5, $namabarang . "\n" . $bar->catatan, 0, 'J', 0);
         } else {
             $pdf->MultiCell(84, 5, $namabarang . "\n" . $spek . "\n" . $bar->catatan, 0, 'J', 0);
         }
     }
 }
 $akhirY = $pdf->GetY();
Beispiel #15
0
 foreach ($albero as $linea) {
     // $pdf->Cell(0,6,$albero[0],0,0,'L');
     // $righe = count($albero)-1;
     //for( $y=0; $y<=$righe; $y++){
     //	$linea=$albero[$y];
     $pdf->Ln(1);
     // $str=utf8_decode($linea);
     $str = iconv('UTF-8', 'windows-1252', $linea);
     // $str=html_entity_decode($linea,"ENT_HTML5", "UTF-8");
     $prev = strpos($str, '(');
     $indent = substr($str, 0, $prev);
     // [X]
     $str = substr($str, $prev);
     // [X]
     $y1 = $pdf->GetY();
     $x1 = $pdf->GetX() + $pdf->lMargin;
     $y2 = $y1 + 4;
     $x2 = $pdf->lMargin - 2;
     while ($indent != "") {
         // $y1=$y1+$vspacing;
         $x1 = $pdf->GetX();
         // $y2=$y1+6;
         $x2 = $x1 + 1;
         $ind = substr($indent, 0, 1);
         $indent = substr($indent, 1);
         switch ($ind) {
             case "I":
                 $pdf->line($x1, $y1 + $vspacing, $x1, $y2 + $vspacing);
                 $pdf->SetXY($x2, $y1 + 1 + $vspacing);
                 break;
             case "T":
Beispiel #16
0
     $sede = utf8_decode($row['AZ_Indirizzo']) . ' ' . utf8_decode($row['AZ_Localita']) . ' ' . $row['AZ_CAP'] . ' ' . utf8_decode($row['AZ_Comune']);
 } else {
     $sede = utf8_decode($row['STA_Sede']);
 }
 $pdf->Cell(135, 6, ' ' . $sede, 1, 1);
 $pdf->Cell(40, 6, 'Periodo ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' da ' . strftime('%d/%m/%Y', strtotime($row['STA_DataInizio'])) . ' a ' . strftime('%d/%m/%Y', strtotime($row['STA_DataFine'])), 1, 1);
 $pdf->Cell(40, 6, 'Orario ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' ' . utf8_decode($row['STA_Orario']), 1, 1);
 $pdf->Cell(40, 6, 'Tutor aziendale ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' ' . utf8_decode($row['PAZ_Titolo']) . ' ' . utf8_decode($row['PAZ_Nome']), 1, 1);
 $pdf->Cell(40, 6, 'Tutor scolastico ', 1, 0, 'R', 1);
 $pdf->Cell(135, 6, ' prof. ' . utf8_decode($row['TUT_Nome']) . ' ' . utf8_decode($row['TUT_Cognome']), 1, 1);
 $pdf->Ln(3);
 $pdf->SetFont('abac', '', 11);
 $x = $pdf->GetX();
 $y = $pdf->GetY();
 $pdf->Cell(30, 10, 'Data', 1, 0, 'C', 1);
 $pdf->Rect($x + 30, $y, 74, 10);
 $pdf->Cell(74, 5, "Firma mattino", 0, 0, 'C');
 $pdf->Cell(74, 5, "Firma pomeriggio", 0, 1, 'C');
 $pdf->Cell(30);
 $pdf->SetFont('abalc', '', 10);
 $pdf->Rect($x + 104, $y, 74, 10);
 $pdf->Cell(74, 5, "(dalle ore   ...............       alle ore   ...............)", 0, 0, 'C');
 $pdf->Cell(74, 5, "(dalle ore   ...............       alle ore   ...............)", 0, 1, 'C');
 $pdf->SetFont('abac', '', 12);
 $pdf->Cell(30, 7, '', 1, 0, 'R');
 $pdf->Cell(74, 7, '', 1, 0, 'R');
 $pdf->Cell(74, 7, '', 1, 1, 'R');
 $pdf->Cell(30, 7, '', 1, 0, 'R');
 $mypdf->Ln();
 $mypdf->Ln();
 //table heading
 $mypdf->SetFont('Arial', '', 10);
 $mypdf->setFillColor(178, 211, 230);
 $mypdf->SetDrawColor(178, 211, 230);
 $mypdf->Cell(30, 10, 'Category', 1, 0, 'C', true);
 $mypdf->setFillColor(178, 211, 230);
 $mypdf->Cell(95, 10, 'Description', 1, 0, 'C', true);
 $mypdf->setFillColor(178, 211, 230);
 $mypdf->Cell(30, 10, 'Expense Date', 1, 0, 'C', true);
 $mypdf->setFillColor(178, 211, 230);
 $mypdf->Cell(30, 10, 'Amount', 1, 0, 'C', true);
 $mypdf->Ln();
 $mypdf->SetFont('Arial', '', 9);
 $x_axis = $mypdf->GetX();
 $y_axis = $mypdf->GetY();
 $sql = "SELECT count(ExCategory) from tbluserexpenses Where `UserName`= '{$User}' ";
 $res = $dbh->prepare($sql);
 $res->execute();
 $Rcnt = $res->fetchColumn();
 if ($Rcnt > 0) {
     $sql = "SELECT * from tbluserexpenses Where `UserName`= '{$User}' AND `Currency`='USD' AND ExCategory IN ('Flight','Railway','Taxi','Fairy','Bus') ORDER BY ExCategory,ClaimDate";
     $result = $dbh->prepare($sql);
     $result->execute();
     $RCount = $result->rowCount();
     if ($RCount > 0) {
         $y = $mypdf->GetY();
         if ($y != $y_axis) {
             $mypdf->setXY($x_axis, $y + 10);
         } else {
     $dummy = '';
     if ($flag90 == 1) {
         $dummy = number_format($sisainvoice, 2);
     }
     $pdf->Cell(25, 5, $dummy, 'T', 0, 'R');
     $dummy = '';
     if ($flag100 == 1) {
         $dummy = number_format($sisainvoice, 2);
     }
     $pdf->Cell(25, 5, $dummy, 'T', 0, 'R');
     $dummy = '';
     $pdf->Cell(25, 5, number_format($dibayar, 2, '.', ','), 'T', 1, 'R');
     //		$pdf->Cell(25,5,$outstd,'LTR',1,'R');
     $pdf->__currentY = $pdf->GetY();
     $pdf->MultiCell(17, 5, tanggalbiasa2($tanggal), 0, 'L');
     $pdf->SetXY($pdf->GetX() + 17, $pdf->__currentY);
     $pdf->MultiCell(55, 5, $namasupplier, 0, 'L');
     $pdf->SetXY($pdf->GetX() + 17 + 55, $pdf->__currentY);
     //		$pdf->Cell(55,5,$noinvoice,'LBR',0,'L');
     $pdf->MultiCell(25, 5, $nopokontrak, 0, 'L');
     $pdf->SetXY($pdf->GetX() + 17 + 55 + 25, $pdf->__currentY);
     $pdf->Cell(29, 5, $jatuhtempo, 0, 0, 'R');
     $pdf->Cell(26, 5, '', 0, 0, 'R');
     $pdf->Cell(25, 5, '', 0, 0, 'R');
     $pdf->Cell(25, 5, '', 0, 0, 'R');
     $pdf->Cell(25, 5, '', 0, 0, 'R');
     $pdf->Cell(25, 5, '', 0, 0, 'R');
     $pdf->Cell(25, 5, $outstd . " Hari", 0, 1, 'R');
     $pdf->Ln();
     //		$pdf->Cell(25,5,'','LBR',1,'R');
 }
Beispiel #19
0
function home__memberlist_printview()
{
    global $base_url, $files_dir, $config;
    // $content='<html><head><meta http-equiv="Content-Type" content="application/pdf; charset=utf-8" />';
    // drupal_add_css(BOOTSTRAP.'/css/bootstrap.min.css');
    // drupal_add_css(CHURCHDB.'/cdb_printview.css');
    // $content=$content.drupal_get_header();
    if (!user_access("view memberliste", "churchdb")) {
        addErrorMessage(t("no.permission.for", t("list.of.members")));
        return " ";
    }
    require_once ASSETS . '/fpdf17/fpdf.php';
    $compact = true;
    if (isset($_GET["compact"])) {
        $compact = $_GET["compact"];
    }
    // Instanciation of inherited class
    $pdf = new PDF('P', 'mm', 'A4');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 9);
    $res = home_getMemberList();
    $pdf->SetLineWidth(0.4);
    $pdf->SetDrawColor(200, 200, 200);
    $fields = _home__memberlist_getSettingFields()->fields;
    foreach ($res as $p) {
        $pdf->Line(8, $pdf->GetY() - 1, 204, $pdf->GetY() - 1);
        $pdf->Cell(10, 10, "", 0);
        if ($p->imageurl == null || !file_exists("{$files_dir}/fotos/{$p->imageurl}")) {
            $p->imageurl = "nobody.gif";
        }
        $pdf->Image("{$files_dir}/fotos/{$p->imageurl}", $pdf->GetX() - 10, $pdf->GetY() + 1, 9);
        $pdf->Cell(2);
        $pdf->Cell(13, 9, $p->anrede, 0, 0, 'L');
        $pdf->Cell(48, 9, utf8_decode("{$p->name}, {$p->vorname}"), 0, 0, 'L');
        $pdf->Cell(45, 9, utf8_decode("{$p->strasse}"), 0, 0, 'L');
        // TODO: second occurence of code part - whats this for?
        $birthday = "";
        if ($p->geburtsdatum != null) {
            if ($p->year < 7000) {
                $birthday = "{$p->day}.{$p->month}.";
            }
            if ($p->year != 1004 && $fields["memberlist_birthday_full"]->getValue()) {
                if ($p->year < 7000) {
                    $birthday = $birthday . $p->year;
                } else {
                    $birthday = $birthday . $p->year - 7000;
                }
            }
        }
        $pdf->Cell(20, 9, $birthday, 0, 0, 'L');
        if ($fields["memberlist_telefonprivat"]->getValue() && $p->telefonprivat != "") {
            $pdf->Cell(30, 9, $p->telefonprivat, 0, 0, 'L');
        } else {
            if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->telefongeschaeftlich != "") {
                $pdf->Cell(30, 9, $p->telefongeschaeftlich, 0, 0, 'L');
            } else {
                if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->fax != "") {
                    $pdf->Cell(30, 9, $p->fax . " (Fax)", 0, 0, 'L');
                } else {
                    $pdf->Cell(30, 9, "", 0, 0, 'L');
                }
            }
        }
        if ($fields["memberlist_telefonhandy"]->getValue() && $p->telefonhandy != "") {
            $pdf->Cell(30, 9, $p->telefonhandy, 0, 0, 'L');
        }
        // Zeilenumbruch
        $pdf->Ln(5);
        $pdf->Cell(73);
        $pdf->Cell(48, 10, "{$p->plz} " . utf8_decode($p->ort), 0, 0, 'L');
        $pdf->Cell(17);
        if ($fields["memberlist_email"]->getValue() && $p->email != "") {
            $pdf->SetFont('Arial', '', 8);
            $pdf->Cell(30, 9, $p->email);
            $pdf->SetFont('Arial', '', 9);
        }
        $pdf->Ln(12);
    }
    $pdf->Output(t("list.of.members") . '.pdf', 'I');
}
        $tt++;
        $pdf->SetTextColor(0);
        $pdf->SetFillColor(255);
        $pdf->Cell($br00, $zelle, " ", 0, 0, 'C');
        if (isset($datum[$t - 1]) and $datum[$t] == $datum[$t - 1] and $tt > 1) {
            $ttext = '  ';
        } else {
            //$pdf->Cell($br01,$zelle,utf8_decode($arrWochentag[date("l",$datum[$t])]). ", " . $datum_arr[$t][2].".".$datum_arr[$t][1].".".$datum_arr[$t][0],1,0,'L',1); }
            $ttext = utf8_decode($arrWochentag[date("l", $datum[$t])]) . ", " . $datum_arr[$t][2] . "." . $datum_arr[$t][1] . "." . $datum_arr[$t][0];
        }
        if ($termine[$t]->starttime != '00:00:00') {
            $ttext .= '  ' . substr($termine[$t]->starttime, 0, 5);
        }
        $pdf->Cell($br01, $zelle, $ttext, 1, 0, 'R', 1);
        //$pdf->Cell($br02,$zelle,utf8_decode($termine[$t]->name),1,0,'L',1);
        $yy1 = $pdf->GetY();
        $xx1 = $pdf->GetX() + $br02;
        $pdf->Multicell($br02, $zelle, utf8_decode($termine[$t]->name), 1, 1, 'L', 1);
        $yy3 = $pdf->GetY();
        $pdf->SetY($yy1);
        $pdf->SetX($xx1);
        $pdf->Multicell($br03, $zelle, utf8_decode($termine[$t]->typ), 1, 1, 'L', 1);
        $yy4 = $pdf->GetY();
        if ($yy4 < $yy3) {
            $pdf->SetY($yy3);
        }
    }
}
// ENDE : Terminschleife
// Ausgabe
$pdf->Output(utf8_decode(JText::_('TERMINE_HEAD')) . '.pdf', 'D');
         $this->SetY(-15);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(10, 10, 'Page ' . $this->PageNo() . " / {totalPages}", 0, 0, 'L');
     }
 }
 //================================
 $pdf = new PDF('L', 'pt', 'A4');
 $pdf->AliasNbPages('{totalPages}');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 10;
 $tnggi = $jmlHari * $height;
 $pdf->AddPage();
 //            $pdf->SetFillColor(255,255,255);
 //            $pdf->SetFont('Arial','B',5);
 $tinggiAkr = $pdf->GetY();
 $ksamping = $pdf->GetX();
 $pdf->SetY($tinggiAkr + 20);
 $pdf->SetX($ksamping + 500);
 $pdf->SetFont('Arial', 'B', 6);
 $pdf->SetFillColor(255, 255, 255);
 $pdf->Cell(65, $height, " ", R, 0, 'C', 1);
 $pdf->SetFillColor(220, 220, 220);
 $pdf->Cell(135, $height, $_SESSION['lang']['anggaran'], TLR, 0, 'C', 1);
 $pdf->Cell(90, $height, $_SESSION['lang']['realisasi'], TLR, 1, 'C', 1);
 $tinggiAkr = $pdf->GetY();
 $ksamping = $pdf->GetX();
 $pdf->SetY($tinggiAkr);
 $pdf->SetX($ksamping + 500);
 $pdf->SetFillColor(255, 255, 255);
 $pdf->Cell(65, $height, " ", R, 0, 'C', 1);
 $pdf->SetFillColor(220, 220, 220);
Beispiel #22
0
 $pdf->AliasNbPages();
 $pdf->SetFont('Arial', '', 10);
 $sqa = "select \n\t\tISNULL(REF5CLI_FAC,'NO DEFINIDO') as EMPRESA,\n\t\tNOMBRE_CLI AS CLIENTE,\n\t\tCOUNT(*) AS CANT,\n\t\tSUM(ISNULL(TOTAL_FAC,0)) AS TOTAL,\n\t\tSUM(ISNULL(TOTAL_FAC,0))-SUM(ISNULL(ANTICIPO_EXP,0)) AS MSEG,\n\t\tSUM(ANTICIPO_EXP) AS MPAC\n\t\tfrom Tbfacturacion3\n\t\tinner join TbClientes\n\t\ton codigo_cli=cliente_fac\n\t\tLEFT JOIN TBEXPEDIENTES ON\n\t\tCONVERT(NVARCHAR,CODIGO_EXP) = pedido_fac\n\t\tWHERE (CONVERT(DATE,FECHA_FAC) BETWEEN CONVERT(DATE,'{$ddesde}') AND CONVERT(DATE,'{$dhasta}'))\n\t\tand status_fac=" . ($sts == 1 ? '1' : '0') . "\n\t\t" . ($emp ? " AND REF5CLI_FAC IN (SELECT nombre_emp FROM TbEmpresas WHERE CODIGO_EMP='{$emp}')" : "") . "\n\t\t" . ($cli ? " AND CODIGO_CLI='{$cli}'" : "") . "\n\t\tGROUP BY REF5CLI_FAC, nombre_cli\n\t\tORDER BY " . ($groupby ? $groupby : ' NOMBRE_CLI');
 $lastGroup = "";
 //putxt($sqa);
 $sql = mssql_query($sqa);
 $pp = 0;
 while ($row = mssql_fetch_array($sql)) {
     if ($pp == 0 || $pdf->GetY() > 240) {
         $pdf->AddPage();
         $pp++;
         $pdf->Ln(4);
         $pdf->Line(10, $pdf->GetY(), 200, $pdf->GetY());
         $pdf->Ln(2);
         if ($ddesde) {
             if ($pdf->GetX() > 160) {
                 $pdf->Ln();
             }
             $pdf->Cell(47, 4, toStr('Fecha desde: ' . date('d/m/Y', strtotime($ddesde))));
             $pdf->Cell(47, 4, toStr('Fecha hasta: ' . date('d/m/Y', strtotime($dhasta))));
         }
         if ($cli) {
             if ($pdf->GetX() > 120) {
                 $pdf->Ln();
             }
             $pdf->Cell(94, 4, toStr('Cliente: ' . $cli . ' ' . $nombre_cli));
         }
         if ($emp) {
             if ($pdf->GetX() > 120) {
                 $pdf->Ln();
             }
 //                                        @$hslBagi[$thnBudget][$lstThaTnm][$ktKrgng]=$dtNoakunRup[$thnBudget][$lstThaTnm][$ktKrgng]/$ttlLuastm;
 //                                        $pdf->Cell(40,10,number_format($dtNoakunRup[$thnBudget][$lstThaTnm][$ktKrgng],0),1,0,'R',1);
 //                                        $pdf->Cell(40,10,number_format($hslBagi[$thnBudget][$lstThaTnm][$ktKrgng],0),1,0,'R',1);
 //                                        }
 //                                }
 //
 //                            }
 //                            //$pdf->Cell($colTotal,$height,"",1,1,'C',1);
 //
 //                        $brs=0;
 //                        $awal=1;
 //                        //$totAkun+=1;
 //                      }
 $pdf->SetFont('Arial', '', 5);
 $yAkhir = $pdf->GetY();
 $xPertama = $pdf->GetX();
 $pdf->SetY($yAkhir);
 $pdf->SetX($xPertama);
 $pdf->Cell(58, $height, $barisNoakun, 1, 0, 'L', 1);
 $pdf->Cell(150, $height, $optKegiatan[$barisNoakun], 1, 0, 'L', 1);
 //echo $totRupiah[$thnBudget][$barisNoakun]."<br>";
 if (substr($barisNoakun, 0, 1) == '1') {
     @($hasilBagi[$barisNoakun] = $totRupiah[$thnBudget][$barisNoakun] / $ttlLuastbm);
 } else {
     @($hasilBagi[$barisNoakun] = $totRupiah[$thnBudget][$barisNoakun] / $ttlLuastm);
 }
 $pdf->Cell(40, 10, number_format($totRupiah[$thnBudget][$barisNoakun], 0), 1, 0, 'R', 1);
 $pdf->Cell(40, 10, number_format($hasilBagi[$barisNoakun], 0), 1, 0, 'R', 1);
 $grndTotal += $totRupiah[$thnBudget][$barisNoakun];
 $grndTotalHsil += $hasilBagi[$barisNoakun];
 $yAkhir = $pdf->GetY();
Beispiel #24
0
 $pdf->Cell(135, 8, ' ' . utf8_decode($row['TIR_Nome']) . ' ' . utf8_decode($row['TIR_Cognome']), 1, 1);
 $pdf->Cell(40, 8, 'Tutor aziendale ', 1, 0, 'R', 1);
 $pdf->Cell(135, 8, ' ' . utf8_decode($row['PAZ_Titolo']) . ' ' . utf8_decode($row['PAZ_Nome']), 1, 1);
 $pdf->Cell(40, 8, 'Azienda ospitante ', 1, 0, 'R', 1);
 $pdf->Cell(135, 8, ' ' . utf8_decode($row['AZ_RagioneSociale']), 1, 1);
 $pdf->Cell(40, 8, 'Sede del tirocinio ', 1, 0, 'R', 1);
 if (is_null($row['STA_Sede']) || $row['STA_Sede'] == '') {
     $sede = utf8_decode($row['AZ_Indirizzo']) . ' ' . utf8_decode($row['AZ_Localita']) . ' ' . $row['AZ_CAP'] . ' ' . utf8_decode($row['AZ_Comune']);
 } else {
     $sede = utf8_decode($row['STA_Sede']);
 }
 $pdf->Cell(135, 8, ' ' . $sede, 1, 1);
 $pdf->Cell(40, 8, 'Periodo ', 1, 0, 'R', 1);
 $pdf->Cell(135, 8, ' da ' . strftime('%d/%m/%Y', strtotime($row['STA_DataInizio'])) . ' a ' . strftime('%d/%m/%Y', strtotime($row['STA_DataFine'])), 1, 1);
 $pdf->Cell(40, 16, 'Applicazione competenze ', 1, 0, 'R', 1);
 $pdf->Rect($pdf->GetX(), $pdf->GetY(), 135, 16);
 $pdf->MultiCell(135, 5, ' ' . utf8_decode($row['STA_Compito']), 0, 1);
 $pdf->Ln(16);
 $pdf->SetFont('abac', '', 10);
 $x = $pdf->GetX();
 $y = $pdf->GetY();
 $pdf->Cell(40, 12, 'Grado di apprendimento ', 0, 0, 'R', 1);
 $pdf->Rect($x, $y, 40, 12);
 $pdf->Rect($pdf->GetX(), $pdf->GetY(), 135, 12);
 $pdf->SetFont('abalc', '', 9);
 $pdf->Cell(27, 6, 'Gravemente insuff.', 0, 0, 'C');
 $pdf->Cell(27, 6, 'Insufficiente', 0, 0, 'C');
 $pdf->Cell(27, 6, 'Sufficiente', 0, 0, 'C');
 $pdf->Cell(27, 6, 'Buono', 0, 0, 'C');
 $pdf->Cell(27, 6, 'Ottimo', 0, 1, 'C');
 $pdf->Rect(70, $pdf->GetY(), 3, 3);
Beispiel #25
0
 if ($chinese) {
     $job_n = mb_convert_encoding($job_n, 'UTF-8', 'HTML-ENTITIES');
     $job_label = mb_convert_encoding($job_label, 'UTF-8', 'HTML-ENTITIES');
     $pdf->SetFont('GB', '', 9);
 } else {
     $job_n = mb_convert_encoding($job_n, 'ISO-8859-1', 'HTML-ENTITIES');
     $job_label = mb_convert_encoding($job_label, 'ISO-8859-1', 'HTML-ENTITIES');
     $pdf->SetFont('Helvetica', '', 9);
 }
 $pdf->Cell(30, 6, $job_label . ":", 1, 0, 'L');
 $pdf->Cell(65, 6, $job_n, 1, 1, 'L');
 //$pdf->Cell(0, 6, "Subnet Description: $sub_desc", 1, 0, 'L');
 #    $pdf->Ln();
 $pdf->SetFont('Helvetica', '', 10);
 //get current possition so we can put the pie chart to the side
 $valX = $pdf->GetX();
 $valY = $pdf->GetY();
 $riskarray = array();
 //array of risks for pie chart
 $colorarray = array();
 //array of colors for pie chart
 //$query = "SELECT DISTINCT hostIP, hostname FROM vuln_nessus_results t1
 //    where report_id='$report_id' $query_host $query_critical order BY hostIP";
 $query = "SELECT DISTINCT t1.hostip as hostIP, HEX(t1.ctx) as ctx\n             FROM vuln_nessus_results t1\n             where\n             t1.report_id in ({$report_id}) \n             and falsepositive='N'\n             order BY hostIP";
 $result = $dbconn->execute($query);
 //initialise variable for number of hosts while loop
 $hosts = array();
 while ($row = $result->fields) {
     $host_id = key(Asset_host::get_id_by_ips($dbconn, $row['hostIP'], $row['ctx']));
     if (valid_hex32($host_id)) {
         $hostname = Asset_host::get_name_by_id($dbconn, $host_id);
$pdf->SetFont('Arial', 'U', 6);
$pdf->Cell(0, 40, '', 0, 1);
$pdf->Cell(0, 5, utf8_decode('Biothys GmbH | Gewerbestr. 6 | D-77731 Willstätt'), 0, 1, 'L', false);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 5, utf8_decode($company->getName()), 0, 1, 'L', false);
$pdf->Cell(0, 5, utf8_decode($receiving_address->getLine() . ' ' . $receiving_address->getComplement()), 0, 1, 'L', false);
$pdf->Cell(0, 5, utf8_decode($receiving_address->getZip() . ' ' . $receiving_address->getCity() . ' ' . $receiving_address->getCountry()), 0, 1, 'L', false);
//Marge left
$pdf->SetFont('Arial', 'B', 20);
$pdf->Cell(180, 15, utf8_decode('Invoice for samples'), 0, 1, 'R', false);
//Marge top
$pdf->Cell(0, 10, '', 0, 1);
//CellBorder//remplacer le ust-id quand il sera setup
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(185, 21, '', 1);
$pdf->setX($pdf->GetX() - 185);
$pdf->setY($pdf->GetY() + 2);
$pdf->FirstTable(array(array(utf8_decode('n° :'), $id_document, date('d.m.y', $order->getDate_entry())), array('UST-ID :', $company->getUst_id(), $order->getEmployee()->getSurname() . ' ' . $order->getEmployee()->getName()), array('Your ID :', $company->getId(), '1/1')));
$pdf->SetFont('Arial', '', 8);
$pdf->setY($pdf->GetY() + 2);
$pdf->MultiCell(100, 3, utf8_decode($text_intro));
$pdf->setY($pdf->GetY() + 2);
$pdf->SecondTable($order);
$pdf->setY($pdf->GetY() + 5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(0);
// Delivery Address
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(180, 6, utf8_decode('Delivery Address : '), 0, 1, 'L', false);
$pdf->SetFont('Arial', '', 8);
$delivery_address = new address($order->getId_delivery_address());
 $str3 = "select jumlah,idkomponen,a.karyawanid,c.plus from " . $dbname . ".sdm_gaji_vw a \r\n                  left join " . $dbname . ".sdm_ho_component c on a.idkomponen=c.id\r\n                 where a.sistemgaji='Bulanan' and a.periodegaji='" . $perod . "' ";
 //exit("Error:".$str3);
 $res3 = mysql_query($str3, $conn);
 while ($bar3 = mysql_fetch_assoc($res3)) {
     if ($bar3['plus'] == '1') {
         if ($bar3['jumlah'] != '') {
             $arrValPlus[$bar3['karyawanid']][$bar3['idkomponen']] = $bar3['jumlah'];
         }
     } elseif ($bar3['plus'] == '0') {
         if ($bar3['jumlah'] != '') {
             $arrValMinus[$bar3['karyawanid']][$bar3['idkomponen']] = $bar3['jumlah'];
         }
     }
 }
 foreach ($arrKary as $dtKary) {
     $pdf->Image('images/logo.jpg', $pdf->GetX(), $pdf->GetY(), 10);
     $pdf->SetX($pdf->getX() + 10);
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell(75, 12, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $pdf->SetFont('Arial', '', 6);
     $pdf->Cell(71, 4, $_SESSION['lang']['slipGaji'] . ': ' . $arrBln[$idBln] . "-" . $bln[0], 'T', 0, 'L');
     $pdf->SetFont('Arial', '', 6);
     $pdf->Cell(25, 4, 'Printed on: ' . date('d-m-Y: H:i:s'), "T", 1, 'R');
     $pdf->SetFont('Arial', '', 6);
     $pdf->Cell(25, 4, $_SESSION['lang']['nik'] . "/" . $_SESSION['lang']['tmk'], 0, 0, 'L');
     $pdf->Cell(35, 4, ": " . $arrNik[$dtKary] . "/" . tanggalnormal($arrTglMsk[$dtKary]), 0, 0, 'L');
     $pdf->Cell(18, 4, $_SESSION['lang']['unit'] . "/" . $_SESSION['lang']['bagian'], 0, 0, 'R');
     $pdf->Cell(28, 4, ': ' . $idAfd . " / " . $arrBag[$dtKary], 0, 1, 'L');
     $pdf->Cell(25, 4, $_SESSION['lang']['namakaryawan'] . ":", 0, 0, 'L');
     $pdf->Cell(35, 4, ': ' . $arrNmKary[$dtKary], 0, 0, 'L');
     $pdf->Cell(18, 3, $_SESSION['lang']['jabatan'], 0, 0, 'R');
Beispiel #28
0
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 12);
if (isset($_GET['emp_id'])) {
    $emp_id = $_GET['emp_id'];
}
include "actions/class_functions.php";
include "actions/subject_functions.php";
if (!isset($_GET['sy_id'])) {
    $school_yr = get_active_sy();
} else {
    $school_yr = $_GET['sy_id'];
}
$image1 = "../images/pnhs_logo.png";
//$pdf->Cell( 30, 30, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 25), 1, 0, 'L', false );
$pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 25);
$pdf->Cell(0, 10, "PAG'ASA NATIONAL HIGH SCHOOL", 0, 1, 'C');
$pdf->Cell(0, 10, "Summary of Load ", 0, 1, 'C');
$pdf->Cell(0, 10, "", '', 1, 'C');
$query_emp = mysql_query("SELECT * FROM employee_t WHERE emp_id='{$emp_id}'");
$row_emp = mysql_fetch_assoc($query_emp);
$query_load = mysql_query("SELECT * FROM teacher_t WHERE emp_id='{$emp_id}'");
$row_load = mysql_fetch_assoc($query_load);
$query_sy = mysql_query("SELECT * FROM school_year_t WHERE sy_id='{$school_yr}'");
$row_sy = mysql_fetch_assoc($query_sy);
$pdf->Cell(70, 10, "", '', 1);
$pdf->SetFillColor(150);
$pdf->Cell(190, 10, "SECTION DETAILS", 1, 1, '', true);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(95, 10, "NAME: " . $row_emp['l_name'] . ", " . $row_emp['f_name'], 1, '', '');
$pdf->Cell(95, 10, "SCHOOL YEAR: " . $row_sy['sy_start'] . " - " . $row_sy['sy_end'], 1, 1, '');
 $qSat = mysql_query($sSat) or die(mysql_error());
 $rSat = mysql_fetch_assoc($qSat);
 $satuan = $rSat['satuan'];
 $namabarang = $rSat['namabarang'];
 $i++;
 if ($no != 1) {
     $pdf->SetY($akhirY);
 }
 $akhirY = $pdf->GetY();
 if ($akhirY >= 260) {
     $pdf->AddPage();
     $akhirY = $pdf->GetY();
 }
 //no
 $pdf->Cell(8, 4, $no, 0, 0, 'L', 0);
 $pdf->SetX($pdf->GetX());
 $posisiY = round($pdf->GetY());
 $pdf->Cell(12, 5, substr($bar->kodebarang, 0, 3), 0, 0, 'C', 0);
 //nama barang
 $pdf->MultiCell(60, 5, " " . $namabarang . "\n" . $spek . $bar->catatan, 0, 'J', 0);
 $akhirY = $pdf->GetY();
 //naik lagi kursornya
 $pdf->SetY($posisiY);
 $pdf->SetX($pdf->GetX() + 82);
 //no pp + pt + jumlah + satuan + harga + total
 $pdf->Cell(12, 5, $nopp, 0, 0, 'C', 0);
 $pdf->Cell(12, 5, $unit, 0, 0, 'C', 0);
 $pdf->Cell(14, 5, number_format($jumlah, 2, '.', ','), 0, 0, 'R', 0);
 $pdf->Cell(14, 5, $bar->satuan, 0, 0, 'C', 0);
 if ($bar->matauang == 'IDR') {
     $pdf->Cell(29, 5, $bar->matauang . " " . number_format($harga_sat, 2, '.', ','), 0, 0, 'R', 0);
Beispiel #30
0
 $pdf->Cell(140, 5, "METODO DE PAGO: EFECTIVO");
 $pdf->Cell(50, 5, "IMPORTE:" . $datos[7]);
 $pdf->Ln();
 $pdf->Cell(10);
 $le = new EnLetras();
 $v = str_replace(",", "", $datos[7]);
 $pdf->Cell(148, 5, "Cantidad en Letra: " . $le->ValorEnLetras($totl, "pesos"));
 $pdf->Cell(50, 5, "I.V.A. \$" . $iva);
 $pdf->Ln();
 $pdf->Cell(154);
 $pdf->Cell(50, 5, "TOTAL: \$" . number_format($totl, 2));
 $pdf->ln();
 $pdf->ln();
 $pdf->ln();
 $img = "julia.png";
 $pdf->Cell(30, 40, $pdf->Image($img, $pdf->GetX(), $pdf->GetY(), 25, 25));
 $pdf->SetXY($pdf->GetX(), $pdf->GetY());
 $pdf->SetFont('Arial', 'B', 5);
 $pdf->MultiCell(70, 3, utf8_decode("Vigencia:  2 Años a partir de la fecha de aprobación de la asignación de folios, la cual es del 19 de Marzo de 2013. Vence el 19 de Marzo de 2015. No. de Aprobación: 24848803 Cantidad  500 del 1 al 500."));
 $pdf->Ln();
 $pdf->Cell(30);
 $pdf->SetFont('Arial', 'B', 6);
 $pdf->Cell(40, 5, "Efectos Fiscales al pago.");
 $pdf->Ln();
 $pdf->Cell(30);
 $pdf->Cell(40, 5, utf8_decode("Pago en una sola exhibición"));
 $pdf->Ln();
 $pdf->Ln();
 $pdf->Ln();
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->Cell(40);