m.rek3,	
									m.nama modul,
									m.replid idmodul
								FROM
									keu_modulpembayaran m
									LEFT JOIN keu_katmodulpembayaran k ON k.replid = m.katmodulpembayaran
									LEFT JOIN keu_pembayaran p ON p.modul = m.replid
								WHERE
									m.angkatan = ' . $ang . ' AND 
									k.nama = "spp"';
                    // var_dump($s2);exit();
                    $e2 = mysql_query($s2);
                    // var_dump($s2);exit();
                    $r2 = mysql_fetch_assoc($e2);
                    $stat = $e2 ? 'sukses' : 'gagal';
                    $out = json_encode(array('status' => $stat, 'datax' => array('nis' => getSiswaBy('nis', $sis), 'idsiswa' => $sis, 'siswa' => getSiswaBy('nama', $sis), 'nomer' => getNoTrans($_POST['subaksi']), 'tanggal' => tgl_indo5(date('Y-m-d')), 'rekkas' => $r2['rek1'], 'rekitem' => $r2['rek2'], 'rek1' => getRekening($r2['rek1']), 'rek2' => getRekening($r2['rek2']), 'rek3' => getRekening($r2['rek3']), 'modul' => $r2['modul'], 'idmodul' => $r2['idmodul'], 'status' => getStatusBayar('spp', $_POST['replid']), 'nominal' => 'Rp. ' . number_format(getBiaya('spp', $sis)))));
                    break;
            }
            break;
            // ambiledit ------------------------------------------------------------------
            // generate barcode -----------------------------------------------------------
        // ambiledit ------------------------------------------------------------------
        // generate barcode -----------------------------------------------------------
        case 'kodegenerate':
            $s = 'SELECT
						tb1.lokasi,
						tb1.grup,
						tb1.tempat,
						tb1.katalog,
						tb2.barang,
						LPAD(tb2.barang,5,0)barkode	
