<th class="w5">JENIS</th> <th class="w10">TANGGAL SPP</th> <th class="w15">NILAI TRANSAKSI SEBELUM PPN</th> <th class="w15">PPN</th> <th class="w15">TOTAL TRANSAKSI</th> <th class="w15">TOTAL PEMBAYARAN</th> </tr> '; $set_ttd = ' <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $p = 1;
text-align:right; border:1px solid #000000; } .break { word-wrap:break-word; } .nowrap { white-space:nowrap; } .va-top { vertical-align:top; } .va-bottom { vertical-align:bottom; } .text-left { text-align:left; } .text-center { text-align:center; } .text-right { text-align:right; } </style> <table border="1"> <tr><td colspan="10" class="nb text-center"><b> LAPORAN PROYEKSI PENAGIHAN</b></td></tr> <tr><td colspan="10" class="nb text-center"> Periode <?php echo kontgl(date("d M Y", strtotime($periode_awal))) . ' s/d ' . kontgl(date("d M Y", strtotime($periode_akhir))); ?> </td></tr> <tr> <th rowspan="2">NO.</th> <th rowspan="2">NAMA PEMBELI</th> <th rowspan="2">BLOK / NOMOR</th> <th rowspan="2">TOTAL HARGA</th> <th rowspan="2">PEMBAYARAN s/d BULAN LALU</th> <th rowspan="2">PEMBAYARAN BULAN INI (s/d <?php echo $tanggal; ?> )</th> <th colspan="3">SISA TAGIHAN</th> <th colspan="8">PROYEKSI PENAGIHAN</th>
?> "> <td width="30" class="notclick text-center"><input type="checkbox" name="cb_data[]" class="cb_data" value="<?php echo $id; ?> "></td> <td><?php echo $id; ?> </td> <td><?php echo $obj->fields['NAMA_PEMBELI']; ?> </td> <td class="text-center"><?php echo kontgl(date("d M Y", strtotime($obj->fields['TANGGAL_SPP']))); ?> </td> </tr> <?php $obj->movenext(); } } ?> </table> <table id="pagging-2" class="t-control w60"></table> <script type="text/javascript"> jQuery(function($) {
$tgl = $pecah_tanggal[2]; if ($bln + 1 > 12) { $next_bln = $bln % 12; $next_thn = $thn + 1; } else { $next_bln = $bln + 1; $next_thn = $thn; } $query = "SELECT * FROM RENCANA WHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; $obj = $conn->execute($query); $no_somasi1 = $obj->fields['NO_SURAT2']; $tgl_somasi1 = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT2'])))); $no_somasi2 = $obj->fields['NO_SURAT3']; $tgl_somasi2 = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT3'])))); $no_somasi3 = $obj->fields['NO_SURAT4']; $tgl_somasi3 = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT4'])))); if ($status == 2) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_TUNAI = NOMOR_SURAT_TUNAI + 1"; ex_false($conn->execute($query), $query); } else { if ($status == 1) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_KPR = NOMOR_SURAT_KPR + 1"; ex_false($conn->execute($query), $query); } } $query = "update RENCANA set NO_SURAT5 = '{$nomor_surat}', TANGGAL_SURAT5 = CONVERT(DATETIME,GETDATE(),105) \n\t\t\tWHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; ex_false($conn->execute($query), $query); $query = "update SPP set STATUS_WANPRESTASI = 1 \n\t\t\tWHERE KODE_BLOK = '{$id}' "; ex_false($conn->execute($query), $query); // Create a new PHPWord Object $PHPWord = new PHPWord();
<th>BLOK NOMOR</th> <th>NOMOR SPP</th> <th>NAMA PEMBELI</th> <th>TANGGAL</th> <th>TIPE</th> <th>SPECS</th> </tr> '; $set_ttd = ' <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">' . $obj->fields['KOTA'] . ', ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $p = 1;
?> </td> <td class="text-center"><?php echo $id; ?> </td> <td><?php echo $obj->fields['NAMA_PEMBELI']; ?> </td> <td class="text-center"><?php echo kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SPP'])))); ?> </td> <td class="text-center"><?php echo kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_MEMO'])))); ?> </td> <td class="text-center"><?php echo to_money($obj->fields['NILAI_TRANSAKSI']); ?> </td> <td class="text-center"><?php echo to_money($obj->fields['TOTAL_PEMBAYARAN']); ?> </td> <td></td> </tr> <?php $i++; $obj->movenext();
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Daftar SPP Lunas Tahunan " . kontgl(date("d M Y", strtotime($periode_awal))) . " s/d " . kontgl(date("d M Y", strtotime($periode_akhir))); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename={$filename}.xls"); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
// die_app('C'); die_mod('C06'); $conn = conn($sess_db); die_conn($conn); if ($act == 'Detail') { $query = "\n\t\tSELECT NOMOR_MEMO, MAX(TANGGAL_MEMO) AS TGL_MEMO FROM\n\t\tCS_MEMO_PEMBATALAN\n\t\tWHERE NOMOR_MEMO = '{$id}'\n\t\tGROUP BY NOMOR_MEMO\n\t"; $obj = $conn->execute($query); $nomor_memo = $obj->fields['NOMOR_MEMO']; $tanggal_memo = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TGL_MEMO'])))); } if ($act == 'Ubah') { $query = "\n\t\tSELECT * FROM CS_MEMO_PEMBATALAN WHERE NOMOR_MEMO = '{$id}'\n\t"; $obj = $conn->execute($query); $nomor_memo = $obj->fields['NOMOR_MEMO']; $tanggal_memo = $obj->fields['TANGGAL_MEMO']; } if ($act == 'TambahMemo') { $query = "\n\t\tSELECT MAX(NOMOR_MEMO) AS NO_MEMO FROM CS_MEMO_PEMBATALAN\n\t"; $obj = $conn->execute($query); $kode_blok = ''; $nomor_memo = 1 + $obj->fields['NO_MEMO']; $tanggal_memo = kontgl(tgltgl(date("d M Y"))); $id = $nomor_memo; } if ($act == 'Tambah') { $query = "\n\t\tSELECT MAX(NOMOR_MEMO) AS NO_MEMO FROM CS_MEMO_PEMBATALAN\n\t"; $obj = $conn->execute($query); $kode_blok = ''; $tanggal_memo = kontgl(tgltgl(date("d M Y"))); $id = $nomor_memo; }
$query = "select STATUS_KOMPENSASI FROM SPP WHERE KODE_BLOK = '{$id}'"; $obj = $conn->execute($query); $status = $obj->fields['STATUS_KOMPENSASI']; $query = "select * from CS_REGISTER_CUSTOMER_SERVICE"; $obj = $conn->execute($query); if ($status == 2) { $no = 1 + $obj->fields['NOMOR_SURAT_TUNAI']; $reg = $obj->fields['REG_SURAT_TUNAI']; } else { if ($status == 1) { $no = 1 + $obj->fields['NOMOR_SURAT_KPR']; $reg = $obj->fields['REG_SURAT_KPR']; } } $nomor_surat = $no . $reg; $tanggal_cetak = kontgl(tgltgl(date("d M Y"))); $kode_blok = $id; $query = "select * from CS_PARAMETER_COL"; $obj = $conn->execute($query); $nama_pejabat = $obj->fields['NAMA_PEJABAT']; $nama_jabatan = $obj->fields['NAMA_JABATAN']; $nama_pt = $obj->fields['NAMA_PT']; $pecah_tanggal = explode("-", $tanggal_tempo); $tgl = $pecah_tanggal[0]; $bln = $pecah_tanggal[1]; $thn = $pecah_tanggal[2]; if ($bln + 1 > 12) { $next_bln = $bln % 12; $next_thn = $thn + 1; } else { $next_bln = $bln + 1;
} /* Pagination */ $query = "\nSELECT \n\tCOUNT(KODE_BLOK) AS TOTAL\nFROM \n\tRESERVE\n{$query_search}\n"; $total_data = $conn->execute($query)->fields['TOTAL']; $i = 1; $filename = "LAPORAN RESERVE.xls"; header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename=\"" . basename($filename) . "\""); header("Pragma: no-cache"); header("Expires: 0"); /* End Pagination */ ?> <h1>LAPORAN RESERVE</h1> <?php echo '<h2>Periode ' . kontgl(date("d M Y", strtotime($periode_awal))) . ' s/d ' . kontgl(date("d M Y", strtotime($periode_akhir))) . '</h2>'; ?> <table border="1"> <tr> <thead> <th>KODE BLOK</th> <th>NAMA CALON PEMBELI</th> <th>TANGGAL RESERVE</th> <th>BERLAKU SAMPAI</th> <th>ALAMAT</th> <th>TELEPON</th> <th>AGEN</th> <th>KOORDINATOR</th> </thead> </tr>
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Akutansi Periode " . kontgl(date("d M Y", strtotime($periode_awal))) . " s.d " . kontgl(date("d M Y", strtotime($periode_akhir)) . '.xls'); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename=\"" . basename($filename) . "\""); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Penerimaan Angsuran Periode " . kontgl(date("d M Y", strtotime($periode_awal))) . " s.d " . kontgl(date("d M Y", strtotime($periode_akhir)) . '.xls'); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename=\"" . basename($filename) . "\""); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Penerimaan Lain-lain Periode " . kontgl(date("d M Y", strtotime($periode_awal))) . " s/d " . kontgl(date("d M Y", strtotime($periode_akhir))); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename={$filename}.xls"); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Rencana Realisasi Seluruh Blok " . kontgl(date("d M Y", strtotime($periode_awal))) . " s/d " . kontgl(date("d M Y", strtotime($periode_akhir))); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename={$filename}.xls"); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
<td colspan="3" class="nb text-center">' . 'Tangerang, ' . kontgl(date('d M Y')) . '</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">Mengetahui,</td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center"><br><br><br><br></td> </tr> <tr> <td colspan="7" class="nb text-center"></td> <td colspan="3" class="nb text-center">(------------------)</td> </tr> '; $filename = "Laporan Daftar Pembebasan Denda " . kontgl(date("d M Y", strtotime($periode_awal))) . " s/d " . kontgl(date("d M Y", strtotime($periode_akhir))); header("Content-type: application/msexcel"); header("Content-Disposition: attachment; filename={$filename}.xls"); header("Pragma: no-cache"); header("Expires: 0"); $p = 1; function th_print() { global $p, $set_jrp, $set_th; echo $set_jrp . $p . $set_th; $p++; } ?> <!DOCTYPE html> <html>
require_once '../../../../../config/config.php'; require_once '../../../../../config/terbilang.php'; die_login(); //die_app(''); //die_mod(''); $conn = conn($sess_db); die_conn($conn); $terbilang = new Terbilang(); $id = isset($_REQUEST['id']) ? base64_decode(clean($_REQUEST['id'])) : ''; $catatan_kwt = isset($_REQUEST['catatan_kwt']) ? clean($_REQUEST['catatan_kwt']) : ''; $query = "\n\tSELECT * \n\tFROM KWITANSI_LAIN_LAIN\n\tWHERE NOMOR_KWITANSI = '{$id}'\n"; $obj = $conn->execute($query); $nama_pembayar = $obj->fields['NAMA_PEMBAYAR']; $keterangan = $obj->fields['KETERANGAN']; $nilai = $obj->fields['NILAI']; $tanggal = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL'])))); $query = "\n\t\tUPDATE KWITANSI_LAIN_LAIN SET \n\t\t\tSTATUS_KWT = '1',\n\t\t\tCATATAN_KWT = '{$catatan_kwt}'\n\t\tWHERE NOMOR_KWITANSI = '{$id}'\n\t\t"; ex_false($conn->Execute($query), $query); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> @page { size: A4; margin: 0; } @media screen, print{ body {
echo json_encode($json); exit; } die_login(); // die_app('C'); die_mod('C03'); $conn = conn($sess_db); die_conn($conn); if ($act == 'Detail') { $query = "\n\tSELECT *\n\tFROM\n\t\tSPP a \n\t\tLEFT JOIN STOK b ON a.KODE_BLOK = b.KODE_BLOK\n\t\tLEFT JOIN TIPE c ON b.KODE_TIPE = c.KODE_TIPE\n\t\tLEFT JOIN HARGA_TANAH d ON b.KODE_SK_TANAH = d.KODE_SK\n\t\tLEFT JOIN HARGA_BANGUNAN e ON b.KODE_SK_BANGUNAN = e.KODE_SK\n\t\tLEFT JOIN FAKTOR f ON b.KODE_FAKTOR = f.KODE_FAKTOR\n\tWHERE \n\t\ta.KODE_BLOK = '{$id}'"; $obj = $conn->execute($query); $kode_blok = $obj->fields['KODE_BLOK']; $nama_pembeli = $obj->fields['NAMA_PEMBELI']; $alamat = $obj->fields['ALAMAT_RUMAH']; $tlp1 = $obj->fields['TELP_RUMAH']; $tanggal_spp = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SPP'])))); $no_identitas = $obj->fields['NO_IDENTITAS']; $npwp = $obj->fields['NPWP']; $luas_tanah = $obj->fields['LUAS_TANAH']; $luas_bangunan = $obj->fields['LUAS_BANGUNAN']; $nomor_customer = $obj->fields['NOMOR_CUSTOMER']; $tanah = $luas_tanah * $obj->fields['HARGA_TANAH']; $disc_tanah = round($tanah * $obj->fields['DISC_TANAH'] / 100, 0); $nilai_tambah = round(($tanah - $disc_tanah) * $obj->fields['NILAI_TAMBAH'] / 100, 0); $nilai_kurang = round(($tanah - $disc_tanah) * $obj->fields['NILAI_KURANG'] / 100, 0); $faktor = $nilai_tambah - $nilai_kurang; $total_tanah = $tanah - $disc_tanah + $faktor; $ppn_tanah = round($total_tanah * $obj->fields['PPN_TANAH'] / 100, 0); $bangunan = $luas_bangunan * $obj->fields['HARGA_BANGUNAN']; $disc_bangunan = round($bangunan * $obj->fields['DISC_BANGUNAN'] / 100, 0); $total_bangunan = $bangunan - $disc_bangunan;
$tanggal_surat = substr($tanggal_tempo, 0, 10); $pecah_tanggal = explode("-", $tanggal_surat); $thn = $pecah_tanggal[0]; $bln = $pecah_tanggal[1]; $tgl = $pecah_tanggal[2]; if ($bln + 1 > 12) { $next_bln = $bln % 12; $next_thn = $thn + 1; } else { $next_bln = $bln + 1; $next_thn = $thn; } $query = "SELECT * FROM RENCANA WHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; $obj = $conn->execute($query); $nomor_surat_dahulu = $obj->fields['NO_SURAT3']; $tanggal_surat_dahulu = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT3'])))); if ($status == 2) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_TUNAI = NOMOR_SURAT_TUNAI + 1"; ex_false($conn->execute($query), $query); } else { if ($status == 1) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_KPR = NOMOR_SURAT_KPR + 1"; ex_false($conn->execute($query), $query); } } $query = "update RENCANA set NO_SURAT4 = '{$nomor_surat}', TANGGAL_SURAT4 = CONVERT(DATETIME,GETDATE(),105) \n\t\t\tWHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; ex_false($conn->execute($query), $query); // Create a new PHPWord Object $PHPWord = new PHPWord(); $document = $PHPWord->loadTemplate('../../../../../surat/Surat_Somasi_3.docx'); //header
?> </td> <td class="text-center"><?php echo number_format($total_harga); ?> </td> <td class="text-center"><?php echo number_format($total_ppn); ?> </td> <td class="text-center"><?php echo number_format($uang_pesanan); ?> </td> <td class="text-center"><?php echo kontgl(tgltgl(date("d M Y", strtotime($tgl_rencana)))); ?> </td> <td class="text-center"><?php echo number_format($nilai); ?> </td> </tr> <?php if ($i % $per_page === 0) { echo '<tr><td class="nb"><div class="newpage"></div></td></tr>'; th_print(); } $i++; $obj->movenext(); }
$tanggal_surat = substr($tanggal_tempo, 0, 10); $pecah_tanggal = explode("-", $tanggal_surat); $thn = $pecah_tanggal[0]; $bln = $pecah_tanggal[1]; $tgl = $pecah_tanggal[2]; if ($bln + 1 > 12) { $next_bln = $bln % 12; $next_thn = $thn + 1; } else { $next_bln = $bln + 1; $next_thn = $thn; } $query = "SELECT * FROM RENCANA WHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; $obj = $conn->execute($query); $no_wanprestasi = $obj->fields['NO_SURAT5']; $tgl_wanprestasi = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT5'])))); if ($status == 2) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_TUNAI = NOMOR_SURAT_TUNAI + 1"; ex_false($conn->execute($query), $query); } else { if ($status == 1) { $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_KPR = NOMOR_SURAT_KPR + 1"; ex_false($conn->execute($query), $query); } } $query = "update RENCANA set NO_SURAT4 = '{$nomor_surat}', TANGGAL_SURAT4 = CONVERT(DATETIME,GETDATE(),105) \n\t\t\tWHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)"; ex_false($conn->execute($query), $query); // Create a new PHPWord Object $PHPWord = new PHPWord(); $document = $PHPWord->loadTemplate('../../../../../surat/Surat_Pembatalan.docx'); //header