Exemplo n.º 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>";
}
Exemplo n.º 2
0
function ImprtPMB()
{
    $trm = $_REQUEST['trm'];
    $w = GetFields("pmb p\r\n    left outer join program prg on p.ProgramID=prg.ProgramID\r\n    left outer join prodi prd on p.ProdiID=prd.ProdiID", 'p.PMBID', $trm, 'p.*, prg.Nama as PRG, prd.Nama as PRD');
    if (empty($w['BIPOTID'])) {
        $w['BIPOTID'] = GetaField("bipot", "ProgramID='{$w['ProgramID']}' and ProdiID='{$w['ProdiID']}' and Def", 'Y', 'BIPOTID');
        // Simpan dulu ah...
        $s = "update pmb set BIPOTID='{$w['BIPOTID']}' where PMBID='{$w['PMBID']}' ";
        $r = _query($s);
    }
    echo HeaderCAMA($w);
    echo "<p><a href='#stp1'>Step 1</a> | <a href='#stp2a'>Step 2a</a> | <a href='#stp2b'>Step 2b</a> |\r\n    <a href='#stp3'>Step 3</a> &raquo; \r\n    <a href='?mnux=mhswbaru&gos=ImprtPMB&trm={$trm}'><b>Refresh</b></a>";
    // Cek BIPOT dulu
    CekBIPOT($w, $bpt);
    TampilkanBIPOTCAMA($w);
    TampilkanInstallment($w);
    TampilkanBayarCAMA($w);
    TampilkanBuatMhswID($w);
}
Exemplo n.º 3
0
<?php

// AUthor: Emanuel Setio Dewo
// Email: setio.dewo@gmail.com
// 06 Desember 2006
include_once "mhswbaru.lib.php";
// *** Parameters ***
$pmbid = GetSetVar('pmbid');
$pmb = GetFields("pmb p\r\n  left outer join program prg on p.ProgramID=prg.ProgramID\r\n  left outer join prodi prd on p.ProdiID=prd.ProdiID", 'p.PMBID', $pmbid, 'p.*, prg.Nama as PRG, prd.Nama as PRD');
if (empty($pmb)) {
    die(ErrorMsg("Data tidak Ditemukan", "Data Calon Mahasiswa dengan No PMB: <b>{$pmbid}</b> tidak ditemukan."));
}
// *** Main ***
TampilkanJudul("Diskon Mahasiswa Baru");
echo HeaderCAMA($pmb);
TampilkanModulDiskonCAMA($pmb);
if (!empty($_REQUEST['gos'])) {
    $_REQUEST['gos']($pmb);
}
// *** Functions ***
function TampilkanModulDiskonCAMA($pmb)
{
    TampilkanBIPOTCAMA1($pmb);
    TampilkanFormulirDiskon($pmb);
}
function TampilkanFormulirDiskon($pmb)
{
    JSHitungDiskon();
    CheckFormScript("Diskon,Besar");
    $optPot = GetOption2("bipotnama", "Nama", "Nama", 0, "TrxID=-1", "BIPOTNamaID");
    echo "<p><font size=+1>Formulir Diskon</font></p>";