コード例 #1
0
function BuatIsinya($kwi, $gels, $p)
{
    include_once "../terbilang.php";
    $terbilang = ucwords(SpellNumberID($kwi['Jumlah'])) . ' Rupiah';
    $mrg = 30;
    $t = 5;
    $k = 71;
    $k2 = 43;
    $p->SetFont('Helvetica', '', 10);
    // Baris 1 - No. Kwitansi
    $p->Ln(2);
    $p->Cell($mrg);
    $p->Cell(30, $t, '', 0, 0);
    $p->Cell(103, $t, $kwi['PMBFormJualID'], 0, 1, 'R');
    $p->Ln(6);
    // Baris 2 - Nama
    $p->Cell($mrg);
    $p->Cell($k2, $t, '', 0, 0);
    $p->Cell($k, $t, $kwi['Nama'], 0, 1);
    // Baris 3 -  Terbilang
    $p->Cell($mrg);
    $p->Cell($k2, $t, '', 0, 0);
    $p->Cell($k, $t, $terbilang, 0, 1);
    // Baris 4 - Untuk pembayaran
    $p->Cell($mrg);
    $p->Cell($k2, $t, '', 0, 0);
    $p->Cell($k, $t, 'Pembelian formulir PMB  ' . $gels['Nama'], 0, 1);
    // Baris 5 - Program Studi
    $nilai = '';
    $arr = explode(',', $kwi['ProdiID']);
    foreach ($arr as $isi) {
        $NamaProdi = GetaField('prodi', 'ProdiID', $isi, 'Nama');
        $nilai .= $NamaProdi . ',';
    }
    $nilai = substr($nilai, 0, -1);
    $p->Cell($mrg);
    $p->Cell($k2, $t, '', 0, 0);
    $p->Cell($k, $t, $nilai, 0, 1);
    // Baris 6 - Gelombang & Nomor Aplikan
    $p->Cell($mrg);
    $p->Cell($k2 + 2, $t, '', 0, 0);
    $p->Cell($k, $t, $gels['PMBPeriodID'], 0, 0);
    $p->Cell(0, $t, $kwi['AplikanID'], 0, 1);
    // Baris 7 - Rupiahnya & Tanggal Cetak Kwitansi
    $current_date = date('Y-m-d');
    $p->Cell($mrg);
    $p->Cell($k2 + 8, $t, '', 0, 0);
    $p->Cell($k - 15, $t, $kwi['Jumlah'], 0, 0);
    $p->Cell(0, $t, GetaField('identitas', 'Kode', KodeID, 'Kota') . ', ' . $current_date, 0, 1);
}
コード例 #2
0
     } else {
         $whr = "and bm.MhswID='{$mhsw['MhswID']}' ";
     }
     $s1 = "select bm.*, \r\n    format(bm.Besar, 0) as BSR,\r\n    format(bm.Besar*bm.Jumlah, 0) as TOT,\r\n    format(bm.Besar*bm.Jumlah - bm.Dibayar, 0) as KRG,\r\n    bn.Nama\r\n    from bipotmhsw bm\r\n      left outer join bipot2 b2 on bm.BIPOT2ID=b2.BIPOT2ID\r\n      left outer join bipotnama bn on bm.BIPOTNamaID=bn.BIPOTNamaID\r\n    where bm.PMBMhswID='{$pmbmhswid}'\r\n      and bm.TahunID='{$khs['TahunID']}'\r\n      and bm.TrxID=1 and bn.RekeningID='{$rekid}'\r\n      and (bm.Besar*bm.Jumlah - bm.Dibayar)>0\r\n      {$whr}\r\n    order by bn.Baris";
     $r1 = _query($s1);
     $isi .= $mrg . "No." . str_pad('Deskripsi', 30, ' ') . "Jml   " . str_pad('Besar', 12, ' ', STR_PAD_LEFT) . '   ' . str_pad('Total', 12, ' ', STR_PAD_LEFT) . str_pad('Kekurangan', 12, ' ', STR_PAD_LEFT) . $_lf . $mrg . str_pad('-', 78, '-') . $_lf;
     while ($w1 = _fetch_array($r1)) {
         $nmr++;
         $jml += $w1['Jumlah'] * $w1['Besar'];
         $krg += $w1['Jumlah'] * $w1['Besar'] - $w1['Dibayar'];
         $isi .= $mrg . str_pad($nmr, 3, ' ') . str_pad($w1['Nama'], 30, ' ') . str_pad($w1['Jumlah'], 3, ' ', STR_PAD_LEFT) . ' x ' . str_pad($w1['BSR'], 12, ' ', STR_PAD_LEFT) . ' = ' . str_pad($w1['TOT'], 12, ' ', STR_PAD_LEFT) . str_pad($w1['KRG'], 12, ' ', STR_PAD_LEFT) . $_lf . $_lf;
     }
     $isi .= $mrg . str_pad('-', 78, '-') . $_lf;
     $tot = number_format($krg);
     $isi .= $mrg . str_pad(' ', 54, ' ') . str_pad($tot, 24, ' ', STR_PAD_LEFT) . $_lf . $_lf . $_lf;
     $isi .= $mrg . SpellNumberID($krg) . ' rupiah' . $_lf;
 }
 // Buat Tujuan
 $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
 $f = fopen($nmf, 'w');
 fwrite($f, $isi);
 fwrite($f, chr(12));
 fclose($f);
 /*
 // Download
 header("---DwnLdDt");
 header("Content-Length: ".filesize($nmf));
 header("Content-type: application/dwoprn");
 header("Content-Disposition: attachment; filename=\"$nmf\"");
 header("Content-ID: $nmf");
 header("Content-Description: Download Data");
コード例 #3
0
function CetakTrxAmbil($BPMID, $bal, $Keterangan, $Rep)
{
    global $_lf;
    //include "terbilang.php";
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $maxcol = 80;
    //$div = str_pad('-',$maxcol,'-').$_;
    $f = fopen($nmf, 'w');
    $Nama = GetaField("mhsw", 'MhswID', $_SESSION['mhswid'], 'Nama');
    $_bal = Number_format($bal);
    fwrite($f, chr(27) . chr(18) . chr(27) . chr(108) . chr(0));
    fwrite($f, str_pad("BUKTI KELEBIHAN PEMBAYARAN", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf);
    fwrite($f, str_pad("SEMESTER : " . NamaTahun($_SESSION['tahun']), $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf);
    $isi = str_pad('NIM          : ' . $_SESSION['mhswid'], 50, ' ') . $_lf . $_lf . str_pad('NAMA         : ' . $Nama, 50, ' ') . $_lf . $_lf . str_pad('JUMLAH       : Rp. ' . $_bal, 50, ' ') . $_lf . $_lf . str_pad('TERBILANG    : ' . SpellNumberID($bal) . "Rupiah", 50, ' ') . $_lf . $_lf . str_pad('KETERANGAN   : ' . $Keterangan, 60, ' ') . $_lf . $_lf . str_pad('Jakarta, ' . date("d-m-Y"), 50, ' ') . $_lf . $_lf . str_pad('Bagian Keuangan,', 50, ' ') . $_lf . $_lf . $_lf . $_lf . $_lf . $_lf . $_lf;
    fwrite($f, $isi);
    fwrite($f, "Dicetak Oleh : " . $_SESSION['_Login']);
    //fwrite($f, $div);
    fwrite($f, chr(12));
    fclose($f);
    echo "<iframe src='dwoprn.php?f={$nmf}' height=0 width=0 frameborder=0>\r\n    </iframe>";
}