function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("Laporan pencetakan bulanan penerimaan sptpd"), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("DAFTAR SPTPD", ": "), array('', ''), 6); $pdf->RowMultiBorderWithHeight(array("TAHUN", ": " . $param_arr['year_code']), array('', ''), 6); $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start']) . " s/d " . dateToString($param_arr['date_end'])), array('', ''), 6); $dbConn = new clsDBConnSIKP(); $query = "select * from sikp.f_laporan_pencetakan_bulanan(1," . $param_arr['year_code'] . ",'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "')"; //print_r($query); //exit; $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 9); $pdf->ln(2); $pdf->SetWidths(array(10, 24, 20, 15, 40, 18, 22, 25, 20, 61, 61, 27)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->SetWidths(array(10, 40, 35, 15, 40, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18)); $pdf->SetFont('arial', '', 7); $pdf->RowMultiBorderWithHeight(array("NO", "NAMA", "ALAMAT", "NPWPD", "DESEMBER THN SEBELUMNYA", "JANUARI", "FEBRUARI", "MARET", "APRIL", "MEI", "JUNI", "JULI", "AGUSTUS", "SEPTEMBER", "OKTOBER", "NOVEMBER"), array('LTB', 'LTB', 'LBT', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 9); $pdf->SetFont('arial', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $jumlah = 0; $jumlah = 0; while ($dbConn->next_record()) { $items[] = $item = array('nama' => $dbConn->f("nama"), 'alamat' => $dbConn->f("alamat"), 'npwpd' => $dbConn->f("npwpd"), 'last_desember' => $dbConn->f("last_desember"), 'januari' => $dbConn->f("januari"), 'februari' => $dbConn->f("februari"), 'maret' => $dbConn->f("maret"), 'april' => $dbConn->f("april"), 'mei' => $dbConn->f("mei"), 'juni' => $dbConn->f("juni"), 'juli' => $dbConn->f("juli"), 'agustus' => $dbConn->f("agustus"), 'september' => $dbConn->f("september"), 'oktober' => $dbConn->f("oktober"), 'november' => $dbConn->f("november")); $pdf->RowMultiBorderWithHeight(array($no, $item['nama'], $item['alamat'], $item['npwpd'], $item['last_desember'], $item['januari'], $item['februari'], $item['maret'], $item['april'], $item['mei'], $item['juni'], $item['juli'], $item['agustus'], $item['september'], $item['oktober'], $item['november']), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $jumlah += $dbConn->f("amount"); // $jumlah_wp+=$dbConn->f("jumlah_wp"); $no++; } //print_r($items); //exit; $pdf->SetWidths(array(250, 70)); $pdf->ln(8); $pdf->RowMultiBorderWithHeight(array("", "KASIE VOP"), array('', '', '', '', '', '', ''), 6); $pdf->Output("", "I"); exit; }
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $pdf->AddPage('Landscape', 'Letter'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("Penerimaan Global per WP"), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(30, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("Jenis Pajak", ": " . $param_arr['rqst_type_code']), array('', ''), 6); $pdf->RowMultiBorderWithHeight(array("Tanggal", ": " . dateToString($param_arr['date_start']) . " s/d " . dateToString($param_arr['date_end'])), array('', ''), 6); $dbConn = new clsDBConnSIKP(); $query = "select a.*, f_get_wilayah(b.npwd) as kode_wilayah , to_char(b.active_date,'dd-mm-yyyy') as active_date,\r\n\t\t\tb.brand_address_name ||' '|| nvl(b.brand_address_no,'') as alamat_new\r\n\t\t\tfrom sikp.f_laporan_global_wp2(" . $param_arr['p_rqst_type_id'] . ",'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "') a\r\n\t\t\tleft join t_cust_account b on a.npwpd = b.npwd\r\n\t\t\twhere f_get_wilayah_id(b.npwd) = " . $param_arr['kode_wilayah'] . " order by jenis_pajak,TRIM(company_brand)"; //echo $query;exit; $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 8); $pdf->ln(2); $pdf->SetWidths(array(10, 45, 50, 23, 25, 18, 50, 25, 23)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->RowMultiBorderWithHeight(array("NO", "NAMA WP", "ALAMAT", "NPWPD", "BESARNYA", "JML SSPD", "NAMA AYAT", "PENGUKUHAN", "KETERANGAN"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTBR'), 6); $pdf->SetFont('helvetica', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'R', 'R', 'R', 'L')); $jumlah = 0; $jumlah = 0; while ($dbConn->next_record()) { $items[] = array('nama_wp' => $dbConn->f("nama_wp"), 'alamat_new' => $dbConn->f("alamat_new"), 'npwpd' => $dbConn->f("npwpd"), 'amount' => $dbConn->f("amount"), 'tot_sspd' => $dbConn->f("tot_sspd"), 'active_date' => $dbConn->f("active_date"), 'kode_wilayah' => $dbConn->f("kode_wilayah"), 'jenis_pajak' => $dbConn->f("jenis_pajak")); $pdf->RowMultiBorderWithHeight(array($no, $dbConn->f("nama_wp"), $dbConn->f("alamat_new"), $dbConn->f("npwpd"), 'Rp. ' . number_format($dbConn->f("amount"), 2, ',', '.'), $dbConn->f("tot_sspd"), $dbConn->f('jenis_pajak'), $dbConn->f("active_date"), $dbConn->f("kode_wilayah")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $jumlah += $dbConn->f("amount"); $jumlah_wp += $dbConn->f("tot_sspd"); $no++; } $pdf->SetAligns(array('C', 'R', 'R', 'R', 'R', 'L')); $pdf->SetWidths(array(128, 25, 18)); $pdf->RowMultiBorderWithHeight(array('Jumlah', 'Rp. ' . number_format($jumlah, 2, ',', '.'), number_format($jumlah_wp, 0, ',', '.')), array('LB', 'LB', 'LBR'), 6); $pdf->SetWidths(array(123, 50)); $pdf->SetAligns('L'); $pdf->ln(5); $pdf->SetWidtHs(array(200, 70)); $pdf->SetAligns(array("C", "C", "C", "C", "C")); $pdf->RowMultiBorderWithHeight(array("", "KEPALA SEKSI VERIFIKASI OTORISASI DAN PEMBUKUAN\n\n\n\n\n(Drs. H. UGAS RAHMANSYAH, SAP, MAP)\n(NIP 19640127 199703 1001)"), array("", ""), 5); $pdf->Output("", "I"); echo 'tes'; exit; }
function print_laporan($param_arr, $param2) { include "lib/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('A4'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Portrait', 'A4'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 15); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("Laporan Transaksi Harian"), array('', ''), 6); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(40, 10, 200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("NPWP", ":", $param2['username']), array('', '', ''), 6); $pdf->RowMultiBorderWithHeight(array("Tanggal", ":", $param2['date_start'] . ' s/d ' . $param2['date_end']), array('', '', ''), 6); $pdf->ln(8); $pdf->SetWidths(array(10, 40, 40, 60)); $pdf->SetAligns(array('C', 'C', 'C', 'C')); $pdf->RowMultiBorderWithHeight(array("No", "Tanggal Transaksi", "No Faktur", "Nilai Transaksi"), array('LTBR', 'LTBR', 'LTBR'), 6); $i = 1; $pdf->SetAligns(array('L', 'L', 'L', 'R')); foreach ($param_arr as $item) { if ($item['bill_no_end'] != '') { $bill_no = $item['bill_no'] . '-' . $item['bill_no_end']; } else { $bill_no = $item['bill_no']; } $pdf->RowMultiBorderWithHeight(array($i, $item['trans_date'], $bill_no, 'Rp. ' . number_format($item['service_charge'], 2, '.', ',')), array('LTBR', 'LTBR', 'LTBR'), 6); $i++; } $pdf->Output("", "I"); exit; }
function search_pdf($VAR, $construct, $type) { # include fpdf class: include_once PATH_CORE . 'fpdf.inc.php'; # set the field list for this method: $arr = $construct->method["{$type}"]; # loop through the field list to create the sql queries $field_list = ''; $heading_list = ''; $width_list = ''; $i = 0; while (list($key, $value) = each($arr)) { if ($i == 0) { $field_var = $construct->table . '_' . $value; $field_list .= $value; $heading_list .= strtoupper($value); // <- translate $width_list .= $construct->field[$value]['pdf_width']; } else { $field_var = $construct->table . '_' . $value; $field_list .= "," . $value; $heading_list .= "," . strtoupper($value); // <- translate $width_list .= "," . $construct->field[$value]['pdf_width']; } $i++; } # start the new PDF class... $pdf = new PDF_MC_Table(); $pdf->Open(); $pdf->AddPage(); # Determine the number of columns and width for each one... $SetWidths = explode(",", $width_list); $pdf->SetWidths($SetWidths); # Define the table heading $TableHeading = explode(",", $heading_list); # Define the Properties for the table heading cells: # set the font: $pdf->HeadFontFamily = "Arial"; $pdf->HeadFontStyle = "BI"; $pdf->HeadFontSize = 8; # set the font color: $pdf->HeadTextColor1 = 255; $pdf->HeadTextColor2 = 255; $pdf->HeadTextColor3 = 255; # set the bg color: $pdf->HeadFillColor1 = 90; $pdf->HeadFillColor2 = 90; $pdf->HeadFillColor3 = 90; # set the hieght $pdf->HeadHeight = 6; # Print the Heading: $pdf->HeadRow($TableHeading); # Define the row settings for the rest of the cells... # define the font settings $pdf->SetFontFamily = "Arial"; $pdf->SetFontStyle = ""; $pdf->SetFontSize = "7"; # set the hieght $pdf->RowHeight = 4; /************** BEGIN STANDARD EXPORT SEARCH CODE *********************/ # set the field list for this method: $arr = $construct->method["{$type}"]; # loop through the field list to create the sql queries $arr = $construct->method[$type]; $field_list = ''; $i = 0; while (list($key, $value) = each($arr)) { if ($i == 0) { $field_var = $construct->table . '_' . $value; $field_list .= AGILE_DB_PREFIX . $construct->table . '.' . $value; // determine if this record is linked to another table/field if ($construct->field[$value]["asso_table"] != "") { $this->linked[] = array('field' => $value, 'link_table' => $construct->field[$value]["asso_table"], 'link_field' => $construct->field[$value]["asso_field"]); } } else { $field_var = $construct->table . '_' . $value; $field_list .= "," . AGILE_DB_PREFIX . $construct->table . "." . $value; // determine if this record is linked to another table/field if ($construct->field[$value]["asso_table"] != "") { $this->linked[] = array('field' => $value, 'link_table' => $construct->field[$value]["asso_table"], 'link_field' => $construct->field[$value]["asso_field"]); } } $i++; } # get the search details: if (isset($VAR['search_id'])) { include_once PATH_CORE . 'search.inc.php'; $search = new CORE_search(); $search->get($VAR['search_id']); } else { echo '<BR> The search terms submitted were invalid!'; } # get the sort order details: if (isset($VAR['order_by']) && $VAR['order_by'] != "") { $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $VAR['order_by']; $smarty_order = $VAR['order_by']; } else { $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $construct->order_by; $smarty_order = $search->order_by; } # format saved search string $sql = explode(" WHERE ", $search->sql); # generate the full query $q = preg_replace("/%%fieldList%%/i", $field_list, $search->sql); $q = preg_replace("/%%tableList%%/i", AGILE_DB_PREFIX . $construct->table, $q); $q = preg_replace("/%%whereList%%/i", "", $q); $q .= " " . AGILE_DB_PREFIX . $construct->table . ".site_id = '" . DEFAULT_SITE . "'"; $q .= $order_by; $db =& DB(); $result = $db->Execute($q); # error reporting if ($result === false) { global $C_debug; $C_debug->error('core:export.inc.php', 'search_xml', $db->ErrorMsg() . '<br><br>' . $q); echo "An SQL error has occured!"; return; } # put the results into an array $i = 0; $class_name = TRUE; $results = ''; while (!$result->EOF) { $results[$i] = $result->fields; $result->MoveNext(); $i++; } # get any linked fields if ($i > 0) { $this->result = $results; $db_join = new CORE_database(); $this->result = $db_join->join_fields($results, $this->linked); } else { $this->result = $results; } /************** END STANDARD EXPORT SEARCH CODE *********************/ # LOOP THROUGH THE RESULTS & DISPLAY AS PDF $results = $result->RecordCount(); $BackAlt = TRUE; while (!$result->EOF) { # get the data for each cell: reset($arr); $CurrRow = ''; $i = 0; while (list($key, $value) = each($arr)) { if ($i == 0) { $CurrRow .= $result->fields["{$key}"]; } else { $CurrRow .= "::" . $result->fields["{$key}"]; } $i++; } $ThisRow = explode("::", $CurrRow); # set the colors & fonts if ($BackAlt) { # alternating row 1: $pdf->SetTextColorVar1 = "50"; $pdf->SetTextColorVar2 = "50"; $pdf->SetTextColorVar3 = "50"; $pdf->SetFillColorVar1 = 255; $pdf->SetFillColorVar2 = 255; $pdf->SetFillColorVar3 = 255; $BackAlt = FALSE; } else { # alternating row 2: $pdf->SetTextColorVar1 = "0"; $pdf->SetTextColorVar2 = "0"; $pdf->SetTextColorVar3 = "0"; $pdf->SetFillColorVar1 = 240; $pdf->SetFillColorVar2 = 240; $pdf->SetFillColorVar3 = 240; $BackAlt = TRUE; } # check for needed page break $nb = 0; for ($ii = 0; $ii < count($dataarr); $ii++) { $nb = max($nb, $pdf->NbLines($pdf->widths[$ii], $dataarr[$ii])); } $h = 5 * $nb; # Issue a page break first if needed if ($pdf->CheckPageBreak($h)) { # print the Table Heading again $pdf->HeadRow($TableHeading); } $pdf->Row($ThisRow); # Next record $result->MoveNext(); } # Dispay the output $pdf->Output(); exit; }
public function printNoBayar() { include "lib/fpdf17/mc_table.php"; include "lib/qrcode/generate-qr-file.php"; $_GET['payment_key'] = $_GET['no_bayar']; $items = self::read(); $no_bayar = wbRequest::getVarClean('no_bayar', 'str', ''); $data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => ''); try { $ws_client = self::getNusoap(); $params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 't_vat_settlement', 'method' => 'getPaymentInfo', 'type' => 'json')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit); $ws_data = self::getResultData($ws_client, $params); //throw new Exception ($ws_data['da']); $data['items'] = $ws_data['data']; $data['total'] = $ws_data['total']; $data['message'] = $ws_data['message']; $data['success'] = $ws_data['success']; $data['msg'] = $data['message']; } catch (Exception $e) { $data['message'] = $e->getMessage(); } $items = $data['items']; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', array(160, 210)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetTopMargin(-20); $pdf->SetAutoPageBreak(false, 0); $pdf->Image('images/logo_pemda_warna.png', 12, 15, 20, 20); $pdf->SetFont('helvetica', 'B', 14); $pdf->SetWidths(array(10, 165)); $pdf->SetAligns(array("C", "C")); $pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\nDINAS PELAYANAN PAJAK"), array('', ''), 6); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(15, 165)); $pdf->SetAligns(array("C", "C")); $pdf->RowMultiBorderWithHeight(array("", "Jalan Wastukancana No.2\nTelp. 022-4235052 - Bandung"), array('', ''), 6); $pdf->SetWidths(array(15, 165, 20)); $pdf->RowMultiBorderWithHeight(array("", "", ""), array('B', 'B', 'B'), 6); $pdf->ln(2); $pdf->SetFont('helvetica', '', 12); $pdf->SetAligns(array("L", "L", "L")); $pdf->SetWidths(array(40, 4, 80)); $pdf->ln(2); $pdf->RowMultiBorderWithHeight(array("MERK DAGANG", ":", $items['company_brand']), array('', '', ''), 6); $pdf->RowMultiBorderWithHeight(array("ALAMAT", ":", $items['brand_address_name'] . " " . $items['brand_address_no']), array('', '', ''), 6); $pdf->SetAligns(array("L", "L", "L", "C")); $pdf->SetWidths(array(40, 4, 80, 70)); $pdf->RowMultiBorderWithHeight(array("NPWPD", ":", $items['npwd'], "NOMOR PEMBAYARAN"), array('', '', '', 'BLTR'), 6); $pdf->SetAligns(array("L", "L", "L")); $pdf->SetWidths(array(40, 4, 80)); //$pdf->RowMultiBorderWithHeight(array("JENIS PAJAK",":",$items['items'][0]['vat_code']),array('','',''),6); $pdf->Cell(40, 6, 'JENIS PAJAK', "", 0, 'l'); $pdf->Cell(4, 6, ':', "", 0, 'L'); $pdf->Cell(80, 6, $items['vat_code'], "", 0, 'L'); $pdf->SetFont('helvetica', 'B', 26); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(70, 15, $no_bayar, "BLTR", 0, 'C'); $pdf->SetFont('helvetica', '', 12); $pdf->SetTextColor(0, 0, 0); $pdf->ln(6); $pdf->RowMultiBorderWithHeight(array("MASA PAJAK", ":", $items['code']), array('', '', ''), 6); $pdf->SetAligns(array("L", "L", "R")); $pdf->SetWidths(array(40, 4, 40)); $pdf->RowMultiBorderWithHeight(array("JUMLAH (Rp)", ":", number_format($items['total_vat_amount'], 2, ",", ".")), array('', '', ''), 6); $pdf->RowMultiBorderWithHeight(array("DENDA (Rp)", ":", number_format($items['total_penalty_amount'], 2, ",", ".")), array('', '', ''), 6); $pdf->RowMultiBorderWithHeight(array("TOTAL (Rp)", ":", number_format($items['total_bayar'], 2, ",", ".")), array('', '', ''), 6); $pdf->SetAligns(array("L", "L", "L")); $pdf->SetWidths(array(40, 4, 80)); $pdf->RowMultiBorderWithHeight(array("TERBILANG", ":", ucwords($items['dengan_huruf'] . ' rupiah')), array('', '', ''), 6); //$pdf->RowMultiBorderWithHeight(array("BATAS WAKTU PEMBAYARAN",":",$items['items'][0]['pay_due_date']),array('','',''),6); $pdf->SetWidths(array(200)); $pdf->SetAligns(array("L")); $pdf->SetFont('helvetica', '', 10); $pdf->ln(6); $pdf->RowMultiBorderWithHeight(array("*Nomor pembayaran dan denda pajak yang tertera pada slip ini hanya berlaku pada hari ini, tanggal " . $items['settlement_date'] . " sampai dengan pukul 23:59 WIB"), array(''), 6); //$pdf->RowMultiBorderWithHeight(array("**Keterlambatan pembayaran melewati tanggal jatuh tempo akan dikenakan denda sesuai administrasi berupa bunga sebesar 2% (dua persen) setiap bulannya."), //array(''),6); $pdf->ln(8); $pdf->SetFont('helvetica', '', 12); $pdf->SetAligns(array("C")); $pdf->RowMultiBorderWithHeight(array("Bandung, " . $items['settlement_date'] . " Pukul " . $items['pukul']), array(''), 6); $pdf->SetFont('helvetica', '', 12); $pdf->RowMultiBorderWithHeight(array("BAYAR PAJAK MUDAH BANDUNG JUARA"), array(''), 6); $pdf->Image('http://' . $_SERVER['HTTP_HOST'] . '/mpd-wp/client/lib/qrcode/generate-qr.php?param=' . $no_bayar . '', 175, 13, 25, 25, 'PNG'); $pdf->Output(time() . "_kwitansi_" . $no_bayar, "I"); exit; }
$this->Row(array(utf8_decode("\nFecha de inicio: {$rowPas['fecha_inicio']}"), utf8_decode("\nFecha de finalización: {$rowPas['fecha_fin']}"))); if ($rowPas['tiempo_completo'] == TRUE) { $this->SetWidths(array(45, 45, 17.5, 45, 17.5)); $this->SetAligns(array('L')); $this->Row(array(utf8_decode("\nTiempo de pasantía: "), utf8_decode("\nTiempo completo: "), utf8_decode(" \n X "), utf8_decode("\nMedio tiempo: "), utf8_decode("\n"))); } else { $this->SetWidths(array(45, 45, 17.5, 45, 17.5)); $this->SetAligns(array('L')); $this->Row(array(utf8_decode("\nTiempo de pasantía: "), utf8_decode("\nTiempo completo: "), utf8_decode("\n"), utf8_decode("\nMedio tiempo: "), utf8_decode(" \n X "))); } $this->SetX(20); $this->SetWidths(array(170)); $this->SetAligns(array('L')); $this->Row(array(utf8_decode("\nHorario de trabajo del Pasante: {$rowPas['horario']}"))); $this->SetX(20); $this->SetWidths(array(170)); $this->SetAligns(array('L')); $this->Row(array(utf8_decode("\nActividades a realizar por el pasante: \n\n{$rowPas['actividades']}"))); $this->SetX(20); $this->SetWidths(array(56, 57, 57)); $this->SetAligns(array('L')); $this->Row(array(utf8_decode("\nFirma del Pasante: "), utf8_decode("\nFirma del Supervisor Inmediato: \n\n\n\n\n "), utf8_decode("\nFirma del Coordinador de Pasantías: "))); } } //Main $pdf = new PDF_MC_Table('P', 'mm', 'Letter'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Membrete(); $pdf->formatoTabla(); $pdf->Output("formato_dpe_pas_002.pdf", "D");
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $textFilter = ''; if (!empty($param_arr['filter_lap'])) { if ($param_arr['filter_lap'] == 1) { //sudah bayar $textFilter = '(Sudah Bayar)'; } if ($param_arr['filter_lap'] == 2) { //belum bayar $textFilter = '(Belum Bayar)'; } if ($param_arr['filter_lap'] == 3) { //belum bayar $textFilter = '(Nihil)'; } } $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("DAFTAR NOTA VERIFIKASI BPHTB " . $textFilter), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start'], "-") . " s/d " . dateToString($param_arr['date_end'], "-")), array('', ''), 6); $dbConn = new clsDBConnSIKP(); $whereClause = ''; if (!empty($param_arr['date_start']) && !empty($param_arr['date_end'])) { $whereClause .= " AND (trunc(reg_bphtb.creation_date) BETWEEN '" . $param_arr['date_start'] . "'"; $whereClause .= " AND '" . $param_arr['date_end'] . "')"; } else { if (!empty($param_arr['date_start']) && empty($param_arr['date_end'])) { $whereClause .= " AND trunc(reg_bphtb.creation_date) >= '" . $param_arr['date_start'] . "'"; } else { if (empty($param_arr['date_start']) && !empty($param_arr['date_end'])) { $whereClause .= " AND trunc(reg_bphtb.creation_date) <= '" . $param_arr['date_end'] . "'"; } } } if (!empty($param_arr['filter_lap'])) { if ($param_arr['filter_lap'] == 1) { //sudah bayar $whereClause .= " AND (payment.receipt_no is not null or payment.receipt_no <> '') "; $whereClause .= " AND ( bphtb_amt_final > 0 ) "; } if ($param_arr['filter_lap'] == 2) { //belum bayar $whereClause .= " AND ( payment.receipt_no is null or payment.receipt_no = '') "; $whereClause .= " AND ( bphtb_amt_final > 0 ) "; } if ($param_arr['filter_lap'] == 3) { //nihil $whereClause .= " AND ( bphtb_amt_final < 1 ) "; } } $query = "SELECT\r\n\t\t\t\tto_char(reg_bphtb.creation_date, 'YYYY-MM-DD') as creation_date,\r\n\t\t\t\tregistration_no,\r\n\t\t\t\twp_name,\r\n\t\t\t\treg_bphtb.p_bphtb_legal_doc_type_id,\r\n\t\t\t\tbphtb_doc.description,\r\n\t\t\t\tnjop_pbb,\r\n\t\t\t\tland_area,\r\n\t\t\t\tland_total_price,\r\n\t\t\t\tbuilding_area,\r\n\t\t\t\tbuilding_total_price,\r\n\t\t\t\tmarket_price,\r\n\t\t\t\tbphtb_amt_final,\r\n\t\t\t\tland_price_per_m,\r\n\t\t\t\tbuilding_price_per_m\r\n\t\t\tFROM\r\n\t\t\t\tsikp.t_bphtb_registration reg_bphtb\r\n\t\t\tLEFT JOIN p_bphtb_legal_doc_type bphtb_doc on bphtb_doc.p_bphtb_legal_doc_type_id = reg_bphtb.p_bphtb_legal_doc_type_id\r\n\t\t\tLEFT JOIN t_customer_order cust_order ON cust_order.t_customer_order_id = reg_bphtb.t_customer_order_id \r\n\t\t\tLEFT JOIN t_payment_receipt_bphtb payment ON reg_bphtb.t_bphtb_registration_id = payment.t_bphtb_registration_id \r\n\t\t\tWHERE cust_order.p_order_status_id <> 1"; $query .= $whereClause; $query .= " order by trunc(reg_bphtb.creation_date) ASC,upper(wp_name) ASC"; $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 9); $pdf->ln(2); $pdf->SetWidths(array(10, 24, 20, 15, 40, 18, 22, 25, 20, 61, 61, 27)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->SetWidths(array(10, 24, 23, 37, 30, 35, 18, 28, 24, 28, 25, 40, 18, 18, 18, 18, 18)); $pdf->SetFont('arial', '', 7); $pdf->RowMultiBorderWithHeight(array("NO", "TANGGAL", "NO.REGISTRASI", "NAMA WP", "JENIS TRANSAKSI", "NOP", "LT / LB", "HARGA TANAH / m2 (Rp)", "HARGA BANGUNAN / m2 (Rp)", "TOTAL NJOP (Rp)", "HARGA PASAR / TRANSAKSI / LELANG (Rp)", "NILAI PAJAK YANG HARUS DIBAYAR(Rp)"), array('LTB', 'LTB', 'LBT', 'LTB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 5); $pdf->SetFont('arial', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R')); $jumlah = 0; $jumlah = 0; $total_nilai_pajak = 0; $nilai_njop = 0; while ($dbConn->next_record()) { $items[] = $item = array('creation_date' => $dbConn->f("creation_date"), 'registration_no' => $dbConn->f("registration_no"), 'wp_name' => $dbConn->f("wp_name"), 'p_bphtb_legal_doc_type_id' => $dbConn->f("p_bphtb_legal_doc_type_id"), 'description' => $dbConn->f("description"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'land_area' => $dbConn->f("land_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'building_area' => $dbConn->f("building_area"), 'building_total_price' => $dbConn->f("building_total_price"), 'market_price' => $dbConn->f("market_price"), 'bphtb_amt_final' => $dbConn->f("bphtb_amt_final"), 'land_price_per_m' => $dbConn->f("land_price_per_m"), 'building_price_per_m' => $dbConn->f("building_price_per_m")); $nilai_njop = $dbConn->f("building_total_price") + $dbConn->f("land_total_price"); $pdf->RowMultiBorderWithHeight(array($no, dateToString($item['creation_date']), $item['registration_no'], $item['wp_name'], $item['description'], $item['njop_pbb'], number_format($item['land_area'], 0, ",", ".") . " / " . number_format($item['building_area'], 0, ",", "."), number_format($item['land_price_per_m'], 2, ",", "."), number_format($item['building_price_per_m'], 2, ",", "."), number_format($nilai_njop, 2, ",", "."), number_format($item['market_price'], 2, ",", "."), number_format($item['bphtb_amt_final'], 2, ",", ".")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $jumlah += $dbConn->f("amount"); // $jumlah_wp+=$dbConn->f("jumlah_wp"); $total_nilai_pajak += $item['bphtb_amt_final']; $no++; } $pdf->SetWidths(array(282, 40)); $pdf->SetAligns(array('C', 'R')); $pdf->SetFont('arial', 'B', 8); $pdf->RowMultiBorderWithHeight(array("TOTAL", number_format($total_nilai_pajak, 2, ",", ".")), array('LB', 'LBR'), 6); /*print_r($items); exit;*/ //$pdf->SetWidths(array(250,70)); $pdf->ln(12); $pdf->SetAligns(array("C", "C")); $pdf->SetWidths(array(169, 163)); $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n RACHMAT SATIADI, SIP, M.Si. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Koordinator BPHTB" . "\n\n\n\n\n\n\n\n ZAENAL MANSUR \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4); $pdf->RowMultiBorderWithHeight(array("NIP : 19691104.1998.03.1.007", "NIP : 19630817.1989.01.1.006"), array("", ""), 1); //$pdf->RowMultiBorderWithHeight(array("","KASIE VOP"),array('','','','','','',''),6); $pdf->Output("", "I"); exit; }
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', array(150, 40)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $items = explode('#', $param_arr); foreach ($items as $item) { $pdf->RowMultiBorderWithHeight(array($item), array('', ''), 6); } //$pdf->ln(8); $handle = printer_open("HP Deskjet 930c"); $pdf->Output("", "I"); echo 'tes'; exit; }
$data["dengan_huruf"] = $dbConn->f("dengan_huruf"); $data["kode_rekening"] = $dbConn->f("kode_rekening"); $data["nama_rekening"] = $dbConn->f("nama_rekening"); $data["start_period"] = $dbConn->f("start_period"); $data["end_period"] = $dbConn->f("end_period"); } $_HEIGHT = 4; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('P', array(210, 296)); //$pdf->AddPage('P',array(210,296)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin($_HEIGHT); $pdf->SetLeftMargin($_HEIGHT); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('Arial', '', 9); //$pdf->Image('../images/logo_pemda.png',10,5,20,20); $pdf->ln(20); $pdf->SetWidths(array(5, 130, 60)); $pdf->SetAligns(array("L", "L", "L")); $pdf->RowMultiBorderWithHeight(array("", "USER ID : " . $data["p_cg_terminal_id"], "TGL CETAK : " . date('d/m/Y')), array("", "", ""), $_HEIGHT); $pdf->SetWidths(array(5, 130, 60)); $pdf->SetAligns(array("L", "L", "L")); $pdf->RowMultiBorderWithHeight(array("", "DISYANJAK", "JAM CETAK : " . date('H:i:s')), array("", "", ""), $_HEIGHT); $pdf->ln();
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("LAPORAN PENERIMAAN BPHTB "), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start'], true) . " s/d " . dateToString($param_arr['date_end'], true)), array('', ''), 6); $dbConn = new clsDBConnSIKP(); $whereClause = ''; $criteria = array(); if (!empty($param_arr['date_start']) && !empty($param_arr['date_end'])) { $criteria[] = " (trunc(a.payment_date) BETWEEN '" . $param_arr['date_start'] . "' AND '" . $param_arr['date_end'] . "') "; } else { if (!empty($param_arr['date_start']) && empty($param_arr['date_end'])) { $criteria[] = " trunc(a.payment_date) >= '" . $param_arr['date_start'] . "' "; } else { if (empty($param_arr['date_start']) && !empty($param_arr['date_end'])) { $criteria[] = " trunc(a.payment_date) <= '" . $param_arr['date_end'] . "' "; } } } if (!empty($param_arr['receipt_no'])) { $criteria[] = " a.receipt_no ILIKE '%" . $param_arr['receipt_no'] . "%' "; } if (!empty($param_arr['njop_pbb'])) { $criteria[] = " b.njop_pbb = '" . $param_arr['njop_pbb'] . "' "; } if (!empty($param_arr['wp_name'])) { $criteria[] = " b.wp_name ILIKE '%" . $param_arr['wp_name'] . "%' "; } if (!empty($param_arr['p_region_id_kecamatan'])) { $criteria[] = " b.wp_p_region_id_kec = " . $param_arr['p_region_id_kecamatan']; } if (!empty($param_arr['p_region_id_kelurahan'])) { $criteria[] = " b.wp_p_region_id_kel = " . $param_arr['p_region_id_kelurahan']; } if ($param_arr['p_bphtb_legal_doc_type_id'] != 0) { $criteria[] = " b.p_bphtb_legal_doc_type_id = " . $param_arr['p_bphtb_legal_doc_type_id']; } $whereClause = join(" AND ", $criteria); $query = "SELECT a.receipt_no, b.njop_pbb, to_char(a.payment_date, 'YYYY-MM-DD') AS payment_date, to_char(b.creation_date, 'YYYY-MM-DD') AS creation_date,\r\n\t\t\t\t\tb.wp_name, b.wp_address_name, kelurahan.region_name AS kelurahan_name, kecamatan.region_name AS kecamatan_name, b.land_area, b.building_area, b.land_total_price, a.payment_amount \r\n\t\t\t\t\tFROM t_payment_receipt_bphtb AS a\r\n\t\t\tLEFT JOIN t_bphtb_registration AS b ON a.t_bphtb_registration_id = b.t_bphtb_registration_id\r\n\t\t\tLEFT JOIN p_region AS kelurahan ON b.wp_p_region_id_kel = kelurahan.p_region_id\r\n\t\t\tLEFT JOIN p_region AS kecamatan ON b.wp_p_region_id_kec = kecamatan.p_region_id"; if (!empty($whereClause)) { $query .= " WHERE " . $whereClause; } $query .= " order by trunc(b.creation_date) ASC, upper(b.wp_name) ASC"; //print_r($query); //exit; $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 9); $pdf->ln(2); /* HEADER */ $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->SetWidths(array(10, 28, 35, 19, 19, 41, 51, 28, 28, 15, 15, 25, 28)); $pdf->SetFont('arial', 'B', 7); $pdf->RowMultiBorderWithHeight(array("NO", "NO TRANSAKSI", "NOP", "TGL BAYAR", "TGL DAFTAR", "NAMA", "ALAMAT", "KELURAHAN", "KECAMATAN", "LUAS TNH", "LUAS BGN", "NJOP (Rp)", "TOTAL BAYAR (Rp)"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'TLBR'), 5); /* END HEADER */ /* CONTENTS */ $pdf->SetFont('arial', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'C', 'C', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R')); $total_nilai_penerimaan = 0; while ($dbConn->next_record()) { $items[] = $item = array('receipt_no' => $dbConn->f("receipt_no"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'payment_date' => $dbConn->f("payment_date"), 'creation_date' => $dbConn->f("creation_date"), 'wp_name' => $dbConn->f("wp_name"), 'wp_address_name' => $dbConn->f("wp_address_name"), 'kelurahan_name' => $dbConn->f("kelurahan_name"), 'kecamatan_name' => $dbConn->f("kecamatan_name"), 'land_area' => $dbConn->f("land_area"), 'building_area' => $dbConn->f("building_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'payment_amount' => $dbConn->f("payment_amount")); $pdf->RowMultiBorderWithHeight(array($no, $item['receipt_no'], $item['njop_pbb'], dateToString($item['payment_date']), dateToString($item['creation_date']), trim(strtoupper($item['wp_name'])), $item['wp_address_name'], $item['kelurahan_name'], $item['kecamatan_name'], number_format($item['land_area'], 0), number_format($item['building_area'], 0), number_format($item['land_total_price'], 0, ",", "."), number_format($item['payment_amount'], 0, ",", ".")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $total_nilai_penerimaan += $item['payment_amount']; $no++; } /* END CONTENTS */ /* BOTTOM */ $pdf->SetWidths(array(314, 28)); $pdf->SetAligns(array('C', 'R')); $pdf->SetFont('arial', 'B', 8); $pdf->RowMultiBorderWithHeight(array("TOTAL", number_format($total_nilai_penerimaan, 0, ",", ".")), array('LB', 'LBR'), 6); /* END BOTTOM */ $pdf->ln(12); $pdf->SetAligns(array("C", "C")); $pdf->SetWidths(array(169, 163)); if ($param_arr['date_start'] == '') { $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n DIN KAMADIANTINI S.IP, MM \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4); $pdf->RowMultiBorderWithHeight(array("NIP : 19710320.199803.2.006", "NIP : 19731031.2009.1.1001"), array("", ""), 1); } else { if (date(strtotime($param_arr['date_start'])) < date(strtotime('01-06-2015'))) { $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n RACHMAT SATIADI, S.IP, M.Si \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4); $pdf->RowMultiBorderWithHeight(array("NIP : 19691104.199803.1.007", "NIP : 19731031.2009.1.1001"), array("", ""), 1); } else { $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n DIN KAMADIANTINI S.IP, MM \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4); $pdf->RowMultiBorderWithHeight(array("NIP : 19710320.199803.2.006", "NIP : 19731031.2009.1.1001"), array("", ""), 1); } } $pdf->Output("", "I"); exit; }
function reporteKardexProduccion() { $txtFechaInicio = $_REQUEST['txtFechaInicio']; $txtFechaFinal = $_REQUEST['txtFechaFinal']; $idProducto = $_REQUEST['idProducto']; $idTipoMovimiento = $_REQUEST['idTipoMovimiento']; $idTipoOperacion = $_REQUEST['idTipoOperacion']; $txtDescripcion = $_REQUEST['txtDescripcion']; $reporte = $this->AutoLoadModel('reporte'); $datos = $reporte->reporteKardexProduccion($txtFechaInicio, $txtFechaFinal, $idProducto, $idTipoMovimiento, $idTipoOperacion); $cantidadData = count($datos); $pdf = new PDF_MC_Table("L", "mm", "A4"); $titulos = array('#', 'FECHA', 'T. MOV.', 'CONCEPTO', 'ORDEN', 'RAZON SOCIAL', 'DEVOLUCION', 'PRECIO', 'CANT. ', 'SALDO', 'IMPORTE S/.'); $pdf->SetFont('Helvetica', 'B', 7.5); $ancho = array(8, 18, 20, 30, 18, 70, 20, 20, 15, 15, 20); $orientacion = array('', 'C', 'C', '', 'C', '', 'C', 'R', 'C', 'C', 'R'); $tipoCambioVentas = $this->configIni($this->configIni('Globals', 'Modo'), 'TipoCambio'); $pdf->SetWidths($ancho); if (!empty($txtFechaFinal) || !empty($txtFechaInicio)) { $fecha1 = !empty($txtFechaInicio) ? $txtFechaInicio : utf8_decode('?'); $fecha2 = !empty($txtFechaFinal) ? $txtFechaFinal : utf8_decode('?'); $pdf->_fecha = 'Rango Fecha: ' . $fecha1 . ' - ' . $fecha2; } $pdf->_titulo = "REPORTE::KARDEX DE PRODUCCION"; $pdf->_datoPie = $txtDescripcion . ' ' . 'Impreso el :' . date('Y-m-d H:m:s'); $pdf->AddPage(); $pdf->_titulos = $titulos; $relleno = true; $pdf->fill($relleno); $pdf->SetFillColor(0224, 235, 255); $pdf->SetTextColor(0); $pdf->SetDrawColor(12, 78, 139); $pdf->SetLineWidth(0.3); $pdf->_orientacion = $orientacion; $pdf->SetAligns($orientacion); $pdf->SetTitulos($titulos); $pdf->SetFillColor(0224, 235, 255); $pdf->SetTextColor(0); $pdf->SetDrawColor(12, 78, 139); $importeFactura = 0; $importeBoleta = 0; for ($i = 0; $i < $cantidadData; $i++) { $modoFactura = ""; $fila = array($i + 1, $datos[$i]['fecha'], $datos[$i]['tipo movimiento'], $datos[$i]['concepto movimiento'], $datos[$i]['codigov'], html_entity_decode($datos[$i]['razon social'], ENT_QUOTES, 'UTF-8'), $datos[$i]['devolucion'], number_format($datos[$i]['precio'], 2), $datos[$i]['cantidad'], $datos[$i]['saldo'], number_format(round($datos[$i]['precio'], 2) * $datos[$i]['cantidad'], 2)); $pdf->Row($fila); $relleno = !$relleno; $pdf->fill($relleno); } $pdf->AliasNbPages(); $pdf->Output(); }
function afficherPDF($vpdf) { require 'fpdf/mc_table.php'; $pdf = ob_get_clean(); $pdf = new PDF_MC_Table(); $pdf->AddPage(); $pdf->SetFont('Times', '', 12); $pdf->Image("images/logo.png", 7, 5, 50.9); $pdf->SetXY(9, 15); $pdf->RoundedRect(95, 54, 110, 35, 2, 'D'); $pdf->SetXY(9, 40); $pdf->MultiCell(80, 5, utf8_decode("Siège social : GSB\nPhiladelphie, \nPennsylvanie, Etats-Unis\ngsb_galaxybourdin@gmail.com "), 0, "L", 0); $pdf->SetXY(100, 57); $pdf->MultiCell(100, 7, utf8_decode("Client : " . $vpdf['nom'] . " " . $vpdf['prenom'] . "\nAdresse : " . $vpdf['adresse'] . "\nCode postal : " . $vpdf['cp'] . "\nVille : " . $vpdf['ville']), 0, "L", 0); $pdf->SetXY(9, 100); $pdf->MultiCell(80, 5, utf8_decode("Remboursement du : " . $vpdf['numMois'] . " / " . $vpdf['numAnnee']), 0, "L", 0); $pdf->SetWidths(array(47.5, 47.5, 47.5, 47.5)); srand(microtime() * 1000000); $pdf->SetXY(10, 110); $pdf->MultiCell(190, 7, utf8_decode('Eléments forfaitisés'), 1, "L", 0); $pdf->Row2(array('Frais forfaitaires', utf8_decode('Quantité'), 'Montant unitaire', 'Montant total')); $pdf->Row2(array($vpdf['libelle'][0], utf8_decode($vpdf['quantite'][0]), $vpdf['montant'][0], $vpdf['montantT'][0] . " " . html_entity_decode($vpdf['euros']))); $pdf->Row2(array(utf8_decode($vpdf['libelle'][1]), utf8_decode($vpdf['quantite'][1]), $vpdf['montant'][1], $vpdf['montantT'][1] . " " . html_entity_decode($vpdf['euros']))); $pdf->Row2(array(utf8_decode($vpdf['libelle'][2]), utf8_decode($vpdf['quantite'][2]), $vpdf['montant'][2], $vpdf['montantT'][2] . " " . html_entity_decode($vpdf['euros']))); $pdf->Row2(array(utf8_decode($vpdf['libelle'][3]), utf8_decode($vpdf['quantite'][3]), $vpdf['montant'][3], $vpdf['montantT'][3] . " " . html_entity_decode($vpdf['euros']))); $pdf->SetXY(10, 157); mysql_connect('localhost', 'root', ''); mysql_select_db('gsbv2'); //First table: put all columns automatically $pdf->MultiCell(190, 7, utf8_decode('Eléments hors forfait'), 1, "L", 0); $prop = array('HeaderColor' => array(205, 216, 211), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 250), 'padding' => 2); $pdf->AddCol('date', 35, '', 'Date'); $pdf->AddCol('libelle', 105, 'Libelle'); $pdf->AddCol('montant', 50, 'Montant', 'R'); $pdf->Table("select date,libelle,montant from lignefraishorsforfait lf where lf.mois='" . $vpdf['mois'] . "' and lf.idVisiteur='" . $vpdf['id'] . "' " . "UNION ALL (select date,libelle,montant as idlfr from lignefraishorsforfaitrefuse lfr where lfr.mois='" . $vpdf['mois'] . "' and lfr.idVisiteur='" . $vpdf['id'] . "')", $prop); $pdf->SetXY(10, 200); $pdf->SetXY(130, 230); $pdf->MultiCell(70, 7, "Total du " . $vpdf['numMois'] . " / " . $vpdf['numAnnee'] . " : " . $vpdf['montVal'] . " " . html_entity_decode($vpdf['euros']) . "\nNombre de justificatifs : " . $vpdf['nbJust'] . " fiche(s)" . utf8_decode("\nMontant refusé : ") . $vpdf['montRefuse'] . " " . html_entity_decode($vpdf['euros']) . "\nFait le : " . $vpdf['dateNow'] . "", 1, "R", 0); $pdf->Output(); }
public function generateReport($field_names, $field_data, $field_widths, $data = array()) { try { $main_heading = ''; //require('mc_table.php'); defined('FPDF_FONTPATH') || define('FPDF_FONTPATH', 'FPDF/font'); if (isset($data['grid_no']) && $data['grid_no'] == 1 || isset($data['grid_count']) && $data['grid_count'] == 1) { $pdf = new PDF_MC_Table(); $pdf->AddPage(); // Headings $pdf->SetFont('Arial', '', 21); if (!empty($data['project_name'])) { $main_heading .= $data['project_name']; $pdf->Row(array($main_heading), $data); } } elseif (isset($data['pdf_object'])) { $pdf = $data['pdf_object']; $pdf->Ln(10); } $pdf->Ln(4); // Sub heading $pdf->SetFont('Arial', '', 15); $pdf->SetTextColor(20); $pdf->Cell(60, 10, $data['object_name'], 0, 0); $pdf->Cell(88); $pdf->SetFont('Arial', '', 9); $pdf->Cell(32, 10, date("F jS, Y", time()), 0, 1); // To show report generated date $pdf->Ln(5); if (isset($data['count_emp_reporting'])) { $pdf->Cell(60, 10, "My Team Count : " . $data['count_emp_reporting'], 0, 1); $pdf->Ln(5); } $pdf->SetFont('Arial', '', 9); //Table with 20 rows and 4 columns $pdf->SetWidths($field_widths); srand(microtime() * 1000000); // Header // Colors, line width and bold font $pdf->SetFillColor(249, 249, 249); $pdf->SetTextColor(20); $pdf->SetDrawColor(198, 200, 201); $pdf->SetLineWidth(0.3); $pdf->SetFont('', 'B'); foreach ($field_names as $field_name) { $pdf->field_names[] = strtoupper($field_name['field_label']); } if (isset($data['field_name_align'])) { $pdf->SetAligns($data['field_name_align']); $pdf->Row($pdf->field_names); $pdf->field_name_align = $data['field_name_align']; } else { $pdf->Row($pdf->field_names); } //Data // Color and font restoration $pdf->SetFillColor(249, 249, 249); $pdf->SetTextColor(68); $pdf->SetFont(''); if ($field_data) { foreach ($field_data as $rec) { $row_values = array(); foreach ($field_names as $field_name) { if (isset($field_name['field_name'])) { if (isset($data['field_value_align'])) { $pdf->SetAligns($data['field_value_align']); $pdf->field_value_align = $data['field_value_align']; } else { //$pdf->SetAligns(array()); } if (is_object($rec[$field_name['field_name']])) { $rec[$field_name['field_name']] = $rec[$field_name['field_name']]->format('m-d-Y'); } $row_values[] = $rec[$field_name['field_name']] == '' ? "--" : $rec[$field_name['field_name']]; } } $pdf->Row($row_values); } } if (isset($data['grid_no']) && $data['grid_no'] == 'last' || isset($data['grid_count']) && $data['grid_count'] == 1) { // AJAX download $file = BASE_PATH . '/downloads/reports/' . $data['file_name']; $pdf->Output($file, 'F'); // Normal download /*$pdf->Output($data['file_name'],'D'); exit();*/ } else { return $pdf; } } catch (Exception $e) { exit($e->getMessage()); } }
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("Laporan penerimaan"), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("DAFTAR SPTPD", ": "), array('', ''), 6); //$pdf->RowMultiBorderWithHeight(array("TAHUN",": ".$param_arr['year_code']),array('',''),6); //$pdf->RowMultiBorderWithHeight(array("TANGGAL",": ".dateToString($param_arr['date_start'])." s/d ".dateToString($param_arr['date_end'])),array('',''),6); $dbConn = new clsDBConnSIKP(); //$query="select * from sikp.f_laporan_harian_denda(1,".$param_arr['year_code'].",'".$param_arr['date_start']."', '".$param_arr['date_end']."')"; $query = "\r\nSELECT\r\n\tnama,\r\n\talamat,\r\n\tnpwpd,\r\n\tto_char(\r\n\t\ttrunc(start_period),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS start_period_formated,\r\n\tto_char(\r\n\t\ttrunc(end_period),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS end_period_formated,\r\n\tno_kohir,\r\n\tto_char(\r\n\t\ttrunc(tgl_masuk),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS tgl_masuk_formated,\r\n\tto_char(\r\n\t\ttrunc(jatuh_tempo),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS jatuh_tempo_formated,\r\n\tto_char(\r\n\t\ttrunc(tgl_bayar),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS tgl_bayar_formated,\r\n\tskpdkb_amount,\r\n\tto_char(\r\n\t\ttrunc(skpdkb_tgl_tap),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS skpdkb_tgl_tap_formated,\r\n\tto_char(\r\n\t\ttrunc(skpdkb_tgl_bayar),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS skpdkb_tgl_bayar_formated,\r\n\tdenda_amount,\r\n\tto_char(\r\n\t\ttrunc(denda_tgl_tap),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS denda_tgl_tap_formated,\r\n\tto_char(\r\n\t\ttrunc(denda_tgl_bayar),\r\n\t\t'DD-MM-YYYY'\r\n\t) AS denda_tgl_bayar_formated,\r\n\tsptpd_amount,\r\n\tpayment_amount\r\nfrom sikp.f_laporan_harian_denda_v2(" . $param_arr['p_vat_type_id'] . ",2014,'" . $param_arr['date_start'] . "','" . $param_arr['date_end'] . "')\r\nORDER BY\r\n\tnama,\r\n\ttrunc(start_period) ASC"; /*"select *, to_char(start_period, 'DD-MM-YYYY') AS start_period_formated, to_char(end_period, 'DD-MM-YYYY') AS end_period_formated, to_char(tgl_masuk, 'DD-MM-YYYY') AS tgl_masuk_formated, to_char(jatuh_tempo, 'DD-MM-YYYY') AS jatuh_tempo_formated, to_char(tgl_bayar, 'DD-MM-YYYY') AS tgl_bayar_formated, to_char(skpdkb_tgl_tap, 'DD-MM-YYYY') AS skpdkb_tgl_tap_formated, to_char(skpdkb_tgl_bayar, 'DD-MM-YYYY') AS skpdkb_tgl_bayar_formated, to_char(denda_tgl_tap, 'DD-MM-YYYY') AS denda_tgl_tap_formated, to_char(denda_tgl_bayar, 'DD-MM-YYYY') AS denda_tgl_bayar_formated from sikp.f_laporan_harian_denda(1,2014,'1-1-2014','30-12-2014')"; */ //echo $query; //exit; $dbConn->query($query); $items = array(); $pdf->SetFont('arial', '', 8); $pdf->ln(2); $pdf->SetWidths(array(10, 24, 20, 15, 37, 18, 18, 19, 22, 19, 61, 61, 17)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->RowMultiBorderWithHeight(array("", "", "", "", "", "", "", "", "", "", "", "", ""), array('LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LT', 'LTR'), 6); $pdf->RowMultiBorderWithHeight(array("", "", "", "", "", "", "", "", "", "", "SKPDKB", "DENDA", "SELISIH"), array('L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'LR'), 4); $pdf->RowMultiBorderWithHeight(array("NO", "NAMA", "ALAMAT", "NPWPD", "MASA PAJAK", "NO KOHIR", "BESARNYA", "TGL MASUK", "JATUH TEMPO", "TGL BAYAR", "", "", ""), array('L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'LR'), 4); $pdf->SetWidths(array(10, 24, 20, 15, 37, 18, 18, 19, 22, 19, 16, 15, 14, 16, 16, 15, 14, 16, 17)); $pdf->SetFont('arial', '', 7); $pdf->RowMultiBorderWithHeight(array("", "", "", "", "", "", "", "", "", "", "BESARNYA", "NO KOHIR", "TGL TAP", "TGL BAYAR", "BESARNYA", "NO KOHIR", "TGL TAP", "TGL BAYAR", ""), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 9); $pdf->SetFont('arial', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L')); $jumlah = 0; $jumlah = 0; $jumlah_selisih = 0; $total_skpdkb = 0; $total_sptpd = 0; $total_denda = 0; while ($dbConn->next_record()) { $items[] = $item = array('nama' => $dbConn->f("nama"), 'alamat' => $dbConn->f("alamat"), 'npwpd' => $dbConn->f("npwpd"), 'start_period' => $dbConn->f("start_period_formated"), 'end_period' => $dbConn->f("end_period_formated"), 'no_kohir' => $dbConn->f("no_kohir"), 'tgl_masuk' => $dbConn->f("tgl_masuk_formated"), 'jatuh_tempo' => $dbConn->f("jatuh_tempo_formated"), 'tgl_bayar' => $dbConn->f("tgl_bayar_formated"), 'skpdkb_amount' => $dbConn->f("skpdkb_amount"), 'skpdkb_no_kohir' => $dbConn->f("skpdkb_no_kohir"), 'skpdkb_tgl_tap' => $dbConn->f("skpdkb_tgl_tap_formated"), 'skpdkb_tgl_bayar' => $dbConn->f("skpdkb_tgl_bayar_formated"), 'denda_amount' => $dbConn->f("denda_amount"), 'denda_no_kohir' => $dbConn->f("denda_no_kohir"), 'denda_tgl_tap' => $dbConn->f("denda_tgl_tap_formated"), 'denda_tgl_bayar' => $dbConn->f("denda_tgl_bayar_formated"), 'sptpd_amount' => $dbConn->f("sptpd_amount"), 'payment_amount' => $dbConn->f("payment_amount")); //$pdf->RowMultiBorderWithHeight(array($no,$item['tanggal'],$item['no_order'],$item['nama'],$item['alamat'],$item['npwpd'],'Rp. '.number_format($item['omzet'], 2, ',', '.'),'Rp. '.number_format($item['ketetapan'], 2, ',', '.'),$item['kohir'],$item['start_period'].' - '.$item['end_period'],$item['jenis_pajak']),array('LB','LB','LB','LB','LB','LB','LB','LB','LB','LB','LBR'),6); if ($item['skpdkb_amount'] == 0) { $item['skpdkb_no_kohir'] = ""; $item['skpdkb_tgl_tap'] = ""; $item['skpdkb_tgl_bayar'] = ""; } if ($item['denda_amount'] == 0) { $item['denda_no_kohir'] = ""; $item['denda_tgl_tap'] = ""; $item['denda_tgl_bayar'] = ""; } $jumlah = $item['skpdkb_amount'] + $item['sptpd_amount'] + $item['denda_amount'] - $item['payment_amount']; $jumlah_selisih += $jumlah; $pdf->RowMultiBorderWithHeight(array($no, $item['nama'], $item['alamat'], $item['npwpd'], $item['start_period'] . " s/d " . $item['end_period'], $item['no_kohir'], 'Rp. ' . number_format($item['sptpd_amount'], 2, ',', '.'), $item['tgl_masuk'], $item['jatuh_tempo'], $item['tgl_bayar'], 'Rp. ' . number_format($item['skpdkb_amount'], 2, ',', '.'), $item['skpdkb_no_kohir'], $item['skpdkb_tgl_tap'], $item['skpdkb_tgl_bayar'], 'Rp. ' . number_format($item['denda_amount'], 2, ',', '.'), $item['denda_no_kohir'], $item['denda_tgl_tap'], $item['denda_tgl_bayar'], 'Rp. ' . number_format($jumlah, 2, ',', '.')), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 6); $total_skpdkb += $item['skpdkb_amount']; $total_sptpd += $item['sptpd_amount']; $total_denda += $item['denda_amount']; // $jumlah_wp+=$dbConn->f("jumlah_wp"); $no++; } $pdf->SetWidths(array(10 + 24 + 20 + 15 + 37 + 18, 18, 19 + 22 + 19, 16, 15 + 14 + 16, 16, 15 + 14 + 16, 17)); $pdf->RowMultiBorderWithHeight(array("", 'Rp. ' . number_format($total_sptpd, 2, ',', '.'), "", 'Rp. ' . number_format($total_skpdkb, 2, ',', '.'), "", 'Rp. ' . number_format($total_denda, 2, ',', '.'), "", 'Rp. ' . number_format($jumlah_selisih, 2, ',', '.')), array('LRTBR', 'LTBR', 'LTBR', 'LTBR', 'LTBR', 'LTBR', 'LTBR', 'LTBR'), 6); $pdf->SetWidths(array(250, 70)); $pdf->ln(8); $pdf->SetWidtHs(array(239, 90)); $pdf->SetAligns(array("C", "C", "C", "C", "C")); $pdf->RowMultiBorderWithHeight(array("", "KEPALA SEKSI VERIFIKASI OTORISASI DAN PEMBUKUAN\n\n\n\n\n(Drs. H. UGAS RAHMANSYAH, SAP, MAP)\n(NIP 19640127 199703 1001)"), array("", ""), 5); //$pdf->RowMultiBorderWithHeight(array("","KASIE VOP"),array('','','','','','',''),6); $pdf->Output("", "I"); echo 'tes'; exit; }
$data["total_tagihan"] = $dbConn->f("total_tagihan"); $data["dengan_huruf"] = $dbConn->f("dengan_huruf"); $data["kode_rekening"] = $dbConn->f("kode_rekening"); $data["nama_rekening"] = $dbConn->f("nama_rekening"); $data["start_period"] = $dbConn->f("start_period"); $data["end_period"] = $dbConn->f("end_period"); } $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('landscape', array(160, 160)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('Courier', 'B', 8); $pdf->Image('../images/logo_pemda.png', 10, 5, 15, 15); $pdf->ln(10); $pdf->SetWidths(array(5, 95, 45)); $pdf->SetAligns(array("L", "L", "L")); $pdf->RowMultiBorderWithHeight(array("", "USER ID : " . $data["p_cg_terminal_id"], "TGL CETAK : " . date('d/m/Y')), array("", "", ""), 5); $pdf->SetWidths(array(5, 95, 45)); $pdf->SetAligns(array("L", "L", "L")); $pdf->RowMultiBorderWithHeight(array("", "DISYANJAK", "JAM CETAK : " . date('H:i:s')), array("", "", ""), 5); $pdf->ln(); $pdf->SetWidths(array(5, 90, 50));
$pdf->SetDisplayMode('fullpage'); // Cargamos las fuentes corporativas $pdf->AddFont('NewsGotT', '', 'NewsGotT.php'); $pdf->AddFont('NewsGotT', 'B', 'NewsGotTb.php'); // En el caso de haber seleccionado una unidad, se muestra el listado de alumnos de dicha unidad, // en otro caso mostramos el listado de faltas de todas las unidades. $query = "SELECT DISTINCT unidad FROM FALUMNOS where unidad not like '' "; if ($unidad) { $query .= " and unidad='{$unidad}'"; } $query .= " order by unidad"; // echo $query; $unidades = mysqli_query($db_con, $query); while ($unidad = mysqli_fetch_array($unidades)) { $unidad = $unidad[0]; $pdf->AddPage('L', 'A4'); // CABECERA DEL DOCUMENTO // Obtenemos la fecha inicial y final de la semana en curso list($anio, $mes, $dia, $semana, $sdia) = explode(':', date('Y:m:d:W:w')); $inicio = strtotime("{$anio}-{$mes}-{$dia} 12:00am"); $inicio += (1 - $sdia) * 86400; $fin = $inicio + 6 * 86400; $inicio = date('d-m-Y', $inicio); $fin = date('d-m-Y', $fin); // Consultamos el tutor del grupo $result = mysqli_query($db_con, "SELECT TUTOR FROM FTUTORES WHERE unidad='{$unidad}'"); $tutor = mysqli_fetch_array($result); mysqli_free_result($result); // Impresi�n de la cabecera $pdf->SetFont('NewsGotT', 'B', 10); $pdf->Cell(96, 5, "PARTE DE FALTAS DEL GRUPO {$unidad}", 0, 0, 'L');
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("LAPORAN PIUTANG PAJAK"), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); //$pdf->RowMultiBorderWithHeight(array("DAFTAR SPTPD",": ".$param_arr['vat_code_dtl']),array('',''),6); //$pdf->RowMultiBorderWithHeight(array("TAHUN",": ".$param_arr['year_code']),array('',''),6); //$pdf->RowMultiBorderWithHeight(array("TANGGAL",": ".dateToString($param_arr['date_start'])." s/d ".dateToString($param_arr['date_end'])),array('',''),6); $dbConn = new clsDBConnSIKP(); /*echo '<pre>'; print_r($param_arr); exit;*/ $query = "select *,to_char(tgl_tap,'dd-mm-yyyy') as tgl_tap_formated,to_char(tgl_bayar,'dd-mm-yyyy') as tgl_bayar_formated from t_piutang_pajak_penetapan_final where p_vat_type_id=" . $param_arr['p_vat_type_id'] . " and p_year_period_id = " . $param_arr['year_period_id']; $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 9); $pdf->ln(2); $pdf->SetWidths(array(28, 43, 23, 23, 35, 35, 25, 35, 35, 25, 20)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->RowMultiBorderWithHeight(array("NPWD", "MASA PAJAK", "TGL TAP", "NO KOHIR", "BESARNYA", "REALISASI PIUTANG", "TGL BAYAR", "SISA PIUTANG", "KETERANGAN", "TAHUN"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTBR'), 6); $pdf->SetFont('helvetica', '', 9); $no = 1; $pdf->SetAligns(array('C', 'L', 'C', 'L', 'R', 'R', 'C', 'R', 'R', 'L', 'L')); $jumlah_omzet = 0; $jumlah_ketetapan = 0; while ($dbConn->next_record()) { $items[] = $item = array("npwd" => $dbConn->f("npwd"), "masa_pajak" => $dbConn->f("masa_pajak"), "tgl_tap" => $dbConn->f("tgl_tap_formated"), "no_kohir" => $dbConn->f("no_kohir"), "realisasi_piutang" => $dbConn->f("realisasi_piutang"), "tgl_bayar" => $dbConn->f("tgl_bayar_formated"), "nilai_piutang" => $dbConn->f("nilai_piutang"), "sisa_piutang" => $dbConn->f("sisa_piutang"), "keterangan" => $dbConn->f("keterangan"), "p_year_period_id" => $dbConn->f("p_year_period_id"), "year_code" => $dbConn->f("year_code")); $pdf->RowMultiBorderWithHeight(array($item["npwd"], $item["masa_pajak"], $item["tgl_tap"], $item["no_kohir"], 'Rp ' . number_format($item["nilai_piutang"], 2, ',', '.'), 'Rp ' . number_format($item["realisasi_piutang"], 2, ',', '.'), $item["tgl_bayar"], 'Rp ' . number_format($item["sisa_piutang"], 2, ',', '.'), $item["keterangan"], $item["year_code"]), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTBR'), 6); /*if(!empty($param_arr['p_vat_type_dtl_id'])){ $pdf->RowMultiBorderWithHeight(array($no,$item['tanggal'],$item['no_order'],$item['nama'],$item['alamat'],$item['npwpd'], 2, ',', '.'),$item['kohir'],$item['start_period'].' - '.$item['end_period'],$item['jenis_pajak'],'Rp '.number_format($item['omzet'], 2, ',', '.'),'Rp '.number_format($item['ketetapan']),array('LB','LB','LB','LB','LB','LB','LB','LB','LB','LB','LBR'),6); }else{ $pdf->RowMultiBorderWithHeight(array($no,$item['tanggal'],$item['ayat_code'].'.'.$item['ayat_code_dtl'],$item['nama'],$item['alamat'],$item['npwpd'],$item['kohir'],$item['start_period'].' - '.$item['end_period'],$item['jenis_pajak'],'Rp '.number_format($item['omzet'], 2, ',', '.'),'Rp '.number_format($item['ketetapan'], 2, ',', '.')),array('LB','LB','LB','LB','LB','LB','LB','LB','LB','LB','LBR'),6); } $jumlah_omzet += $dbConn->f("omzet"); $jumlah_ketetapan += $dbConn->f("ketetapan"); $no++;*/ } /*$pdf->SetWidths(array(259,40,40)); $pdf->SetAligns(Array('C','R','R')); $pdf->RowMultiBorderWithHeight(array('JUMLAH', 'Rp ' . number_format($jumlah_omzet, 2, ',', '.'), 'Rp ' . number_format($jumlah_ketetapan, 2, ',', '.')),array('LB','LB','LBR'),6); //signature $pdf->SetWidths(array(259,80)); $pdf->SetAligns(Array('C','C')); $pdf->RowMultiBorderWithHeight(array('', ''),array('',''),12); $pdf->RowMultiBorderWithHeight(array('', 'Bandung' . ', ' . date('d F Y')),array('',''),6); $pdf->RowMultiBorderWithHeight(array('', ''),array('',''),36); $pdf->SetAligns(Array('C','L')); $pdf->RowMultiBorderWithHeight(array('', 'Nama:'),array('','T'),6); $pdf->RowMultiBorderWithHeight(array('', 'Jabatan:'),array('',''),6);*/ $pdf->Output("", "I"); echo 'tes'; exit; }
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("LAPORAN PENCETAKAN PENERIMAAN"), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); //$pdf->RowMultiBorderWithHeight(array("DAFTAR SPTPD",": ".$param_arr['vat_code_dtl']),array('',''),6); //$pdf->RowMultiBorderWithHeight(array("TAHUN",": ".$param_arr['year_code']),array('',''),6); $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start']) . " s/d " . dateToString($param_arr['date_end'])), array('', ''), 6); $dbConn = new clsDBConnSIKP(); if (empty($param_arr['p_vat_type_id'])) { $param_arr['p_vat_type_id'] = 'null'; } if (!empty($param_arr['p_vat_type_dtl_id'])) { $query = "select *,to_char(start_period, 'DD-MM-YYYY') as start_period_formated,to_char(end_period, 'DD-MM-YYYY') as end_period_formated,to_char(tanggal, 'DD-MM-YYYY') as date_settle_formated from sikp.f_laporan_harian_sptpd(1," . $param_arr['year_code'] . ",'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "'," . $param_arr['p_vat_type_dtl_id'] . ") ORDER BY tanggal, jenis ASC"; } else { $query = "select *,to_char(start_period, 'DD-MM-YYYY') as start_period_formated,to_char(end_period, 'DD-MM-YYYY') as end_period_formated,to_char(tanggal, 'DD-MM-YYYY') as date_settle_formated from sikp.f_laporan_harian_sptpd(" . $param_arr['p_vat_type_id'] . ",2001,'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "') ORDER BY trunc(tanggal),ayat_code_dtl, jenis ASC"; } //$dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 10); $pdf->ln(2); $pdf->SetWidths(array(10, 80, 60, 40, 50, 80)); $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->RowMultiBorderWithHeight(array("NO", "NAMA BADAN ", "PERIODE TRANSAKSI", "TGL PELAPORAN", "TOTAL PAJAK", "NO.KWITANSI"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTBR'), 6); $pdf->SetFont('helvetica', '', 10); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'L', 'L', 'L', 'L', 'C', 'L', 'R', 'R')); $jumlah_omzet = 0; $jumlah_ketetapan = 0; /*while($dbConn->next_record()){ $start_period = $dbConn->f("start_period_formated"); $end_period = $dbConn->f("end_period_formated"); $date_settle = $dbConn->f("date_settle_formated"); $items[]= $item = array('tanggal' => $date_settle, 'no_order' => $dbConn->f("no_order"), 'nama' => $dbConn->f("nama"), 'alamat' => $dbConn->f("alamat"), 'npwpd' => $dbConn->f("npwpd"), 'omzet' => $dbConn->f("omzet"), 'ketetapan' => $dbConn->f("ketetapan"), 'kohir' => $dbConn->f("kohir"), 'start_period' => $start_period, 'end_period' => $end_period, 'jenis_pajak' => $dbConn->f("jenis"), 'jenis_pajak_dtl' => $dbConn->f("jenis_dtl"), 'ayat_code' => $dbConn->f("ayat_code"), 'ayat_code_dtl' => $dbConn->f("ayat_code_dtl") ); if(!empty($param_arr['p_vat_type_dtl_id'])){ $pdf->RowMultiBorderWithHeight(array($no,$item['tanggal'],$item['no_order'],$item['nama'],$item['alamat'],$item['npwpd'], 2, ',', '.'),$item['kohir'],$item['start_period'].' - '.$item['end_period'],$item['jenis_pajak'],'Rp '.number_format($item['omzet'], 2, ',', '.'),'Rp '.number_format($item['ketetapan']),array('LB','LB','LB','LB','LB','LB','LB','LB','LB','LB','LBR'),6); }else{ $pdf->RowMultiBorderWithHeight(array($no,$item['tanggal'],$item['ayat_code'].'.'.$item['ayat_code_dtl'],$item['nama'],$item['alamat'],$item['npwpd'],$item['kohir'],$item['start_period'].' - '.$item['end_period'],$item['jenis_pajak'],'Rp '.number_format($item['omzet'], 2, ',', '.'),'Rp '.number_format($item['ketetapan'], 2, ',', '.')),array('LB','LB','LB','LB','LB','LB','LB','LB','LB','LB','LBR'),6); } $jumlah_omzet += $dbConn->f("omzet"); $jumlah_ketetapan += $dbConn->f("ketetapan"); $no++; }*/ $pdf->SetWidths(array(259, 40, 40)); $pdf->SetAligns(array('C', 'R', 'R')); $pdf->ln(5); $pdf->SetWidtHs(array(239, 90)); $pdf->SetAligns(array("C", "C", "C", "C", "C")); //$pdf->RowMultiBorderWithHeight(array("","KEPALA SEKSI VERIFIKASI OTORISASI DAN PEMBUKUAN\n\n\n\n\n(Drs. H. UGAS RAHMANSYAH, SAP, MAP)\n(NIP 19640127 199703 1001)"),array("",""),5); $pdf->Output("", "I"); echo 'tes'; exit; }
function print_laporan($p_rqst_type_id, $year_code, $year_period_id, $date_start, $date_end, $jenis_tahun, $rqst_type_code) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 8; $pdf = new PDF_MC_Table(); $pdf->AddPage('Portrait', 'Letter'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 9); $pdf->SetWidths(array(200)); $pdf->ln(1); if ($jenis_tahun == 'pajak') { $pdf->RowMultiBorderWithHeight(array("Laporan Penerimaan Global per Masa Pajak"), array('', ''), 6); } else { if ($jenis_tahun == 'bayar') { $pdf->RowMultiBorderWithHeight(array("Laporan Penerimaan Global per Tanggal / Penerimaan"), array('', ''), 6); } } //$pdf->ln(8); $pdf->SetWidths(array(30, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("Jenis Pajak", ": " . $rqst_type_code), array('', ''), 6); //$pdf->RowMultiBorderWithHeight(array("Tahun",": ".$year_code),array('',''),6); $pdf->RowMultiBorderWithHeight(array("Tanggal", ": " . dateToString($date_start) . " s/d " . dateToString($date_end)), array('', ''), 6); $dbConn = new clsDBConnSIKP(); if ($jenis_tahun == 'pajak') { $query = "select * from sikp.f_laporan_per_thn_pajak(" . $p_rqst_type_id . "," . $year_period_id . ",'" . $date_start . "', '" . $date_end . "')"; } else { if ($jenis_tahun == 'bayar') { $query = "select * from sikp.f_laporan_per_thn_bayar(" . $p_rqst_type_id . ",2013,'" . $date_start . "', '" . $date_end . "')"; } } $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 8); $pdf->ln(2); $pdf->SetWidths(array(10, 40, 40, 33, 37, 40)); $pdf->RowMultiBorderWithHeight(array("NO", "BULAN", "BESARNYA", "JUMLAH WP", "JUMLAH SSPD", "KETERANGAN"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTBR'), 6); $pdf->SetFont('helvetica', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'R', 'R', 'R', 'L')); $jumlah = 0; $jumlah = 0; while ($dbConn->next_record()) { $items[] = array('bulan_wp' => $dbConn->f("bulan_wp"), 'total_amount' => $dbConn->f("total_amount"), 'jumlah_wp' => $dbConn->f("jumlah_wp")); $pdf->RowMultiBorderWithHeight(array($no, $dbConn->f("bulan_wp"), 'Rp. ' . number_format($dbConn->f("total_amount"), 2, ',', '.'), $dbConn->f("jumlah_wp"), '', ''), array('LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $jumlah += $dbConn->f("total_amount"); $jumlah_wp += $dbConn->f("jumlah_wp"); $no++; } $pdf->SetAligns(array('C', 'R', 'R', 'R', 'R', 'L')); $pdf->SetWidths(array(50, 40, 33, 37, 40)); $pdf->RowMultiBorderWithHeight(array('Jumlah', 'Rp. ' . number_format($jumlah, 2, ',', '.'), $jumlah_wp, '', ''), array('LB', 'LB', 'LB', 'LB', 'LBR'), 6); $pdf->SetWidths(array(123, 50)); $pdf->SetAligns('L'); $pdf->ln(5); $pdf->SetWidtHs(array(130, 70)); $pdf->SetAligns(array("C", "C", "C", "C", "C")); //$pdf->RowMultiBorderWithHeight(array("","KEPALA SEKSI VERIFIKASI OTORISASI DAN PEMBUKUAN\n\n\n\n\n(Drs. H. UGAS RAHMANSYAH, SAP, MAP)\n(NIP 19640127 199703 1001)"),array("",""),5); $pdf->RowMultiBorderWithHeight(array("", "KEPALA SEKSI VERIFIKASI OTORISASI DAN PEMBUKUAN\n\n\n\n\n(Drs. H. Deden Saepulloh, MM.)\n(NIP 19681210 199010 001)"), array("", ""), 5); $pdf->Output("", "I"); echo 'tes'; exit; }
/** * Init function */ function __construct($json) { require 'mc_table.php'; parent::__construct($json); // Get Config $conf = isset($_SESSION['pluginsConfig']) && isset($_SESSION['pluginsConfig']['export']) && isset($_SESSION['pluginsConfig']['export']['PDF']) ? $_SESSION['pluginsConfig']['export'] : array('PDF' => array()); $defaultFont = isset($conf['PDF']['defaultFont']) ? $conf['PDF']['defaultFont'] : 'FreeSans'; $defaultFontSize = isset($conf['PDF']['defaultFontSize']) ? $conf['PDF']['defaultFontSize'] : 9; $headerFont = isset($conf['PDF']['headerFont']) ? $conf['PDF']['headerFont'] : $defaultFont; $headerFontSize = isset($conf['PDF']['headerFontSize']) ? $conf['PDF']['headerFontSize'] : $defaultFontSize; $headerFontStyle = isset($conf['PDF']['headerFontStyle']) ? $conf['PDF']['headerFontStyle'] : ''; $layerFont = isset($conf['PDF']['layerFont']) ? $conf['PDF']['layerFont'] : $defaultFont; $layerFontSize = isset($conf['PDF']['layerFontSize']) ? $conf['PDF']['layerFontSize'] : $defaultFontSize; $layerFontStyle = isset($conf['PDF']['layerFontStyle']) ? $conf['PDF']['layerFontStyle'] : ''; // Write to table $pdf = new PDF_MC_Table(); // only for tcpdf version >= 3 // - font not well defined --> errors // - header and footer printed = lines on top and bottom $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->Open(); $groups = (array) $this->jsonList[0]; foreach ($groups as $grp) { $ret = $this->prepareData4PDF($grp); $colsPerc = $ret[0]; $data = $ret[1]; $header = $data['header']; $records = $data['records']; $pdfW = 180; // orientation detection $orientation = 'P'; $colsum = $ret[2]; $maxSize = max($headerFontSize, $defaultFontSize); $widthTmp = $colsum * $maxSize / 4; if ($widthTmp > 1.5 * $pdfW) { $pdfW = 270; $orientation = 'L'; } $pdf->AddPage($orientation); $cols = array(); foreach ($colsPerc as $cp) { $cols[] = $cp * $pdfW; } // add group name: $pdf->SetFont($layerFont, $layerFontStyle, $layerFontSize); $x = $pdf->GetX(); $y = $pdf->GetY(); $pdf->Cell(0, 0, $grp->description); $pdf->SetXY($x, $y + 9); // Calculate column widths $pdf->SetWidths($cols); // Add header $pdf->SetFont($headerFont, $headerFontStyle, $headerFontSize); $pdf->Row($header); // Add records $pdf->SetFont($defaultFont, '', $defaultFontSize); foreach ($records as $row) { $pdf->Row($row); } } $pdfFilePath = $this->tempFilePath . '.pdf'; $this->tempFileLocation .= '.pdf'; $pdf->Output($pdfFilePath, 'F'); }
function print_laporan($param_arr) { include "../include/fpdf17/mc_table.php"; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', 'Legal'); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(9); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(200)); $pdf->ln(1); $pdf->RowMultiBorderWithHeight(array("LAPORAN PENERIMAAN BPHTB "), array('', ''), 6); //$pdf->ln(8); $pdf->SetWidths(array(40, 200)); $pdf->ln(4); $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString(date("Y-m-d"), true)), array('', ''), 6); $pdf->RowMultiBorderWithHeight(array("NAMA USER", ": " . $param_arr['uid']), array('', ''), 6); $dbConn = new clsDBConnSIKP(); $whereClause = " WHERE "; $whereClause .= " to_char(a.payment_date, 'YYYY-mm-dd') = '" . date("Y-m-d") . "'"; $whereClause .= " AND a.p_cg_terminal_id = '" . $param_arr['uid'] . "'"; $query = "SELECT a.receipt_no, b.njop_pbb, to_char(a.payment_date, 'YYYY-MM-DD') AS payment_date,\r\n\t\t\t\t\tb.wp_name, b.wp_address_name, kelurahan.region_name AS kelurahan_name, kecamatan.region_name AS kecamatan_name, b.land_area, b.building_area, b.land_total_price, a.payment_amount \r\n\t\t\t\t\tFROM t_payment_receipt_bphtb AS a\r\n\t\t\tLEFT JOIN t_bphtb_registration AS b ON a.t_bphtb_registration_id = b.t_bphtb_registration_id\r\n\t\t\tLEFT JOIN p_region AS kelurahan ON b.wp_p_region_id_kel = kelurahan.p_region_id\r\n\t\t\tLEFT JOIN p_region AS kecamatan ON b.wp_p_region_id_kec = kecamatan.p_region_id"; $query .= $whereClause; $query .= " ORDER BY a.receipt_no ASC"; // die($query); $dbConn->query($query); $items = array(); $pdf->SetFont('helvetica', '', 9); $pdf->ln(2); /* HEADER */ $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C')); $pdf->SetWidths(array(10, 28, 35, 21, 41, 51, 28, 28, 21, 21, 25, 28)); $pdf->SetFont('arial', 'B', 7); $pdf->RowMultiBorderWithHeight(array("NO", "NO TRANSAKSI", "NOP", "TGL", "NAMA", "ALAMAT", "KELURAHAN", "KECAMATAN", "LUAS TANAH", "LUAS BGN", "NJOP (Rp)", "TOTAL BAYAR (Rp)"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'TLBR'), 5); /* END HEADER */ /* CONTENTS */ $pdf->SetFont('arial', '', 8); $no = 1; $pdf->SetAligns(array('C', 'L', 'L', 'C', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R')); $total_nilai_penerimaan = 0; while ($dbConn->next_record()) { $items[] = $item = array('receipt_no' => $dbConn->f("receipt_no"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'payment_date' => $dbConn->f("payment_date"), 'wp_name' => $dbConn->f("wp_name"), 'wp_address_name' => $dbConn->f("wp_address_name"), 'kelurahan_name' => $dbConn->f("kelurahan_name"), 'kecamatan_name' => $dbConn->f("kecamatan_name"), 'land_area' => $dbConn->f("land_area"), 'building_area' => $dbConn->f("building_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'payment_amount' => $dbConn->f("payment_amount")); $pdf->RowMultiBorderWithHeight(array($no, $item['receipt_no'], $item['njop_pbb'], dateToString($item['payment_date']), trim(strtoupper($item['wp_name'])), $item['wp_address_name'], $item['kelurahan_name'], $item['kecamatan_name'], number_format($item['land_area'], 0), number_format($item['building_area'], 0), number_format($item['land_total_price'], 0, ",", "."), number_format($item['payment_amount'], 2, ",", ".")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6); $total_nilai_penerimaan += $item['payment_amount']; $no++; } /* END CONTENTS */ /* BOTTOM */ $pdf->SetWidths(array(309, 28)); $pdf->SetAligns(array('C', 'R')); $pdf->SetFont('arial', 'B', 8); $pdf->RowMultiBorderWithHeight(array("TOTAL", number_format($total_nilai_penerimaan, 2, ",", ".")), array('LB', 'LBR'), 6); /* END BOTTOM */ $pdf->ln(8); $pdf->Output("", "I"); exit; }
$data = array(); while ($dbConn->next_record()) { $data = array('npwpd' => $dbConn->f("npwd"), 'company_name' => $dbConn->f("company_owner"), 'company_brand' => $dbConn->f("company_brand"), 'brand_address_name' => $dbConn->f("brand_address_name") . ' ' . $dbConn->f("brand_address_no"), 'registration_date' => $dbConn->f("registration_date_2"), 'vat_code' => $dbConn->f("vat_code")); $dbConn->close(); } //print_r($data);exit; $_HEIGHT = 4; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('L', array(94, 60)); //$pdf->AddPage('P',array(210,296)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin($_HEIGHT); $pdf->SetLeftMargin($_HEIGHT); $pdf->SetAutoPageBreak(false, 0); $pdf->Ln(0); //$pdf->Image('../images/Logo.png',7,10,15,15); $pdf->SetFont('Arial', 'B', 6); $pdf->Cell(10, 5, "", "", 0, 'L'); $pdf->Cell(74, 5, "", "", 0, 'C'); $pdf->Cell(10, 5, "", "", 0, 'L'); $pdf->Ln(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(10, 5, "", "", 0, 'L'); $pdf->Cell(74, 5, "", "", 0, 'C');
$data = array(); while ($dbConn->next_record()) { $data = array('npwpd' => $dbConn->f("npwpd"), 'company_name' => $dbConn->f("company_owner"), 'company_brand' => $dbConn->f("company_brand"), 'brand_address_name' => $dbConn->f("brand_address_name") . ' ' . $dbConn->f("brand_address_no"), 'registration_date' => $dbConn->f("registration_date_2"), 'vat_code' => $dbConn->f("vat_code")); $dbConn->close(); } //print_r($data);exit; $_HEIGHT = 4; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('L', array(200, 150)); //$pdf->AddPage('P',array(210,296)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin($_HEIGHT); $pdf->SetLeftMargin($_HEIGHT); $pdf->SetAutoPageBreak(false, 0); $pdf->Ln(0); $pdf->Image('../images/Logo.png', 7, 10, 15, 15); $pdf->SetFont('Arial', 'B', 6); $pdf->Cell(10, 5, "", "TL", 0, 'L'); $pdf->Cell(80, 5, "PEMERINTAH KOTA BANDUNG", "TR", 0, 'C'); $pdf->Cell(10, 5, "", "", 0, 'L'); $pdf->Cell(90, 5, "", "TLR", 0, 'L'); $pdf->Ln(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(10, 5, "", "L", 0, 'L');
echo 'alert("Anda diharapkan untuk mengisi survey terlebih dahulu untuk mencetak dokumen No. Bayar");'; echo 'location.href="../trans/t_survey_kepuasan_pelanggan_pelaporan_pertanyaan.php?payment_key="+"' . $no_bayar . '";'; echo '</script> </head> </html>'; exit; } $items = $data; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 10; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('Landscape', array(160, 210)); $pdf->SetFont('helvetica', '', $_FONTSIZE); $pdf->SetRightMargin(5); $pdf->SetLeftMargin(5); $pdf->SetTopMargin(-20); $pdf->SetAutoPageBreak(false, 0); $pdf->Image('../images/logo_pemda_warna.png', 12, 15, 20, 20); $pdf->SetFont('helvetica', 'B', 14); $pdf->SetWidths(array(10, 165)); $pdf->SetAligns(array("C", "C")); $pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\nDINAS PELAYANAN PAJAK"), array('', ''), 6); $pdf->SetFont('helvetica', '', 12); $pdf->SetWidths(array(15, 165)); $pdf->SetAligns(array("C", "C")); $pdf->RowMultiBorderWithHeight(array("", "Jalan Wastukancana No.2\nTelp. 022-4235052 - Bandung"), array('', ''), 6); $pdf->SetWidths(array(15, 165, 20));
public function generar_pdf($archivo = FALSE) { ///// INICIO - Factura Detallada /// Creamos el PDF y escribimos sus metadatos ob_end_clean(); $pdf_doc = new PDF_MC_Table('P', 'mm', 'A4'); define('EEURO', chr(128)); $lineas = $this->factura->get_lineas(); if ($this->impresion['print_dto']) { $this->impresion['print_dto'] = FALSE; /// leemos las líneas para ver si de verdad mostramos los descuentos foreach ($lineas as $lin) { if ($lin->dtopor != 0) { $this->impresion['print_dto'] = TRUE; break; } } } $pdf_doc->SetTitle('Factura: ' . $this->factura->codigo . " " . $this->factura->numero2); $pdf_doc->SetSubject('Factura del cliente: ' . $this->factura->nombrecliente); $pdf_doc->SetAuthor($this->empresa->nombre); $pdf_doc->SetCreator('FacturaSctipts V_' . $this->version()); $pdf_doc->Open(); $pdf_doc->AliasNbPages(); $pdf_doc->SetAutoPageBreak(true, 40); // Definimos el color de relleno (gris, rojo, verde, azul) $pdf_doc->SetColorRelleno('azul'); /// Definimos todos los datos de la cabecera de la factura /// Datos de la empresa $pdf_doc->fde_nombre = $this->empresa->nombre; $pdf_doc->fde_FS_CIFNIF = FS_CIFNIF; $pdf_doc->fde_cifnif = $this->empresa->cifnif; $pdf_doc->fde_direccion = $this->empresa->direccion; $pdf_doc->fde_codpostal = $this->empresa->codpostal; $pdf_doc->fde_ciudad = $this->empresa->ciudad; $pdf_doc->fde_provincia = $this->empresa->provincia; $pdf_doc->fde_telefono = 'Teléfono: ' . $this->empresa->telefono; $pdf_doc->fde_fax = 'Fax: ' . $this->empresa->fax; $pdf_doc->fde_email = $this->empresa->email; $pdf_doc->fde_web = $this->empresa->web; $pdf_doc->fde_piefactura = $this->empresa->pie_factura; /// Insertamos el Logo y Marca de Agua if (file_exists('tmp/' . FS_TMP_NAME . 'logo.png') or file_exists('tmp/' . FS_TMP_NAME . 'logo.jpg')) { $pdf_doc->fdf_verlogotipo = '1'; // 1/0 --> Mostrar Logotipo $pdf_doc->fdf_Xlogotipo = '15'; // Valor X para Logotipo $pdf_doc->fdf_Ylogotipo = '35'; // Valor Y para Logotipo $pdf_doc->fdf_vermarcaagua = '1'; // 1/0 --> Mostrar Marca de Agua $pdf_doc->fdf_Xmarcaagua = '25'; // Valor X para Marca de Agua $pdf_doc->fdf_Ymarcaagua = '110'; // Valor Y para Marca de Agua } else { $pdf_doc->fdf_verlogotipo = '0'; $pdf_doc->fdf_Xlogotipo = '0'; $pdf_doc->fdf_Ylogotipo = '0'; $pdf_doc->fdf_vermarcaagua = '0'; $pdf_doc->fdf_Xmarcaagua = '0'; $pdf_doc->fdf_Ymarcaagua = '0'; } // Tipo de Documento $pdf_doc->fdf_tipodocumento = 'FACTURA'; // (FACTURA, FACTURA PROFORMA, ¿ALBARAN, PRESUPUESTO?...) $pdf_doc->fdf_codigo = $this->factura->codigo . " " . $this->factura->numero2; // Fecha, Codigo Cliente y observaciones de la factura $pdf_doc->fdf_fecha = $this->factura->fecha; $pdf_doc->fdf_codcliente = $this->factura->codcliente; $pdf_doc->fdf_observaciones = iconv("UTF-8", "CP1252", $this->fix_html($this->factura->observaciones)); // Datos del Cliente $pdf_doc->fdf_nombrecliente = $this->fix_html($this->factura->nombrecliente); $pdf_doc->fdf_FS_CIFNIF = FS_CIFNIF; $pdf_doc->fdf_cifnif = $this->factura->cifnif; $pdf_doc->fdf_direccion = $this->fix_html($this->factura->direccion); $pdf_doc->fdf_codpostal = $this->factura->codpostal; $pdf_doc->fdf_ciudad = $this->factura->ciudad; $pdf_doc->fdf_provincia = $this->factura->provincia; $pdf_doc->fdc_telefono1 = $this->cliente->telefono1; $pdf_doc->fdc_telefono2 = $this->cliente->telefono2; $pdf_doc->fdc_fax = $this->cliente->fax; $pdf_doc->fdc_email = $this->cliente->email; $pdf_doc->fdf_epago = $pdf_doc->fdf_divisa = $pdf_doc->fdf_pais = ''; // Forma de Pago de la Factura $pago = new forma_pago(); $epago = $pago->get($this->factura->codpago); if ($epago) { $pdf_doc->fdf_epago = $epago->descripcion; } // Divisa de la Factura $divisa = new divisa(); $edivisa = $divisa->get($this->factura->coddivisa); if ($edivisa) { $pdf_doc->fdf_divisa = $edivisa->descripcion; } // Pais de la Factura $pais = new pais(); $epais = $pais->get($this->factura->codpais); if ($epais) { $pdf_doc->fdf_pais = $epais->nombre; } // Cabecera Titulos Columnas if ($this->impresion['print_dto']) { $pdf_doc->Setdatoscab(array('ALB', 'DESCRIPCION', 'CANT', 'PRECIO', 'DTO', FS_IVA, 'IMPORTE')); $pdf_doc->SetWidths(array(16, 102, 10, 20, 10, 10, 22)); $pdf_doc->SetAligns(array('C', 'L', 'R', 'R', 'R', 'R', 'R')); $pdf_doc->SetColors(array('6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109')); } else { $pdf_doc->Setdatoscab(array('ALB', 'DESCRIPCION', 'CANT', 'PRECIO', FS_IVA, 'IMPORTE')); $pdf_doc->SetWidths(array(16, 107, 10, 20, 15, 22)); $pdf_doc->SetAligns(array('C', 'L', 'R', 'R', 'R', 'R')); $pdf_doc->SetColors(array('6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109')); } /// Definimos todos los datos del PIE de la factura /// Lineas de IVA $lineas_iva = $this->factura->get_lineas_iva(); if (count($lineas_iva) > 3) { $pdf_doc->fdf_lineasiva = $lineas_iva; } else { $filaiva = array(); $i = 0; foreach ($lineas_iva as $li) { $i++; $filaiva[$i][0] = $li->iva ? FS_IVA . $li->iva : ''; $filaiva[$i][1] = $li->neto ? $this->ckeckEuro($li->neto) : ''; $filaiva[$i][2] = $li->iva ? $li->iva . "%" : ''; $filaiva[$i][3] = $li->totaliva ? $this->ckeckEuro($li->totaliva) : ''; $filaiva[$i][4] = $li->recargo ? $li->recargo . "%" : ''; $filaiva[$i][5] = $li->totalrecargo ? $this->ckeckEuro($li->totalrecargo) : ''; $filaiva[$i][6] = ''; //// POR CREARRRRRR $filaiva[$i][7] = ''; //// POR CREARRRRRR $filaiva[$i][8] = $li->totallinea ? $this->ckeckEuro($li->totallinea) : ''; } if ($filaiva) { $filaiva[1][6] = $this->factura->irpf . ' %'; $filaiva[1][7] = $this->ckeckEuro(0 - $this->factura->totalirpf); } $pdf_doc->fdf_lineasiva = $filaiva; } // Total factura numerico $pdf_doc->fdf_numtotal = $this->ckeckEuro($this->factura->total); // Total factura numeros a texto $pdf_doc->fdf_textotal = $this->factura->total; /// Agregamos la pagina inicial de la factura $pdf_doc->AddPage(); // Lineas de la Factura //$lineas = $this->factura->get_lineas(); if ($lineas) { $neto = 0; for ($i = 0; $i < count($lineas); $i++) { $neto += $lineas[$i]->pvptotal; $pdf_doc->neto = $this->ckeckEuro($neto); $articulo = new articulo(); $art = $articulo->get($lineas[$i]->referencia); if ($art) { $observa = "\n" . utf8_decode($this->fix_html($art->observaciones)); } else { // $observa = null; // No mostrar mensaje de error $observa = "\n"; } if ($this->impresion['print_dto']) { $lafila = array('0' => utf8_decode($lineas[$i]->albaran_numero()), '1' => utf8_decode(strtoupper($lineas[$i]->descripcion)) . $observa, '2' => utf8_decode($lineas[$i]->cantidad), '3' => $this->ckeckEuro($lineas[$i]->pvpunitario), '4' => utf8_decode($this->show_numero($lineas[$i]->dtopor, 0) . " %"), '5' => utf8_decode($this->show_numero($lineas[$i]->iva, 0) . " %"), '6' => $this->ckeckEuro($lineas[$i]->total_iva())); } else { $lafila = array('0' => utf8_decode($lineas[$i]->albaran_numero()), '1' => utf8_decode(strtoupper($lineas[$i]->descripcion)) . $observa, '2' => utf8_decode($lineas[$i]->cantidad), '3' => $this->ckeckEuro($lineas[$i]->pvpunitario), '4' => utf8_decode($this->show_numero($lineas[$i]->iva, 0) . " %"), '5' => $this->ckeckEuro($lineas[$i]->total_iva())); } $pdf_doc->Row($lafila, '1'); // Row(array, Descripcion del Articulo -- ultimo valor a imprimir) } $pdf_doc->piepagina = true; } // Damos salida al archivo PDF if ($archivo) { if (!file_exists('tmp/' . FS_TMP_NAME . 'enviar')) { mkdir('tmp/' . FS_TMP_NAME . 'enviar'); } $pdf_doc->Output('tmp/' . FS_TMP_NAME . 'enviar/' . $archivo, 'F'); } else { $pdf_doc->Output(); } }
$pdf->Open(); $pdf->SetMargins(13, 10, 13); $pdf->SetDisplayMode('fullpage'); // Cargamos las fuentes corporativas $pdf->AddFont('NewsGotT', '', 'NewsGotT.php'); $pdf->AddFont('NewsGotT', 'B', 'NewsGotTb.php'); // En el caso de haber seleccionado una unidad, se muestra el listado de alumnos de dicha unidad, // en otro caso mostramos el listado de faltas de todas las unidades. $query = "SELECT DISTINCT unidad FROM FALUMNOS"; if ($curso) { $query .= " WHERE unidad='{$curso}'"; } $unidades = mysqli_query($db_con, $query); while ($unidad = mysqli_fetch_array($unidades)) { $grupo = $unidad[0]; $pdf->AddPage('P', 'A4'); // CABECERA DEL DOCUMENTO $pdf->SetFont('NewsGotT', 'B', 12); $pdf->Cell(170, 5, "ALUMNOS DEL GRUPO {$grupo}", 0, 1, 'C'); $pdf->Ln(5); // Consultamos los alumnos del grupo seleccionado $result = mysqli_query($db_con, "SELECT claveal, apellidos, nombre FROM FALUMNOS WHERE unidad='{$grupo}'"); $i = 1; $x_texto1 = 29.5; $y_texto1 = 56; $x_image = 20; $y_image = 21; while ($alumno = mysqli_fetch_object($result)) { if ($i % 5 == 0) { $ln = 1; } else {
require 'mc_table.php'; // Load data function LoadData($file) { // Read file lines $datas = explode('end', trim($file)); foreach ($datas as $line) { $line = substr($line, 0, -3); $line_br = str_replace("<br>", "\r\n", explode('$@$', trim($line))); $data[] = str_replace(" ", " ", $line_br); } return $data; } $hed = explode('end', $heds); $line = substr($hed[0], 0, -3); $header = explode('$@$', $line); $data = LoadData($bdy); //$header = array('Bill-To','Ship-To/Ship-To Location','PO #','Order/Quote/Plant','Planned/Est. Arr Shipping','Status'); $pdf = new PDF_MC_Table(); $pdf->SetWidths(array(40, 70, 40, 50, 55, 25)); $pdf->AddPage('L'); $pdf->SetFont('Arial', '', ''); $pdf->Image('../../images/madix-logo300.png', 10, 12, 50, 0, '', ''); $pdf->SetTopMargin(35); $pdf->Row($header); foreach ($data as $row) { $pdf->Rows($row); } $pdf->Output(); header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename="Order_list.pdf"');
$data["payment_key"] = $dbConn->f("payment_key"); $data["p_vat_type_dtl_id"] = $dbConn->f("ayat"); $data["npwd"] = $dbConn->f("npwd"); $data["total_vat_amount"] = $dbConn->f("total_vat_amount"); $data["p_finance_period_id"] = $dbConn->f("periode"); } $_HEIGHT = 3; $_BORDER = 0; $_FONT = 'Times'; $_FONTSIZE = 8; $pdf = new PDF_MC_Table(); $size = $pdf->_getpagesize('Legal'); $size[1] = 6; $pdf->DefPageSize = $size; $pdf->CurPageSize = $size; $pdf->AddPage('P', array(80, 80)); //$pdf->AddPage('P',array(210,296)); $pdf->SetRightMargin($_HEIGHT); $pdf->SetLeftMargin($_HEIGHT); $pdf->SetAutoPageBreak(false, 0); $pdf->SetFont('Arial', '', 9); $pdf->Image('../images/logo_pemda.png', 5.5, 8, 10, 10); $pdf->ln(); $pdf->SetWidths(array(15, 60)); $pdf->SetAligns(array("L", "C")); $pdf->RowMultiBorderWithHeight(array("", "PEMERINTAH KOTA BANDUNG\n" . "DINAS PELAYANAN PAJAK"), array("", ""), $_HEIGHT + 1); $pdf->ln(1); $pdf->SetWidths(array(15, 50, 10)); $pdf->SetAligns(array("L", "L", "L")); $pdf->RowMultiBorderWithHeight(array("", "", ""), array("T", "T", "T"), 1); $pdf->ln();