Beispiel #1
0
function BayarEdt1()
{
    $pmbid = $_REQUEST['pmbid'];
    $pmb = GetFields('pmb p left outer join
    program prg on p.ProgramID=prg.ProgramID
    left outer join prodi prd on p.ProdiID=prd.ProdiID', 'p.PMBID', $pmbid, "p.*, prg.Nama as PRG, prd.Nama as PRD");
    echo HeaderCAMA($pmb);
    $md = $_REQUEST['md'] + 0;
    //$kurang = $pmb['TotalBiayaMhsw'] - $pmb['TotalBayarMhsw'];
    $CicilanID = $_REQUEST['CicilanID'] + 0;
    if ($CicilanID > 0) {
        $Cicilan = GetFields('cicilanmhsw', 'CicilanID', $CicilanID, "*, format(Jumlah, 0) as JML");
    }
    $kurang = $Cicilan['Jumlah'] + 0;
    $_kurang = number_format($kurang);
    if ($md == 0) {
        $w = GetFields('bayarmhsw', "BayarMhswID", $_REQUEST['BayarMhswID'], '*');
    } else {
        $w = array();
        $w['BuktiSetoran'] = '';
        $w['BayarMhswID'] = '';
        $w['TahunID'] = '0';
        $w['RekeningID'] = '';
        $w['MhswID'] = $pmb['PMBID'];
        $w['Tanggal'] = date('Y-m-d');
        $w['Jumlah'] = $CicilanID > 0 ? $Cicilan['Jumlah'] : 0;
        $w['CicilanID'] = $CicilanID;
        $w['Keterangan'] = '';
    }
    $Judul = $CicilanID > 0 ? "Pembayaran Cicilan" : "Pembayaran";
    $KeteranganCicilan = $CicilanID > 0 ? "<tr><td class=ul colspan=2>Anda akan melakukan pembayaran cicilan: <br />\r\n    Judul: <b>{$Cicilan['Judul']}</b><br />\r\n    Dengan jumlah: Rp. <b>{$Cicilan['JML']}</b>.</td></tr>" : '';
    $Tgl = GetDateOption($w['Tanggal'], 'Tanggal');
    $optrek = GetOption2('rekening', "concat(RekeningID, ' - ', Nama)", 'RekeningID', $w['RekeningID'], "KodeID='{$_SESSION['KodeID']}'", 'RekeningID');
    // Tampilkan Form Pembayaran
    ScriptCekKelebihan($kurang);
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n  <form action='?' method=POST onSubmit=\"return CekKelebihan(this);\">\r\n  <input type=hidden name='mnux' value='mhswbaru'>\r\n  <input type=hidden name='gos' value='ImprtPMB'>\r\n  <input type=hidden name='slnt' value='mhswbaru.sav'>\r\n  <input type=hidden name='slntx' value='BayarSav'>\r\n  <input type=hidden name='md' value='{$md}'>\r\n\r\n  <input type=hidden name='pmbid' value='{$pmb['PMBID']}'>\r\n  <input type=hidden name='trm' value='{$pmb['PMBID']}'>\r\n  <input type=hidden name='CicilanID' value='{$w['CicilanID']}'>\r\n  <input type=hidden name='BayarMhswID' value='{$w['BayarMhswID']}'>\r\n\r\n  <tr><th class=ttl colspan=2>{$Judul}</th></tr>\r\n  {$KeteranganCicilan}\r\n  {$strkurang}\r\n  <tr><td class=inp1>Dibayarkan ke rekening</td><td class=ul><select name='RekeningID'>{$optrek}</select></td></tr>\r\n  <tr><td class=inp1>Bukti Setoran</td><td class=ul><input type=text name='BuktiSetoran' value='{$w['BuktiSetoran']}' size=20 maxlength=50></td></tr>\r\n  <tr><td class=inp1>Tanggal Bayar</td><td class=ul>{$Tgl}</td></tr>\r\n  <tr><td class=inp1>Jumlah</td><td class=ul><input type=text name='Jumlah' value='{$w['Jumlah']}' size=20 maxlength=20></td></tr>\r\n  <tr><td class=inp1>Keterangan</td><td class=ul><input type=text name='Keterangan' value='{$w['Keterangan']}' size=50 maxlength=100></td></tr>\r\n  <tr><td colspan=2><input type=submit name='Simpan' value='Simpan'>\r\n    <input type=reset name='Reset' value='Reset'>\r\n    <input type=button name='Batal' value='Batal' onClick=\"location='?mnux=mhswbaru&gos=ImprtPMB&trm={$pmb['PMBID']}&pmbid={$pmb['PMBID']}'\"></td></tr>\r\n  </form></table></p>";
}
Beispiel #2
0
function BayarEdt()
{
    $mhswid = $_REQUEST['mhswid'];
    $md = $_REQUEST['md'] + 0;
    $khsid = $_REQUEST['khsid'];
    $khs = GetFields('khs', 'KHSID', $khsid, '*');
    $kurang = $khs['Biaya'] - $khs['Bayar'] + $khs['Tarik'] - $khs['Potongan'];
    if ($kurang != 0) {
        $_kurang = number_format($kurang);
        $strkurang = "<tr><td class=ul colspan=2>Kekurangan pembayaran dalam semester ini:<br />\r\n      Rp. <b>{$_kurang}</b></td></tr>";
    } else {
        $strkurang = '';
    }
    $CicilanID = $_REQUEST['CicilanID'] + 0;
    if ($CicilanID > 0) {
        $Cicilan = GetFields('cicilanmhsw', 'CicilanID', $CicilanID, "*, format(Jumlah, 0) as JML");
    }
    if ($md == 0) {
        $w = GetFields('bayarmhsw', 'BayarMhswID', $_REQUEST['BayarMhswID'], '*');
    } else {
        $w = array();
        $w['RekeningID'] = '';
        $w['BuktiSetoran'] = '';
        $w['BayarMhswID'] = 0;
        $w['TahunID'] = $khs['TahunID'];
        $w['MhswID'] = $mhsw['MhswID'];
        $w['Tanggal'] = date('Y-m-d');
        $w['Jumlah'] = $CicilanID > 0 ? $Cicilan['Jumlah'] : 0;
        $w['CicilanID'] = $CicilanID;
        $w['Keterangan'] = '';
    }
    $Judul = $CicilanID > 0 ? "Pembayaran Cicilan" : "Pembayaran";
    $KeteranganCicilan = $CicilanID > 0 ? "<tr><td class=ul colspan=2>Anda akan melakukan pembayaran cicilan: <br />\r\n    Judul: <b>{$Cicilan['Judul']}</b><br />\r\n    Dengan jumlah: Rp. <b>{$Cicilan['JML']}</b>.</td></tr>" : '';
    $Tgl = GetDateOption($w['Tanggal'], 'Tanggal');
    $optrek = GetOption2('rekening', "concat(RekeningID, ' - ', Nama)", "RekeningID", $w['RekeningID'], "KodeID='{$_SESSION['KodeID']}'", "RekeningID");
    // Tampilkan Form Pembayaran
    ScriptCekKelebihan($kurang);
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n  <form action='?' method=POST onSubmit=\"return CekKelebihan(this);\">\r\n  <input type=hidden name='mnux' value='{$_REQUEST['mnux']}'>\r\n  <input type=hidden name='gos' value='{$_REQUEST['gosto']}'>\r\n  <input type=hidden name='slnt' value='mhswkeu.sav'>\r\n  <input type=hidden name='slntx' value='BayarSav'>\r\n  <input type=hidden name='md' value='{$md}'>\r\n\r\n  <input type=hidden name='mhswid' value='{$mhswid}'>\r\n  <input type=hidden name='khsid' value='{$khs['KHSID']}'>\r\n  <input type=hidden name='CicilanID' value='{$w['CicilanID']}'>\r\n  <input type=hidden name='BayarMhswID' value='{$w['BayarMhswID']}'>\r\n\r\n  <tr><th class=ttl colspan=2>{$Judul}</th></tr>\r\n  {$KeteranganCicilan}\r\n  {$strkurang}\r\n  <tr><td class=inp1>Masuk ke Rekening</td><td class=ul><select name='RekeningID'>{$optrek}</select></td></tr>\r\n  <tr><td class=inp1>Bukti Setoran</td><td class=ul><input type=text name='BuktiSetoran' value='{$w['BuktiSetoran']}' size=20 maxlength=50></td></tr>\r\n  <tr><td class=inp1>Tanggal Setor Bank</td><td class=ul>{$Tgl}</td></tr>\r\n  <tr><td class=inp1>Jumlah</td><td class=ul><input type=text name='Jumlah' value='{$w['Jumlah']}' size=20 maxlength=20></td></tr>\r\n  <tr><td class=inp1>Keterangan</td><td class=ul><input type=text name='Keterangan' value='{$w['Keterangan']}' size=50 maxlength=200></td></tr>\r\n  <tr><td colspan=2><input type=submit name='Simpan' value='Simpan'>\r\n    <input type=reset name='Reset' value='Reset'>\r\n    <input type=button name='Batal' value='Batal' onClick=\"location='?mnux=mhswkeu.det&gos=MhswKeuSesi&mhswid={$mhsw['MhswID']}&khsid={$khs['KHSID']}'\"></td></tr>\r\n  </form></table></p>";
}