Beispiel #2
0
                   WHERE transaksi =' . $r['replid'] . '
                   ORDER BY jenisrekening ASC ';
         $e2 = mysql_query($s2);
         $tb2 = '';
         if (mysql_num_rows($e2) != 0) {
             $tb2 .= '<table class="isi" width="100%">
                       <tr class="head">
                         <td width="60%">Rekening</td>
                         <td width="20%">Debit</td>
                         <td width="20%">Kredit</td>
                       </tr>';
             while ($r2 = mysql_fetch_assoc($e2)) {
                 $debit = $r2['jenisrekening'] == 'd' ? setuang($r2['nominal']) : '-';
                 $kredit = $r2['jenisrekening'] == 'k' ? setuang($r2['nominal']) : '-';
                 $tb2 .= '<tr>
                         <td width="60%">' . getRekening($r2['detilrekening']) . '</td>
                         <td width="20%" align="right">' . $debit . '</td>
                         <td width="20%" align="right">' . $kredit . '</td>
                       </tr>';
             }
             $tb2 .= '</table>';
         }
         $out .= '<tr>
                 <td width="12%" valign="top">' . tgl_indo5($r['tanggal']) . '</td>
                 <td  width="18%" valign="top" style="font-weight:bold;">' . getNoKwitansi($r['replid']) . '<br>' . $r['nobukti'] . '</td>
                 <td  width="15%" valign="top">' . $r['uraian'] . '</td>
                 <td width="55%">' . $tb2 . '</td>
               </tr>';
     }
 } else {
     #kosong
Beispiel #3
0
            while ($r2 = mysql_fetch_assoc($e2)) {
                if ($jTrans == 'ju') {
                    $debit = $r2['jenis'] == 'd' ? $r2['nominal'] : 0;
                    $kredit = $r2['jenis'] == 'k' ? $r2['nominal'] : 0;
                } else {
                    if ($jTrans == 'out') {
                        $debit = $r2['rek'] == $r1['rekitem'] ? $r1['nominal'] : 0;
                        $kredit = $r2['rek'] == $r1['rekkas'] ? $r1['nominal'] : 0;
                    } else {
                        // in
                        $debit = $r2['rek'] == $r1['rekkas'] ? $r1['nominal'] : 0;
                        $kredit = $r2['rek'] == $r1['rekitem'] ? $r1['nominal'] : 0;
                    }
                }
                $tb2 .= '<tr>
                              <td width="60%" >' . getRekening($r2['rek']) . '</td>
                              <td width="20%" align="right" >Rp. ' . number_format($debit) . ',-</td>
                              <td width="20%" align="right" >Rp. ' . number_format($kredit) . ',-</td>
                            </tr>';
            }
            $tb2 .= '</table>';
        }
        $out .= '<tr>
                      <td>' . tgl_indo($r1['tanggal']) . '</td>
                      <td>' . $r1['nomer'] . '<br>' . getDetJenisTrans2($r1['replid']) . '<br>' . $r1['nobukti'] . '</td>
                      <td>' . $r1['uraian'] . '</td>
                      <td>' . $tb2 . '</td>
                    </tr>';
    }
}
$out .= '</table>';
Beispiel #4
0
                     <td align="center">Nama Kategori</td>
                     <td align="center">Rekening</td>
                     <td align="center">Keterangan</td>
                   </tr>';
                   $nox = 1;
                   if($n==0){
                     $out.='<tr>
                       <td>-</td>
                       <td>-</td>
                       <td>-</td>
                     </tr>';
                   }else{
                     while ($r=mysql_fetch_assoc($e)) {
                       $out.='<tr>
                                 <td>'.$r['nama'].'</td>
                                 <td>'.getRekening($r['rekening']).'</td>
                                 <td>'.$r['keterangan'].'</td>
                           </tr>';
                       $nox++;
                     }
                   }
           $out.='</table>';
           // $out.='<p>Total : '.$n.'</p>';
         echo $out;
 
       #generate html -> PDF ------------
         $out2 = ob_get_contents();
         ob_end_clean(); 
         $mpdf=new mPDF('c','A4','');   
         $mpdf->SetDisplayMode('fullpage');   
         $stylesheet = file_get_contents('../../lib/mpdf/r_cetak.css');
Beispiel #5
0
                 $debit2 = $r1['nominal'];
                 $kredit2 = 0;
             } else {
                 // in
                 $debit1 = $r1['nominal'];
                 $kredit1 = 0;
                 $debit2 = 0;
                 $kredit2 = $r1['nominal'];
             }
         }
         $out .= '<tr>
               <td>' . getRekening($r1['rekkas']) . '</td>
               <td align="right">Rp. ' . number_format($debit1) . '</td>
               <td align="right">Rp. ' . number_format($kredit1) . '</td>
         </tr><tr>
               <td>' . getRekening($r1['rekitem']) . '</td>
               <td align="right">Rp. ' . number_format($debit2) . '</td>
               <td align="right">Rp. ' . number_format($kredit2) . '</td>
         </tr>';
         $out .= '<tr class="head">
       <td ></td>
       <td colspan="2" align="center">Rp. ' . number_format($r1['nominal']) . '</td>
     </tr>';
         $out .= '</table><br>';
     }
     // end of detail table
 }
 $out .= '</body>';
 echo $out;
 #generate html -> PDF ------------
 $out2 = ob_get_contents();
