function xls_to_decimal($v) { if (strpos($v, ']* ')) { $r = explode(']* ', $v); return to_decimal($r[1]); } return $v; }
?> "> <td class="notclick text-center"><input type="checkbox" name="cb_data[]" class="cb_data" value="<?php echo $id; ?> "></td> <td><?php echo $obj->fields['NO_VA']; ?> </td> <td class="text-center"><?php echo $id; ?> </td> <td class="text-center"><?php echo to_decimal($obj->fields['LUAS_BANGUNAN']); ?> </td> <td><?php echo $obj->fields['LOKASI']; ?> </td> <td><?php echo $obj->fields['JENIS_UNIT']; ?> </td> <td><?php echo $obj->fields['TIPE_BANGUNAN']; ?> </td> <td class="text-right"><?php
private function fpost() { $data['id'] = $this->input->post('id'); $data['tahun'] = $this->input->post('tahun'); $data['kode'] = $this->input->post('kode'); $data['no_sspd'] = $this->input->post('no_sspd'); $data['ppat_id'] = $this->input->post('ppat_id'); $data['wp_nama'] = $this->input->post('wp_nama'); $data['wp_npwp'] = $this->input->post('wp_npwp'); $data['wp_alamat'] = $this->input->post('wp_alamat'); $data['wp_blok_kav'] = $this->input->post('wp_blok_kav'); $data['wp_kelurahan'] = $this->input->post('wp_kelurahan'); $data['wp_rt'] = $this->input->post('wp_rt'); $data['wp_rw'] = $this->input->post('wp_rw'); $data['wp_kecamatan'] = $this->input->post('wp_kecamatan'); $data['wp_kota'] = $this->input->post('wp_kota'); $data['wp_provinsi'] = $this->input->post('wp_provinsi'); $data['wp_identitas'] = $this->input->post('wp_identitas'); $data['wp_identitaskd'] = $this->input->post('wp_identitaskd'); $data['wp_kdpos'] = $this->input->post('wp_kdpos'); $data['tgl_transaksi'] = $this->input->post('tgl_transaksi'); $data['kd_propinsi'] = $this->input->post('kd_propinsi'); $data['kd_dati2'] = $this->input->post('kd_dati2'); $data['kd_kecamatan'] = $this->input->post('kd_kecamatan'); $data['kd_kelurahan'] = $this->input->post('kd_kelurahan'); $data['kd_blok'] = $this->input->post('kd_blok'); $data['no_urut'] = $this->input->post('no_urut'); $data['kd_jns_op'] = $this->input->post('kd_jns_op'); $data['thn_pajak_sppt'] = $this->input->post('thn_pajak_sppt'); $data['op_alamat'] = $this->input->post('op_alamat'); $data['op_blok_kav'] = $this->input->post('op_blok_kav'); $data['op_rt'] = $this->input->post('op_rt'); $data['op_rw'] = $this->input->post('op_rw'); $data['no_sertifikat'] = $this->input->post('no_sertifikat'); $data['perolehan_id'] = $this->input->post('perolehan_id'); $data['bumi_luas'] = to_decimal($this->input->post('bumi_luas')); $data['bumi_njop'] = to_decimal($this->input->post('bumi_njop')); $data['bng_luas'] = to_decimal($this->input->post('bng_luas')); $data['bng_njop'] = to_decimal($this->input->post('bng_njop')); $data['njop'] = to_decimal($this->input->post('njop')); $data['npop'] = to_decimal($this->input->post('npop')); $data['npoptkp'] = to_decimal($this->input->post('npoptkp')); $data['tarif'] = to_decimal($this->input->post('tarif')); $data['terhutang'] = to_decimal($this->input->post('terhutang')); $data['bagian'] = to_decimal($this->input->post('bagian')); $data['pembagi'] = to_decimal($this->input->post('pembagi')); $data['tarif_pengurang'] = to_decimal($this->input->post('tarif_pengurang')); $data['pengurang'] = to_decimal($this->input->post('pengurang')); $data['bphtb_sudah_dibayarkan'] = to_decimal($this->input->post('bphtb_sudah_dibayarkan')); $data['denda'] = to_decimal($this->input->post('denda')); $data['restitusi'] = to_decimal($this->input->post('restitusi')); $data['bphtb_harus_dibayarkan'] = to_decimal($this->input->post('bphtb_harus_dibayarkan')); $data['persen_pengurang_sendiri'] = to_decimal($this->input->post('persen_pengurang_sendiri')); $data['jml_pph'] = to_decimal($this->input->post('jml_pph')); $data['status_pembayaran'] = $this->input->post('status_pembayaran'); $data['dasar_id'] = $this->input->post('dasar_id'); $data['header_id'] = $this->input->post('header_id'); $data['tgl_print'] = $this->input->post('tgl_print'); $data['tgl_approval'] = $this->input->post('tgl_approval'); $data['keterangan'] = $this->input->post('keterangan'); $data['status_daftar'] = $this->input->post('status_daftar'); $data['pp_nomor_pengurang_sendiri'] = $this->input->post('pp_nomor_pengurang_sendiri'); $data['no_ajb'] = $this->input->post('no_ajb'); $data['tgl_ajb'] = $this->input->post('tgl_ajb'); // menyesuaikan ke banjar $data['wp_nama_asal'] = $this->input->post('wp_nama_asal'); $data['wp_npwp_asal'] = $this->input->post('wp_npwp_asal'); $data['wp_alamat_asal'] = $this->input->post('wp_alamat_asal'); $data['wp_blok_kav_asal'] = $this->input->post('wp_blok_kav_asal'); $data['wp_kelurahan_asal'] = $this->input->post('wp_kelurahan_asal'); $data['wp_rt_asal'] = $this->input->post('wp_rt_asal'); $data['wp_rw_asal'] = $this->input->post('wp_rw_asal'); $data['wp_kecamatan_asal'] = $this->input->post('wp_kecamatan_asal'); $data['wp_kota_asal'] = $this->input->post('wp_kota_asal'); $data['wp_provinsi_asal'] = $this->input->post('wp_provinsi_asal'); $data['wp_identitas_asal'] = $this->input->post('wp_identitas_asal'); $data['wp_identitaskd_asal'] = $this->input->post('wp_identitaskd_asal'); $data['wp_kdpos_asal'] = $this->input->post('wp_kdpos_asal'); $data['status_hak_id'] = $this->input->post('status_hak_id'); $data['tgl_pph'] = $this->input->post('tgl_pph'); $data['posted'] = $this->input->post('posted'); $data['pos_tp_id'] = $this->input->post('pos_tp_id'); $data['status_validasi'] = $this->input->post('status_validasi'); $data['status_bpn'] = $this->input->post('status_bpn'); $data['tgl_jatuh_tempo'] = $this->input->post('tgl_jatuh_tempo'); $data['hasil_penelitian'] = $this->input->post('hasil_penelitian'); $data['file1'] = $this->input->post('file1'); $data['file2'] = $this->input->post('file2'); $data['file3'] = $this->input->post('file3'); $data['file4'] = $this->input->post('file4'); $data['file5'] = $this->input->post('file5'); $data['file6'] = $this->input->post('file6'); $data['file7'] = $this->input->post('file7'); $data['file8'] = $this->input->post('file8'); $data['file9'] = $this->input->post('file9'); $data['file10'] = $this->input->post('file10'); $data['create_uid'] = $this->input->post('create_uid'); $data['update_uid'] = $this->input->post('update_uid'); $data['created'] = $this->input->post('created'); $data['updated'] = $this->input->post('updated'); $data['no_sk'] = $this->input->post('no_sk'); $data['ketetapan_no'] = $this->input->post('ketetapan_no'); $data['ketetapan_tgl'] = $this->input->post('ketetapan_tgl'); $data['ketetapan_atas_sspd_no'] = $this->input->post('ketetapan_atas_sspd_no'); $data['ketetapan_jatuh_tempo_tgl'] = $this->input->post('ketetapan_jatuh_tempo_tgl'); $data['pengurangan_sk'] = $this->input->post('pengurangan_sk'); $data['pengurangan_sk_tgl'] = $this->input->post('pengurangan_sk_tgl'); $data['pengurangan_jatuh_tempo_tgl'] = $this->input->post('pengurangan_jatuh_tempo_tgl'); $data['sspdno'] = $this->input->post('sspdno'); $data['nop_thn'] = $this->input->post('nop_thn'); $data['transno'] = $this->input->post('transno'); $data['tanggal'] = $this->input->post('tanggal'); $data['harga_transaksi'] = to_decimal($this->input->post('harga_transaksi')); $data['npopkp'] = to_decimal($this->input->post('npopkp')); return $data; }
<?php $l = 0; $l_skip = array(1, 2, 3, 4); $list = array(); $file = fopen($uploaded_file, 'r'); while (!feof($file)) { $l++; $line = fgets($file); if (in_array($l, $l_skip, TRUE)) { continue; } elseif (strlen($line) < 255 | $line == '') { echo '<tr><td colspan="14">Error. format baris : ' . $l . '</td></tr>'; continue; } $list[$l] = array('np' => (string) clean(substr($line, 47, 13)), 'jb' => to_decimal(substr($line, 190, 10)), 'db' => clean(substr($line, 0, 8)), 'tb' => clean(substr($line, 9, 5))); } fclose($file); $in_no_pelanggan = array(); $data_imp = array(); foreach ($list as $x) { $np = (string) $x['np']; $jb = (int) $x['jb']; $spl = explode('/', $x['db']); if (count($spl) != 3 || !checkdate($spl[0], $spl[1], $spl[2])) { echo ' <tr> <td colspan="2"></td> <td>' . $np . '</td> <td colspan="11">Error. Format tanggal tidak valid. ' . $x['db'] . '</td> </tr>';
$query = "\n\t\t\t\tSELECT COUNT(KODE_BLOK) AS TOTAL FROM STOK WHERE KODE_BLOK = '{$kode_blok}' OR NO_VA = '{$virtual_account}'\n\t\t\t\t"; $total_data = $conn->Execute($query)->fields['TOTAL']; $jumBaris = $row - 1; $jumData = $highestRow - 1; if ($total_data == 0) { $kode_sk = $val[0]; $kode_unit = $val[2]; $kode_lokasi = $val[3]; $kode_tipe = $val[4]; $kode_penjualan = $val[5]; $luas_bangunan = $val[6]; $kode_lokasi = !empty($kode_lokasi) ? clean($kode_lokasi) : ''; $kode_unit = !empty($kode_unit) ? clean($kode_unit) : ''; $kode_tipe = !empty($kode_tipe) ? clean($kode_tipe) : ''; $kode_penjualan = !empty($kode_penjualan) ? clean($kode_penjualan) : ''; $luas_bangunan = !empty($luas_bangunan) ? to_decimal($luas_bangunan) : '0'; $query = "\n\t\t\t\t\tINSERT INTO STOK \n\t\t\t\t\t(\n\t\t\t\t\t\tKODE_BLOK, KODE_UNIT,KODE_LOKASI, KODE_TIPE, KODE_SK, STATUS_STOK, TERJUAL, KODE_PENJUALAN, LUAS_BANGUNAN, NO_VA\n\t\t\t\t\t\t)\nVALUES\n(\n\t'{$kode_blok}', {$kode_unit}, {$kode_lokasi}, {$kode_tipe}, '{$kode_sk}','0', '0', {$kode_penjualan}, {$luas_bangunan}, '{$virtual_account}'\n\t)\t\t\n"; ex_false($conn->Execute($query), $query); } else { //cek data yang gagal $kode_blok_gagal[] = $kode_blok; } $conn->committrans(); //hitung jumlah gagal $jumlah_gagal += $total_data; //hitung jumlah berhasil $jumlah_berhasil = $jumData - $jumlah_gagal; } // Hapus file excel ketika data sudah masuk ke tabel @unlink($file_name); $msg = " Data berhasil diupload \n " . $jumlah_berhasil . " data sukses \n " . $jumlah_gagal . " data Gagal \n \n Kode Blok yang Gagal:\n ";
?> "></td> <td class="text-center"><?php echo $id; ?> </td> <td><?php echo $obj->fields['FAKTOR_STRATEGIS']; ?> </td> <td class="text-right"><?php echo to_decimal($obj->fields['NILAI_TAMBAH']); ?> </td> <td class="text-right"><?php echo to_decimal($obj->fields['NILAI_KURANG']); ?> </td> <td class="text-center"><?php echo status_check($obj->fields['STATUS']); ?> </td> </tr> <?php $obj->movenext(); } } ?> </table> <table id="pagging-2" class="t-control w60"></table>
<?php require_once '../../../../config/config.php'; $msg = ''; $error = FALSE; $act = isset($_REQUEST['act']) ? clean($_REQUEST['act']) : ''; $id = isset($_REQUEST['id']) ? clean($_REQUEST['id']) : ''; $kode_faktor = isset($_REQUEST['kode_faktor']) ? to_number($_REQUEST['kode_faktor']) : ''; $faktor_strategis = isset($_REQUEST['faktor_strategis']) ? clean($_REQUEST['faktor_strategis']) : ''; $nilai_tambah = isset($_REQUEST['nilai_tambah']) ? to_decimal($_REQUEST['nilai_tambah']) : ''; $nilai_kurang = isset($_REQUEST['nilai_kurang']) ? to_decimal($_REQUEST['nilai_kurang']) : ''; $status = isset($_REQUEST['status']) ? to_number($_REQUEST['status']) : '0'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { ex_login(); ex_app('M'); ex_mod('M05'); $conn = conn($sess_db); ex_conn($conn); $conn->begintrans(); ex_ha('PM03', 'D'); $act = array(); $cb_data = $_REQUEST['cb_data']; ex_empty($cb_data, 'Pilih data yang akan dihapus.'); foreach ($cb_data as $id_del) { if ($conn->Execute("DELETE FROM FAKTOR WHERE KODE_FAKTOR = '{$id_del}'")) { $act[] = $id_del; } else { $error = TRUE; } }
<td><input type="text" name="faktor_strategis" id="faktor_strategis" size="50" value="<?php echo $faktor_strategis; ?> "></td> </tr> <tr> <td>Tambah</td><td>:</td> <td><input type="text" name="nilai_tambah" id="nilai_tambah" size="30" value="<?php echo to_decimal($nilai_tambah); ?> "></td> </tr> <tr> <td>Kurang</td><td>:</td> <td><input type="text" name="nilai_kurang" id="nilai_kurang" size="30" value="<?php echo to_decimal($nilai_kurang); ?> "></td> </tr> <tr> <td>Status</td><td>:</td> <td><input type="checkbox" name="status" id="status" value="1" <?php echo is_checked($status, '1'); ?> ></td> </tr> <tr> <td colspan="3"><br> <input type="submit" id="simpan" value=" Simpan "> <input type="reset" id="reset" value=" Reset ">
"> <input type="text" id="tipe_bangunan" size="25" value="<?php if (isset($tipe_bangunan)) { echo $tipe_bangunan; } else { echo '-'; } ?> " readonly> </td> </tr> <tr> <td><b>Luas Semi Gross</b></td><td>:</td> <td><input type="text" name="luas_bangunan" id="luas_bangunan" size="5" value="<?php echo to_decimal($luas_bangunan); ?> " readonly> M²</td> </tr> <tr> <td>SK Harga</td><td>:</td> <td> <input type="text" name="kode_sk" id="kode_sk" size="10" value="<?php if (isset($kode_sk)) { echo $kode_sk; } else { echo '-'; } ?> " readonly>
if ($qty_sk < 1) { $query = "INSERT INTO HARGA_BANGUNAN(KODE_SK,KODE_LOKASI,TANGGAL,JENIS_BANGUNAN,HARGA_BANGUNAN,STATUS) VALUES((SELECT MAX(KODE_SK)+1 FROM HARGA_BANGUNAN),0,GETDATE(),'0',{$harga_bangunan},'1')"; ex_false($conn->Execute($query), $query); } $data->movenext(); } $msg = "Detail Pola Bayar berhasil ditambahkan."; } elseif ($act == 'Ubah') { ex_ha('M09', 'U'); ex_empty($kode_blok, 'Kode Blok harus diisi'); if ($sebelumnya != $pola_bayar) { $query = "SELECT COUNT(KODE_BLOK) AS TOTAL FROM DETAIL_POLA_BAYAR WHERE KODE_BLOK = '{$kode_blok}' AND KODE_POLA_BAYAR = '{$pola_bayar}'"; ex_found($conn->Execute($query)->fields['TOTAL'], "Detail Pola Bayar Sudah Terdaftar"); } $harga_tanah = isset($_REQUEST['harga_tanah']) ? to_decimal($_REQUEST['harga_tanah']) : 0; $harga_bangunan = isset($_REQUEST['harga_bangunan']) ? to_decimal($_REQUEST['harga_bangunan']) : 0; $query = "UPDATE DETAIL_POLA_BAYAR SET HARGA_TANAH = '{$harga_tanah}', \n\t\t\t\t\t\t\t\tHARGA_BANGUNAN = '{$harga_bangunan}' ,\n\t\t\t\t\t\t\t\tKODE_POLA_BAYAR = '{$pola_bayar}'\n\t\t\t\t\t\t\t\tWHERE KODE_BLOK = '{$kode_blok}' AND KODE_POLA_BAYAR = '{$sebelumnya}'"; ex_false($conn->Execute($query), $query); $query = "SELECT count(*) AS TOTAL from HARGA_TANAH WHERE HARGA_TANAH = '{$harga_tanah}' and STATUS = '1'"; $qty_sk = $conn->Execute($query)->fields['TOTAL']; if ($qty_sk < 1) { $query = "INSERT INTO HARGA_TANAH(KODE_SK,KODE_LOKASI,TANGGAL,HARGA_TANAH,STATUS) VALUES((SELECT MAX(KODE_SK)+1 FROM HARGA_TANAH),0,GETDATE(),{$harga_tanah},'1')"; ex_false($conn->Execute($query), $query); } $query = "SELECT count(*) AS TOTAL from HARGA_BANGUNAN WHERE HARGA_BANGUNAN = '{$harga_bangunan}' and STATUS = '1'"; $qty_sk = $conn->Execute($query)->fields['TOTAL']; if ($qty_sk < 1) { $query = "INSERT INTO HARGA_BANGUNAN(KODE_SK,KODE_LOKASI,TANGGAL,JENIS_BANGUNAN,HARGA_BANGUNAN,STATUS) VALUES((SELECT MAX(KODE_SK)+1 FROM HARGA_BANGUNAN),0,GETDATE(),'0',{$harga_bangunan},'1')"; ex_false($conn->Execute($query), $query); } $msg = 'Detail Pola Bayar berhasil diupdate.';
?> </td> <td><?php echo $id; ?> </td> <td><?php echo $obj->fields['TIPE_BANGUNAN']; ?> </td> <td class="text-right"><?php echo to_decimal($obj->fields['LUAS_BANGUNAN']); ?> </td> <td class="text-right"><?php echo to_decimal($obj->fields['LUAS_TANAH']); ?> </td> <td><?php echo tgltgl(date("d-m-Y", strtotime($obj->fields['MEMO_MARKETING_TANGGAL']))); ?> </td> <td><?php echo $obj->fields['MEMO_MARKETING_NO']; ?> </td> <td><?php echo $obj->fields['NOMOR_SPK']; ?> </td> <td><?php
<?php $l = 0; $list = array(); $file = fopen($uploaded_file, 'r'); while (!feof($file)) { $l++; $line = fgets($file); if (strlen($line) < 71 || $line == '') { echo '<tr><td colspan="14">Error. Format baris : ' . $l . '</td></tr>'; continue; } $list[$l] = array('no_va' => (string) clean(substr($line, 8, 19)), 'nilai' => to_decimal(substr($line, 58, 11)), 'tanggal_transaksi' => clean(substr($line, 73, 8))); } fclose($file); $in_no_pelanggan = array(); $data_imp = array(); $i = 1; $j = 1; $k = 1; $l = 1; $m = 1; foreach ($list as $x) { $no_va = (string) $x['no_va']; $nomor_va = substr($no_va, -7); $nilai = (int) $x['nilai']; $rupiah = number_format($nilai, 2, ',', '.'); $spl = explode('/', $x['tanggal_transaksi']); if (count($spl) == 3) { ?> <tr>
<?php $l = 0; $list = array(); $file = fopen($uploaded_file, 'r'); while (!feof($file)) { $l++; $line = fgets($file); if (strlen($line) < 71 || $line == '') { echo '<tr><td colspan="14">Error. format baris : ' . $l . '</td></tr>'; continue; } $list[$l] = array('np' => (string) clean(substr($line, 0, 12)), 'jb' => to_decimal(substr($line, 47, 12)), 'tb' => clean(substr($line, 61, 8))); } fclose($file); $in_no_pelanggan = array(); $data_imp = array(); foreach ($list as $x) { $np = (string) $x['np']; $jb = (int) $x['jb']; $hri = clean(substr($x['tb'], 6, 2)); $bln = clean(substr($x['tb'], 4, 2)); $thn = clean(substr($x['tb'], 2, 2)); if (!checkdate($bln, $hri, $thn)) { echo ' <tr> <td colspan="2"></td> <td>' . $np . '</td> <td colspan="11">Error. Format tanggal tidak valid. ' . $x['tb'] . '</td> </tr>'; continue;
$val = array(); for ($col = 0; $col < $highestColumnIndex; ++$col) { $cell = $worksheet->getCellByColumnAndRow($col, $row); $val[] = $cell->getValue(); } $jumBaris = $row - 1; $jumData = $highestRow - 1; // Skip data jika nomor_va dan tanggal sudah ada $nomor_va = $val[0]; $tanggal = $val[1]; $nilai = $val[2]; $nomor_va = !empty($nomor_va) ? clean($nomor_va) : ''; $tanggal_transaksi = !empty($tanggal) ? clean($tanggal) : ''; $UNIX_DATE = ($tanggal_transaksi - 25569) * 86400; $tanggal_transaksi = gmdate("d/m/Y", $UNIX_DATE); $nilai = !empty($nilai) ? to_decimal($nilai) : ''; //PEMOTONGAN 7 KARAKTER TERAHIR $nomor_va = substr($nomor_va, -7); ?> <tr> <td><?php echo $i++; ?> </td> <td><input type="checkbox" name="cb_data[<?php echo $j++; ?> ]" value="<?php echo $nomor_va; ?> " class="cb_data"></td>
$kode_faktor = !empty($kode_faktor) ? clean($kode_faktor) : ''; $kode_tipe = !empty($kode_tipe) ? clean($kode_tipe) : ''; $kode_sk_bangunan = !empty($kode_sk_bangunan) ? clean($kode_sk_bangunan) : ''; $kode_penjualan = !empty($kode_penjualan) ? clean($kode_penjualan) : ''; $class = !empty($class) ? clean($class) : ''; $status_gambar_siteplan = !empty($status_gambar_siteplan) ? to_number($status_gambar_siteplan) : '0'; $status_gambar_lapangan = !empty($status_gambar_lapangan) ? to_number($status_gambar_lapangan) : '0'; $status_gambar_gs = !empty($status_gambar_gs) ? to_number($status_gambar_gs) : '0'; $program = !empty($program) ? to_number($program) : '0'; $luas_tanah = !empty($luas_tanah) ? to_decimal($luas_tanah) : '0'; $disc_tanah = !empty($disc_tanah) ? to_decimal($disc_tanah, 16) : '0'; $harga_disc_tanah = !empty($harga_disc_tanah) ? to_number($harga_disc_tanah) : '0'; $ppn_tanah = !empty($ppn_tanah) ? to_decimal($ppn_tanah) : '0'; $luas_bangunan = !empty($luas_bangunan) ? to_decimal($luas_bangunan) : '0'; $disc_bangunan = !empty($disc_bangunan) ? to_decimal($disc_bangunan, 16) : '0'; $ppn_bangunan = !empty($ppn_bangunan) ? to_decimal($ppn_bangunan) : '0'; $query = "\n\t\t\t\t\tINSERT INTO STOK \n\t\t\t\t\t(\n\t\t\t\t\tNO_VA,KODE_BLOK, KODE_UNIT, KODE_DESA, KODE_LOKASI, KODE_SK_TANAH, \n\t\t\t\t\tKODE_FAKTOR, KODE_TIPE, KODE_SK_BANGUNAN, KODE_PENJUALAN, \n\t\t\t\t\t\n\t\t\t\t\tLUAS_TANAH, LUAS_BANGUNAN, \n\t\t\t\t\tPPN_TANAH, PPN_BANGUNAN, \n\t\t\t\t\tDISC_TANAH, DISC_BANGUNAN, \n\t\t\t\t\t\n\t\t\t\t\tPROGRESS, \n\t\t\t\t\t\n\t\t\t\t\tCLASS, STATUS_STOK, TERJUAL, PROGRAM,\n\t\t\t\t\t\n\t\t\t\t\tSTATUS_GAMBAR_SITEPLAN, \n\t\t\t\t\tSTATUS_GAMBAR_LAPANGAN, \n\t\t\t\t\tSTATUS_GAMBAR_GS\n\t\t\t\t\t)\n\t\t\t\t\tVALUES\n\t\t\t\t\t(\n\t\t\t\t\t'{$virtual_account}','{$kode_blok}', {$kode_unit}, {$kode_desa}, {$kode_lokasi}, {$kode_sk_tanah}, \n\t\t\t\t\t{$kode_faktor}, {$kode_tipe}, {$kode_sk_bangunan}, {$kode_penjualan}, \n\t\t\t\t\t\n\t\t\t\t\t{$luas_tanah}, {$luas_bangunan}, \n\t\t\t\t\t{$ppn_tanah}, {$ppn_bangunan}, \n\t\t\t\t\t{$disc_tanah}, {$disc_bangunan}, \n\t\t\t\t\t\n\t\t\t\t\t0, \n\t\t\t\t\t\n\t\t\t\t\t'{$class}', '0', '0', '{$program}', \n\t\t\t\t\t\n\t\t\t\t\t'{$status_gambar_siteplan}', \n\t\t\t\t\t'{$status_gambar_lapangan}', \n\t\t\t\t\t'{$status_gambar_gs}'\n\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t\t"; ex_false($conn->Execute($query), $query); } else { //cek data yang gagal $kode_blok_gagal[] = $kode_blok; } $conn->committrans(); //hitung jumlah gagal $jumlah_gagal += $total_data; //hitung jumlah berhasil $jumlah_berhasil = $jumData - $jumlah_gagal; } // Hapus file excel ketika data sudah masuk ke tabel @unlink($file_name); $msg = " Data berhasil diupload \n " . $jumlah_berhasil . " data sukses \n " . $jumlah_gagal . " data Gagal \n \n Kode Blok yang Gagal:\n ";
?> "></td> </tr> <tr> <td><b>Bangunan</b></td> <td><input type="text" name="luas_bangunan" id="luas_bangunan" size="5" value="<?php echo to_decimal($luas_bangunan); ?> "> M²</td> <td colspan="2" rowspan="2"></td> <td><input type="text" name="disc_bangunan" id="disc_bangunan" size="12" value="<?php echo to_decimal($disc_bangunan); ?> "> %</td> <td><input type="text" name="ppn_bangunan" id="ppn_bangunan" size="12" value="<?php echo to_decimal($ppn_bangunan); ?> "> %</td> <td rowspan="2">Rp. <input readonly="readonly" type="text" class="bold text-right" name = "harga_bangunan_total" id = "harga_bangunan_total"value="<?php echo to_money($harga_bangunan); ?> "></td> </tr> <tr> <td colspan="2" class="text-right">Rp. <input readonly="readonly" name = "harga_bangunan_tmp" id = "harga_bangunan_tmp" type="text" size="15" class="text-right" value="<?php echo to_money($base_harga_bangunan); ?> "></td> <td>Rp. <input name = "harga_disc_bangunan" id ="harga_disc_bangunan" type="text" size="12" class="text-right" value="<?php echo to_money($disc_harga_bangunan); ?>
<tr> <tr> <td>Discount Bangunan</td><td>:</td> <td><?php echo to_decimal($r_disc_tanah); ?> %</td> <td class="text-right">Rp. <?php echo to_money($r_disc_harga_bangunan); ?> </td> <tr> <tr> <td>PPN Bangunan</td><td>:</td> <td><?php echo to_decimal($r_ppn_tanah); ?> %</td> <td class="text-right">Rp. <?php echo to_money($r_ppn_harga_bangunan); ?> </td> <td width="40"></td> <td>Harga Bangunan</td><td>:</td> <td class="text-right">Rp. <?php echo to_money($r_harga_bangunan); ?> </td> <tr> <tr> <td colspan="5"></td>
<?php $xls = new Spreadsheet_Excel_Reader($uploaded_file, false); $baris = $xls->rowcount($sheet_index = 0); $x_tgl_bayar_bank = clean($xls->val(3, 2)); $spl = explode('-', $x_tgl_bayar_bank); if (count($spl) != 3 || !checkdate($spl[1], $spl[0], $spl[2])) { echo '<tr><td colspan="14">Error. Format tanggal tidak valid. ' . $x_tgl_bayar_bank . '</td></tr>'; exit; } $tbb = $spl[0] . '-' . $spl[1] . '-' . $spl[2] . ' 00:00:00'; for ($ix = 5; $ix <= $baris; $ix++) { $x_no_pelanggan = (string) clean($xls->val($ix, 3)); if ($x_no_pelanggan != "") { $list[$ix] = array('np' => $x_no_pelanggan, 'jair' => to_decimal(xls_clean_number($xls->val($ix, 5))), 'jipl' => to_decimal(xls_clean_number($xls->val($ix, 6))), 'ba' => to_decimal(xls_clean_number($xls->val($ix, 7)))); } } $in_no_pelanggan = array(); $data_imp = array(); foreach ($list as $x) { $np = (string) $x['np']; $jumlah_air = (int) $x['jair']; $jumlah_ipl = (int) $x['jipl']; $biaya_admin = (int) $x['ba']; $jb = $jumlah_air + $jumlah_ipl; $in_no_pelanggan[] = $np; $data_imp["{$np}"]['jb'] = $jb; $data_imp["{$np}"]['tbb'] = $tbb; }
public function update() { if (!$this->module_auth->update) { $this->session->set_flashdata('msg_warning', $this->module_auth->msg_update); redirect(active_module_url($this->controller)); } $data['current'] = $this->current; $data['apps'] = $this->apps_model->get_active_only(); $data['faction'] = active_module_url($this->controller . '/update'); $data['dt'] = $this->fpost(); $this->fvalidation(); if ($this->form_validation->run()) { $dat = array('no_ajb' => $this->input->post('no_ajb') ? $this->input->post('no_ajb') : null, 'tgl_ajb' => $this->input->post('tgl_ajb') ? date('Y-m-d', strtotime($this->input->post('tgl_ajb'))) : null, 'wp_nama_asal' => $this->input->post('wp_nama_asal') ? $this->input->post('wp_nama_asal') : null, 'jml_pph' => $this->input->post('jml_pph') ? to_decimal($this->input->post('jml_pph')) : null, 'tgl_pph' => $this->input->post('tgl_pph') ? date('Y-m-d', strtotime($this->input->post('tgl_pph'))) : null, 'verifikasi_date' => $this->input->post('verifikasi_date') ? date('Y-m-d', strtotime($this->input->post('verifikasi_date'))) : date('Y-m-d'), 'verifikasi_uid' => $this->session->userdata('uid')); $this->sspd_model->update($this->input->post('id'), $dat); $this->session->set_flashdata('msg_success', 'Data telah disimpan'); redirect(active_module_url($this->controller)); } $this->load->view('vajb_verifikasi_form', $data); }
if ($x_kode_blok != "") { $q_kode_blok[] = $x_kode_blok; } } # LIST NO_PELANGGAN $in_q_kode_blok = implode("', '", $q_kode_blok); $query = "\nSELECT \n\tKODE_BLOK, NO_PELANGGAN\nFROM\n\tKWT_PELANGGAN \nWHERE\n\tKODE_BLOK IN ('{$in_q_kode_blok}') \n"; $q_np = array(); $obj = $conn->Execute($query); while (!$obj->EOF) { $q_kb = $obj->fields['KODE_BLOK']; $q_np["{$q_kb}"] = $obj->fields['NO_PELANGGAN']; $obj->movenext(); } # GET VALUES for ($ix = 4; $ix <= $baris; $ix++) { $x_kode_blok = (string) clean($xls->val($ix, 2)); if ($x_kode_blok != "") { $qg_np = isset($q_np["{$x_kode_blok}"]) ? $q_np["{$x_kode_blok}"] : "-"; $list[$ix] = array('np' => $qg_np, 'jb' => to_decimal(xls_clean_number($xls->val($ix, 6)))); } } $in_no_pelanggan = array(); $data_imp = array(); foreach ($list as $x) { $np = (string) $x['np']; $jb = (int) $x['jb']; $in_no_pelanggan[] = $np; $data_imp["{$np}"]['jb'] = $jb; $data_imp["{$np}"]['tbb'] = $tbb; }
$kode_faktor = isset($_REQUEST['kode_faktor']) ? clean($_REQUEST['kode_faktor']) : ''; $kode_tipe = isset($_REQUEST['kode_tipe']) ? clean($_REQUEST['kode_tipe']) : ''; $kode_sk = isset($_REQUEST['kode_sk']) ? clean($_REQUEST['kode_sk']) : ''; $kode_penjualan = isset($_REQUEST['kode_penjualan']) ? clean($_REQUEST['kode_penjualan']) : ''; $class = isset($_REQUEST['class']) ? clean($_REQUEST['class']) : ''; $status_gambar_siteplan = isset($_REQUEST['status_gambar_siteplan']) ? to_number($_REQUEST['status_gambar_siteplan']) : '0'; $status_gambar_lapangan = isset($_REQUEST['status_gambar_lapangan']) ? to_number($_REQUEST['status_gambar_lapangan']) : '0'; $status_gambar_gs = isset($_REQUEST['status_gambar_gs']) ? to_number($_REQUEST['status_gambar_gs']) : '0'; $program = isset($_REQUEST['program']) ? to_number($_REQUEST['program']) : '0'; $luas_tanah = isset($_REQUEST['luas_tanah']) ? to_decimal($_REQUEST['luas_tanah']) : '0'; $disc_tanah = isset($_REQUEST['disc_tanah']) ? to_decimal($_REQUEST['disc_tanah'], 16) : '0'; $harga_disc_tanah = isset($_REQUEST['harga_disc_tanah']) ? to_number($_REQUEST['harga_disc_tanah']) : '0'; $ppn_tanah = isset($_REQUEST['ppn_tanah']) ? to_decimal($_REQUEST['ppn_tanah']) : '0'; $luas_bangunan = isset($_REQUEST['luas_bangunan']) ? to_decimal($_REQUEST['luas_bangunan']) : '0'; $disc_bangunan = isset($_REQUEST['disc_bangunan']) ? to_decimal($_REQUEST['disc_bangunan'], 16) : '0'; $ppn_bangunan = isset($_REQUEST['ppn_bangunan']) ? to_decimal($_REQUEST['ppn_bangunan']) : '0'; // HARGA DI TABEL SK $kode_sk = isset($_REQUEST['kode_sk']) ? $_REQUEST['kode_sk'] : ''; $harga_cash_keras = isset($_REQUEST['harga_cash_keras']) ? bigintval($_REQUEST['harga_cash_keras']) : '0'; $CB36X = isset($_REQUEST['harga_CB36X']) ? bigintval($_REQUEST['harga_CB36X']) : '0'; $CB48X = isset($_REQUEST['harga_CB48X']) ? bigintval($_REQUEST['harga_CB48X']) : '0'; $KPA24X = isset($_REQUEST['harga_KPA24X']) ? bigintval($_REQUEST['harga_KPA24X']) : '0'; $KPA36X = isset($_REQUEST['harga_KPA36X']) ? bigintval($_REQUEST['harga_KPA36X']) : '0'; $lokasi = ''; $jenis_unit = ''; $harga_tanah_sk = ''; $faktor_strategis = ''; $tipe_bangunan = ''; $harga_bangunan_sk = ''; $jenis_penjualan = ''; $tgl_bangunan = '';
<?php $l = 0; $list = array(); $file = fopen($uploaded_file, 'r'); while (!feof($file)) { $l++; $line = fgets($file); if ($line == '') { echo '<tr><td colspan="14">Error. format baris : ' . $l . '</td></tr>'; continue; } $list[$l] = array('np' => (string) clean(substr($line, 17, 13)), 'jb' => to_decimal(substr($line, 101, 10)), 'tb' => clean(substr($line, 49, 8))); } fclose($file); $in_no_pelanggan = array(); $data_imp = array(); foreach ($list as $x) { $np = (string) $x['np']; $jb = (int) $x['jb']; $hri = clean(substr($x['tb'], 0, 2)); $bln = clean(substr($x['tb'], 2, 2)); $thn = clean(substr($x['tb'], 6, 2)); if (!checkdate($bln, $hri, $thn)) { echo ' <tr> <td colspan="2"></td> <td>' . $np . '</td> <td colspan="11">Error. Format tanggal tidak valid. ' . $x['tb'] . '</td> </tr>'; continue;