Beispiel #1
0
 function cetak()
 {
     $type = $this->uri->segment(4);
     $qs = urldecode($_SERVER['QUERY_STRING']);
     parse_str($qs, $qs_data);
     $params = array();
     // foreach ($qs_data as $key => $val)
     // $params[$key] = $val;
     $sptpd = $this->load->model('sptpd_model')->get($this->input->get('id'));
     $sspd = $this->load->model('sspd_model')->get_by_spt($this->input->get('id'));
     $cu = $this->load->model('objek_pajak_model')->get($sptpd->customer_usaha_id);
     $report = $this->load->model('report_model')->get_report($cu->usaha_id, $sptpd->type_id);
     // $bayar = $sptpd->pajak_terhutang+$sspd->bunga;
     // $bayar = ($sptpd->pajak_terhutang-$sptpd->bunga)+$sspd->bunga;
     $bayar = $sspd->jml_bayar;
     switch ($this->input->get('rpt')) {
         case 'sspd':
             $rpt = $report->sspdnm;
             $params = array('spt_id' => intval($sptpd->id));
             break;
         case 'validasi':
             $rpt = 'validasi_00';
             $params = array('spt_id' => intval($sptpd->id));
             break;
     }
     $params = array_merge($params, array("alamat" => pad_pemda_alamat(), "telp" => pad_pemda_telp(), "fax" => pad_pemda_fax(), "website" => pad_pemda_website(), "email" => pad_pemda_email(), "alamat_lengkap" => pad_pemda_alamat_lengkap(), "terbilang" => strtoupper(terbilang($bayar)), "pad_bunga" => (double) pad_bunga(), "daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama(), "logo" => base_url('assets/img/logorpt__.jpg')));
     $rpt = $rpt;
     // $rpt = $this->module.'/'.$rpt;
     $jasper = $this->load->library('Jasper');
     echo $jasper->cetak($rpt, $params, $type, false);
 }
Beispiel #2
0
 function cetak()
 {
     $type = $this->uri->segment(4);
     $rpt = $this->input->get('rpt');
     $kondisi = "";
     if ($rpt == 'sptpd_tr') {
         $wp_id = $this->input->get('w');
         if (!empty($wp_id)) {
             $kondisi .= " AND c.id={$wp_id} ";
         }
         $type_id = $this->input->get('t');
         if ($type_id != 999) {
             $kondisi .= " AND st.id={$type_id} ";
         }
         $usaha_id = $this->input->get('u');
         if ($usaha_id != 999) {
             $kondisi .= " AND u.id={$usaha_id} ";
         }
         $kondisi .= " AND s.tahun=" . pad_tahun_anggaran();
         $params = array("daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama(), 'kondisi' => (string) $kondisi);
     } elseif ($rpt == 'sptpd_omset') {
         $rpt = 'sptpd_rincian_omset';
         $sptpd_id = $this->input->get('no');
         $terbilang = terbilang(pad_to_decimal($this->input->get('val')), 3) . " Rupiah";
         $params = array('sptpd_id' => (int) $sptpd_id, "terbilang" => $terbilang, "alamat" => pad_pemda_alamat(), "telp" => pad_pemda_telp(), "fax" => pad_pemda_fax(), "website" => pad_pemda_website(), "email" => pad_pemda_email(), "alamat_lengkap" => pad_pemda_alamat_lengkap(), "daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama(), "logo" => $_SERVER["DOCUMENT_ROOT"] . "/assets/img/logorpt__.jpg", "logobjb" => $_SERVER["DOCUMENT_ROOT"] . "/assets/img/bank-bjb.jpg");
     } else {
         $rpt = 'sptpd_slip';
         $sptpd_id = $this->input->get('no');
         $terbilang = terbilang(pad_to_decimal($this->input->get('val')), 3) . " Rupiah";
         $params = array('sptpd_id' => (int) $sptpd_id, "terbilang" => $terbilang, "alamat" => pad_pemda_alamat(), "telp" => pad_pemda_telp(), "fax" => pad_pemda_fax(), "website" => pad_pemda_website(), "email" => pad_pemda_email(), "alamat_lengkap" => pad_pemda_alamat_lengkap(), "daerah" => pad_pemda_daerah(), "dinas" => pad_pemda_nama(), "logo" => $_SERVER["DOCUMENT_ROOT"] . "/assets/img/logorpt__.jpg", "logobjb" => $_SERVER["DOCUMENT_ROOT"] . "/assets/img/bank-bjb.jpg");
     }
     $ignore_html_pg = TRUE;
     $rpt = 'wp/' . $rpt;
     $db_pad = $this->load->database('pad', TRUE);
     $jasper = $this->load->library('Jasper');
     $jasper->db = $db_pad->database;
     $jasper->usr = $db_pad->username;
     $jasper->pwd = $db_pad->password;
     $jasper->port = $db_pad->port;
     echo $jasper->cetak($rpt, $params, $type, $ignore_html_pg);
 }