Beispiel #6
0
										SELECT replid from keu_jurnal WHERE transaksi = t.replid and jenisrekening="k"
									)idjurnal
								FROM keu_transaksi t
								WHERE t.replid =' . $_POST['replid'];
                    // pr($s);
                    $e = mysql_query($s);
                    $r = mysql_fetch_assoc($e);
                    $stat = $e ? 'sukses' : 'gagal';
                    if (!$e) {
                        $stat = 'gagal';
                    } else {
                        //sukses
                        $stat = 'sukses';
                        $kodekas = getField('kode', 'keu_detilrekening', 'replid', $r['idrekkas']);
                        $namakas = getField('nama', 'keu_detilrekening', 'replid', $r['idrekkas']);
                        $transaksiArr = array('nomer' => getNoKwitansi($_POST['replid']), 'nobukti' => $r['nobukti'], 'tanggal' => tgl_indo7($r['tanggal']), 'idrekkas' => $r['idrekkas'], 'rekkas' => $kodekas . ' - ' . $namakas, 'saldokas' => setuang(getSaldoRekeningSkrg($r['idrekkas'])), 'detjenistransaksi' => $r['detjenistransaksi'], 'income' => array('departemen' => $r['departemen'], 'tingkat' => $r['tingkat'], 'idjurnal' => $r['idjurnal'], 'idrekitem' => $r['idrekitem'], 'rekitem' => getRekening($r['idrekitem']), 'rekitemsaldo' => setuang(getSaldoRekeningSkrg($r['idrekitem'])), 'nominal' => setuang($r['nominal']), 'uraian' => $r['uraian']));
                    }
                    $out = json_encode(array('status' => $stat, 'transaksiArr' => $transaksiArr));
                    break;
                case 'ju':
                    $s = 'SELECT * FROM ' . $tb . '  WHERE replid=' . $_POST['replid'];
                    // var_dump($s);exit();
                    $e = mysql_query($s);
                    $r = mysql_fetch_assoc($e);
                    $stat = $e ? 'sukses' : 'gagal';
                    if (!$e) {
                        $stat = 'gagal';
                    } else {
                        //sukses
                        $s2 = '	SELECT 
										j.replid,
								j.replid idjurnal 
							  FROM ' . $tb . ' t 
							  	LEFT JOIN keu_jurnal j on j.transaksi = t.replid
							  WHERE
							  	t.replid =' . $_POST['replid'] . ' AND
							  	j.jenis ="d"';
                    // var_dump($s);exit();
                    $e = mysql_query($s);
                    $r = mysql_fetch_assoc($e);
                    $stat = $e ? 'sukses' : 'gagal';
                    if (!$e) {
                        $stat = 'gagal';
                    } else {
                        //sukses
                        $stat = 'sukses';
                        $transaksiArr = array('nomer' => $r['nomer'], 'nobukti' => $r['nobukti'], 'tanggal' => tgl_indo7($r['tanggal']), 'idrekkas' => $r['rekkas'], 'rekkas' => getRekening($r['rekkas']), 'income' => array('idjurnal' => $r['idjurnal'], 'idrekitem' => $r['rekitem'], 'rekitem' => getRekening($r['rekitem']), 'nominal' => setuang($r['nominal']), 'uraian' => $r['uraian']));
                    }
                    $out = json_encode(array('status' => $stat, 'transaksiArr' => $transaksiArr));
                    break;
                case 'ju':
                    $s = 'SELECT * FROM ' . $tb . '  WHERE replid=' . $_POST['replid'];
                    // var_dump($s);exit();
                    $e = mysql_query($s);
                    $r = mysql_fetch_assoc($e);
                    $stat = $e ? 'sukses' : 'gagal';
                    if (!$e) {
                        $stat = 'gagal';
                    } else {
                        //sukses
                        $s2 = 'SELECT * FROM keu_jurnal WHERE transaksi =' . $_POST['replid'] . ' ORDER BY jenis ASC';
                        $e2 = mysql_query($s2);
							s.tahunajaran,
							m.angkatan,
							m.bulan,
							m.katmodulpembayaran,
							s.semester,
							t.departemen
						FROM ' . $tb . ' m 
							LEFT JOIN keu_katmodulpembayaran k on k.replid = m.katmodulpembayaran
							LEFT JOIN aka_semester s on s.replid = m.semester
							LEFT JOIN aka_tahunajaran t on t.replid = s.tahunajaran
						WHERE 
							m.replid =' . $_POST['replid'];
            $e = mysql_query($s);
            $r = mysql_fetch_assoc($e);
            // var_dump($r);exit();
            $out = json_encode(array('katmodulpembayaran' => $r['katmodulpembayaran'], 'departemen' => $r['departemen'], 'angkatan' => $r['angkatan'], 'tahunajaran' => $r['tahunajaran'], 'semester' => $r['semester'], 'bulan' => $r['bulan'], 'idrek1' => $r['rek1'], 'idrek2' => $r['rek2'], 'idrek3' => $r['rek3'], 'rek1' => getRekening($r['rek1']), 'rek2' => getRekening($r['rek2']), 'rek3' => getRekening($r['rek3']), 'keterangan' => $r['keterangan']));
            break;
            // ambiledit -----------------------------------------------------------------
            // cmbkategorirek -----------------------------------------------------------------
        // ambiledit -----------------------------------------------------------------
        // cmbkategorirek -----------------------------------------------------------------
        case 'cmbkategorirek':
            $w = '';
            if (isset($_POST['replid'])) {
                $w = 'where replid =' . $_POST['replid'];
            } else {
                if (isset($_POST[$mnu])) {
                    $w = 'where ' . $mnu . '=' . $_POST[$mnu];
                }
            }
            $s = ' SELECT *
Beispiel #9
0
         $out .= '<table class="isi" width="100%">
                 <tr class="head">
                   <td align="center">Rekening</td>
                   <td align="center">Debit</td>
                   <td align="center">Kredit</td>
                 </tr>';
         $s2 = 'SELECT * FROM keu_jurnal WHERE transaksi =' . $r1['replid'] . ' ORDER BY jenisrekening ASC';
         $e2 = mysql_query($s2);
         $debitTot = $krditTot = 0;
         while ($r2 = mysql_fetch_assoc($e2)) {
             $debit = $r2['jenisrekening'] == 'd' ? $r2['nominal'] : 0;
             $kredit = $r2['jenisrekening'] == 'k' ? $r2['nominal'] : 0;
             $debitTot += $debit;
             $kreditTot += $kredit;
             $out .= '<tr>
                     <td>' . getRekening($r2['detilrekening']) . '</td>
                     <td align="right">' . setuang($debit) . '</td>
                     <td align="right">' . setuang($kredit) . '</td>
               </tr>';
         }
         $out .= '<tr class="head">
           <td></td>
           <td align="right">' . setuang($debitTot) . '</td>
           <td align="right">' . setuang($kreditTot) . '</td>
         </tr>';
         $out .= '</table><br>';
     }
     // end of detail table
 }
 $out .= '</body>';
 echo $out;
Beispiel #10
0
             ORDER BY 
               jenis ASC';
         $e2 = mysql_query($s2);
         $tb2 = '';
         if (mysql_num_rows($e2) != 0) {
             $tb2 .= '<table class="isi" width="100%">
                 <tr class="head">
                   <td width="60%">Rekening</td>
                   <td width="20%">Debit</td>
                   <td width="20%">Kredit</td>
                 </tr>';
             while ($r2 = mysql_fetch_assoc($e2)) {
                 $debit = $r2['rek'] == $r['rekkas'] ? $r['nominal'] : 0;
                 $kredit = $r2['rek'] == $r['rekitem'] ? $r['nominal'] : 0;
                 $tb2 .= '<tr>
                   <td>' . getRekening($r2['rek']) . '</td>
                   <td align="right">Rp. ' . number_format($debit) . ',-</td>
                   <td align="right">Rp. ' . number_format($kredit) . ',-</td>
                 </tr>';
             }
             $tb2 .= '</table>';
         }
         $out .= '<tr>
               <td width="10%" valign="top">' . tgl_indo7($r['tanggal']) . '</td>
               <td valign="top" width="15%">' . $r['nomer'] . '<br>' . getDetJenisTrans2($r['replid']) . '<br>' . $r['nobukti'] . '</td>
               <td valign="top" width="30%">' . $r['uraian'] . '</td>
               <td width="40%" valign="top">' . $tb2 . '</td>
             </tr>';
     }
 }
 $out .= '</table>';