本文整理汇总了PHP中Terbilang函数的典型用法代码示例。如果您正苦于以下问题:PHP Terbilang函数的具体用法?PHP Terbilang怎么用?PHP Terbilang使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Terbilang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CtkBukti
function CtkBukti()
{
global $_lf;
//include "terbilang.php";
$nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
$maxcol = 80;
//$div = str_pad('-',$maxcol,'-').$_;
$f = fopen($nmf, 'w');
$Periode = $_REQUEST['tahun'];
$PMBID = $_REQUEST['pmbid'];
$bal = $_REQUEST['biaya'];
$BYR = $_REQUEST['byr'];
$REG = $_REQUEST['regs'];
$_bal = number_format($bal);
$x = GetFields("pmb left outer join prodi on prodi.ProdiID = pmb.ProdiID", 'PMBID', $PMBID, 'pmb.Nama as NMHS, prodi.Nama as PRD');
fwrite($f, chr(27) . chr(18) . chr(27) . chr(108) . chr(0) . $_lf);
fwrite($f, str_pad("BUKTI PENGEMBALIAN PEMBAYARAN P.M.B.", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf);
fwrite($f, str_pad("PERIODE " . NamaTahunPMB($Periode), $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf);
$isi = str_pad('PMBID : ' . $PMBID, 50, ' ') . $_lf . $_lf . str_pad('NAMA : ' . $x['NMHS'], 50, ' ') . $_lf . $_lf . str_pad('PRODI : ' . $x['PRD'], 50, ' ') . $_lf . $_lf . str_pad('BIAYA YG SUDAH DIBAYAR : Rp. ' . number_format($BYR), 50, ' ') . $_lf . $_lf . str_pad('BIAYA ADMINISTRASI : Rp. ' . $REG, 50, ' ') . $_lf . $_lf . str_pad('NILAI YG DIKEMBALIKAN : Rp. ' . $_bal, 50, ' ') . $_lf . $_lf . str_pad('TERBILANG :' . ucwords(Terbilang($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>\n </iframe>";
}
示例2: Terbilang
function Terbilang($x)
{
$abil = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas");
if ($x < 12) {
return " " . $abil[$x];
} elseif ($x < 20) {
return Terbilang($x - 10) . "belas";
} elseif ($x < 100) {
return Terbilang($x / 10) . " puluh" . Terbilang($x % 10);
} elseif ($x < 200) {
return " seratus" . Terbilang($x - 100);
} elseif ($x < 1000) {
return Terbilang($x / 100) . " ratus" . Terbilang($x % 100);
} elseif ($x < 2000) {
return " seribu" . Terbilang($x - 1000);
} elseif ($x < 1000000) {
return Terbilang($x / 1000) . " ribu" . Terbilang($x % 1000);
} elseif ($x < 1000000000) {
return Terbilang($x / 1000000) . " juta" . Terbilang($x % 1000000);
}
}
示例3: Terbilang
function Terbilang($x)
{
$abil = array("", "Satu", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", "Delapan", "Sembilan", "Sepuluh", "Sebelas");
if ($x < 12) {
return " " . $abil[$x];
} elseif ($x < 20) {
return Terbilang($x - 10) . "Belas";
} elseif ($x < 100) {
return Terbilang($x / 10) . " Puluh" . Terbilang($x % 10);
} elseif ($x < 200) {
return " seratus" . Terbilang($x - 100);
} elseif ($x < 1000) {
return Terbilang($x / 100) . " Ratus" . Terbilang($x % 100);
} elseif ($x < 2000) {
return " seribu" . Terbilang($x - 1000);
} elseif ($x < 1000000) {
return Terbilang($x / 1000) . " Ribu" . Terbilang($x % 1000);
} elseif ($x < 1000000000) {
return Terbilang($x / 1000000) . " Juta" . Terbilang($x % 1000000);
}
}
示例4: Terbilang
function Terbilang($a)
{
$ambil = array("", "SATU", "DUA", "TIGA", "EMPAT", "LIMA", "ENAM", "TUJUH", "DELAPAN", "SEMBILAN", "SEPULUH", "SEBELAS");
if ($a < 12) {
return " " . $ambil[$a];
} elseif ($a < 20) {
return Terbilang($a - 10) . " BELAS";
} elseif ($a < 100) {
return Terbilang($a / 10) . " PULUH" . Terbilang($a % 10);
} elseif ($a < 200) {
return " SERATUS" . Terbilang($a - 100);
} elseif ($a < 1000) {
return Terbilang($a / 100) . " RATUS" . Terbilang($a % 100);
} elseif ($a < 2000) {
return " SERIBU" . Terbilang($a - 1000);
} elseif ($a < 1000000) {
return Terbilang($a / 1000) . " RIBU" . Terbilang($a % 1000);
} elseif ($a < 1000000000) {
return Terbilang($a / 1000000) . " JUTA" . Terbilang($a % 1000000);
}
}
示例5: kwitansiPenerimaanSiswa
$out .= $rd['alamat'] . '<br />Telp. ' . $rd['telepon'];
}
$out .= '</small>
<hr />
</td>
</tr>
<tr>
<td colspan="2" align="right">No. Kwitansi : ' . kwitansiPenerimaanSiswa($idpenerimaansiswa) . '</td>
</tr>
<tr>
<td>Sudah terima dari </td>
<td>: ' . $r['namasiswa'] . ' </td>
</tr>
<tr>
<td>Sebanyak </td>
<td>: ' . Terbilang($r['nominal']) . ' Rupiah </td>
</tr>
<tr>
<td>Untuk </td>
<td>: Pembayaran ' . $r['biaya'] . ' </td>
</tr>
<tr>
<td colspan="2" align="right">Surabaya, ' . tgl_indo8($r['tanggal']) . ' </td>
</tr>
<tr>
<td colspan="2" align="right">ttd </td>
</tr>
<tr>
<td>Terbilang </td>
<td>: ' . setuang($r['nominal']) . ' </td>
</tr>
示例6: formatDuit
if ($angla != 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Angsuran Lain</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($angla) . "</td>\n\t\t\t\t </TR>";
}
if ($telpri != 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Telepon Pribadi</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($telpri) . "</td>\n\t\t\t\t </TR>";
}
if ($pajak != 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Pajak</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($pajak) . "</td>\n\t\t\t\t </TR>";
}
if ($pribadi != 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Pribadi</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($pribadi) . "</td>\n\t\t\t\t </TR>";
}
if ($lain - $alpha > 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>{$ktg}</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($lain - $alpha) . "</td>\n\t\t\t\t </TR>";
}
if ($alpha != 0) {
echo "\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Kurang Jaga</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($alpha) . "</td>\n\t\t\t\t </TR>";
}
echo "<TR class='isi6'>\n <TD width='130px'> <i>Jumlah Potongan </i></TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px' align=right><i>" . formatDuit($jamsostek + $dansos + $simwajib + $angkop + $angla + $telpri + $pajak + $pribadi + $lain) . "</i></td>\n\t\t\t\t\t </TR> \n \n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> <i>TOTAL JM DITERIMA</i></TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px' align=right><font size='2px' face='Arial' color='777777'><i>" . formatDuit($ttlditerima) . "</i></font></td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px' colspan='3'> <i>" . Terbilang($ttlditerima) . "</i></td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'></TD><td></td><td><center>Yogyakarta, " . date('d-m-Y') . "</center> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>Penerima</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>Pengelola</center></td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>( {$baris['2']} )</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>( dr Lily T S Siagian )</center></td>\n\t\t\t\t </TR>\n\t\t\t\t </table>\n\t\t\t\t <center><font size='1px' face='Arial' color='777777'><i><b>..Terima kasih atas kerjasamanya <br>dalam memberikan pelayanan yang berkualitas..</b></i></font></center>\n\n <center><font face='Arial' size='3' color='777777'>Rincian Tindakan</font></center>";
$_sql30 = "select tindakan.tgl,tindakan.nm_pasien,tindakan.kamar,master_tindakan.nama\n from master_tindakan,tindakan\n where tindakan.tnd=master_tindakan.id and\n tindakan.id='{$baris['0']}'\n and tgl like '%" . $tahun . "-" . $bulan . "%' ";
echo "<table width='270px' border='0' align='center' cellpadding='0' cellspacing='0' class='tbl_form'>\n <tr class='isi6'>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Tgl</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Nm.Pasien</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Kamar</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Tindakan</font></div></td>\n </tr>";
$hasil30 = bukaquery($_sql30);
while ($baris30 = mysql_fetch_array($hasil30)) {
echo "<TR class='isi6'>\n <td>" . date("Y-m-d", $baris30[0]) . "</td>\n <td>{$baris30['1']}</td>\n <td>{$baris30['2']}</td>\n <td>{$baris30['3']}</td>\n </tr>";
}
echo " \n </table>\n \n </td>\n </tr>\n </table>";
}
}
?>
</body>
</html>
示例7: Terbilang
function Terbilang($satuan)
{
$huruf = array("", "Satu", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", "Delapan", "Sembilan", "Sepuluh", "Sebelas");
if ($satuan < 12) {
return " " . $huruf[$satuan];
} else {
if ($satuan < 20) {
return Terbilang($satuan - 10) . " Belas";
} else {
if ($satuan < 100) {
return Terbilang($satuan / 10) . " Puluh" . Terbilang($satuan % 10);
} else {
if ($satuan < 200) {
return " Seratus" . Terbilang($satuan - 100);
} else {
if ($satuan < 1000) {
return Terbilang($satuan / 100) . " Ratus" . Terbilang($satuan % 100);
} else {
if ($satuan < 2000) {
return " Seribu" . Terbilang($satuan - 1000);
} else {
if ($satuan < 1000000) {
return Terbilang($satuan / 1000) . " Ribu" . Terbilang($satuan % 1000);
} else {
if ($satuan < 1000000000) {
return Terbilang($satuan / 100000000) . " Juta" . Terbilang($satuan % 1000000);
} else {
if ($satuan >= 1000000000) {
echo "Hasil terbilang tidak dapat diproses karena nilai terlalu besar !";
}
}
}
}
}
}
}
}
}
}
示例8: formatDuit
if (empty($baris25[7])) {
$pribadi = 0;
} else {
$pribadi = $baris25[7];
}
$ttlpribadi = $ttlpribadi + $pribadi;
if (empty($baris25[8])) {
$lain = 0 + $alpha;
} else {
$lain = $baris25[8] + $alpha;
}
$ttllain = $ttllain + $lain;
$ttlditerima = $ttlgaji - ($jamsostek + $dansos + $simwajib + $angkop + $angla + $telpri + $pajak + $pribadi + $lain);
$ttlttlditerima = $ttlttlditerima + $ttlditerima;
echo "\n \n <TR class='isi6'>\n <TD width='130px'>Potongan Jasa Medis :</TD><td></td><td></td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>Pajak</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($pajak) . "</td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'>{$ktg}</TD><td width='3px'>:</td><td width='140px'>" . formatDuit($lain) . "</td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> <i>TOTAL JM DITERIMA</i></TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px'> <i>" . formatDuit($ttlditerima) . "</i></td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px' colspan='3'> <i>" . Terbilang($ttlditerima) . "</i></td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'></TD><td></td><td><center>Yogyakarta, " . date('d-m-Y') . "</center> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>Penerima</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>Pengelola</center></td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>( {$baris['2']} )</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>( dr Lily T S Siagian )</center></td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n <!--ini di hiden disini\n <TR class='isi6'>\n <TD width='130px' colspan='3'><center><font color='999999' size='2' face='Arial'>RSKIA SADEWA</font> <br>\n <font color='999999' size='1' face='Arial'><b>Yayasan Pelayanan Kesehatan Prima SEMAR<br> \n Jl.Babarsari TB 16 No.13 Sleman Yogyakarta 55281<br> \n Telp 0274-489118, Fax 0274-485903<br>\n Jasa Medis Tahun " . $tahun . " </b></font></center></TD>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px' colspan='3'><center><font face='Arial' size='1' color='999999'>Rawat Jalan</font></center>";
$_sql30 = "select rawatjalan.tgl,rawatjalan.nm_pasien,rawatjalan.diagnosa,master_tindakan.nama,\n rawatjalan.kamar,rawatjalan.jm,rawatjalan.jmlh,master_tindakan.jm\n from master_tindakan,rawatjalan\n where rawatjalan.tnd=master_tindakan.id and\n rawatjalan.id='{$baris['0']}'\n and tgl like '%" . $tahun . "-" . $bulan . "%' ";
echo "<table width='270px' border='1' align='center' cellpadding='0' cellspacing='0' class='tbl_form'>\n <tr class='isi6'>\n <td width='10px'><div align='center'><font size='1' face='Arial'>No</font></div></td>\n <td width='40px'><div align='center'><font size='1' face='Arial'>Tgl</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Tindakan</font></div></td>\n <td width='20px'><div align='center'><font size='1' face='Arial'>Jmlh</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>JM</font></div></td>\n <td width='50px'><div align='center'><font size='1' face='Arial'>Ttl.JM</font></div></td>\n </tr>";
$hasil30 = bukaquery($_sql30);
$x = 1;
$jmrj = 0;
while ($baris30 = mysql_fetch_array($hasil30)) {
echo "<TR class='isi6'>\n <td>{$x}</td>\n <td>" . substr($baris30[0], 0, 10) . "</td>\n <td>{$baris30['3']}</td>\n <td>{$baris30['6']}</td>\n <td>{$baris30['7']}</td>\n <td>{$baris30['5']}</td>\n </tr>";
$x++;
$jmrj = $jmrj + $baris30[5];
}
echo " \n \n </table> \n </td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'>JM Rawat Jalan</TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px'>" . formatDuit($jmrj) . "</td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'>JM Tindakan </TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px'>" . formatDuit($ttlditerima) . "</td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n <TD width='130px'>Total Diterima </TD>\n\t\t\t\t\t <td width='3px'>:</td>\n\t\t\t\t\t <td width='140px'> " . formatDuit($jmrj + $ttlditerima) . "</td>\n\t\t\t\t </TR>\n <TR class='isi6'>\n\t\t\t\t\t <td colspan=3>" . Terbilang($jmrj + $ttlditerima) . "</td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'></TD><td></td><td><center>Yogyakarta, " . date('d-m-Y') . "</center> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>Penerima</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>Pengelola</center></td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'> </TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'> </td>\n\t\t\t\t </TR>\n\t\t\t\t <TR class='isi6'>\n <TD width='130px'><center>( {$baris['2']} )</center></TD>\n\t\t\t\t\t <td width='3px'> </td>\n\t\t\t\t\t <td width='140px'><center>( dr Lily T S Siagian )</center></td>\n\t\t\t\t </TR>\n\t\t\t\t </table>\n\t\t\t\t \n </td> \n </tr> \n akhir dari hiden disini-->\n </table>";
}
}
?>
</body>
</html>
示例9: substr
$gapok = $gapokgp;
if ($masker < 1 && $status == "CK" || $masker < 1 && $status == "FT") {
$gapok = $masker * $gapokgp;
}
} else {
if ($status == "PT") {
$_sqlgp = "SELECT `gapok1`, `gapok2`, `gapok3`\n from pendidikan where tingkat like '%" . substr($pendidikan, 0, 7) . "%' order by gapok1 desc limit 1 ";
$hasilgp = bukaquery($_sqlgp);
$barisgp = mysql_fetch_row($hasilgp);
$gapokgp = 0;
if ($masker < 1) {
$gapokgp = $barisgp[0];
} else {
if ($masker >= 1 && $masker < 3) {
$gapokgp = $barisgp[1];
} else {
if ($masker >= 3) {
$gapokgp = $barisgp[2];
}
}
}
$gapok = $nmasuk / $wajibmasuk * $gapokgp;
if ($masker < 1) {
$gapok = $masker / 12 * ($nmasuk / $wajibmasuk) * $gapokgp;
}
}
}
echo "<table width=300px border='0' align='left' bgcolor='#FFFFFF' border='0' align='center' cellpadding='0' cellspacing='0' class='tbl_form'>\n <caption><center><font color='777777' size='2' face='Arial'>RSKIA SADEWA</font> <br>\n <font color='777777' size='1' face='Arial'><b>Yayasan Pelayanan Kesehatan Prima SEMAR<br> \n Jl.Babarsari TB 16 No.13 Sleman Yogyakarta 55281<br> \n Telp 0274-489118, Fax 0274-485903<br/><br/><br/><br/></b></font></center></caption>\n <tr class='isi6'>\n <td width='30%'>NIK</td>\n <td>:</td>\n <td width='70%'>{$nik}</td> \n </tr>\n <tr class='isi6'>\n <td width='30%'>Nama</td>\n <td>:</td>\n <td width='70%'>{$nama}</td> \n </tr>\n <tr class='isi6'>\n <td width='30%'>Status</td>\n <td>:</td>\n <td width='70%'>{$data['6']}</td> \n </tr>\n <tr class='isi6'>\n <td width='30%'>Departemen</td>\n <td>:</td>\n <td width='70%'>{$data['7']}</td> \n </tr>\n <tr class='isi6'>\n <td width='30%'>THR</td>\n <td>:</td>\n <td width='70%'>" . formatDuit($gapok) . "</td> \n </tr>\n <tr class='isi6'>\n <td width='30%'>Terbilang</td>\n <td>:</td>\n <td width='70%'>" . Terbilang($gapok) . " rupiah</td> \n </tr>\n \n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center>Penerima</center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center>Pengelola</center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR> \n <TR class='isi6'>\n <TD colspan=3></TD>\n </TR><TR class='isi6'>\n <TD colspan=3></TD>\n </TR>\n <TR class='isi6'>\n <TD width='130px'><center>( {$nama} )</center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center>( dr Lily T S Siagian )</center></td>\n </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR> \n \n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n \n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n \n <TR class='isi6'>\n <TD colspan=3><center>\n <font size='2px' face='Arial' color='777777'><i><b>Selamat Hari Raya Idul Fitri<br/></b></i></font>\n <font size='1px' face='Arial' color='777777'><i><b>Mohon Maaf Lahir dan Batin<br/>Semoga Berhasil Menjadi Insan Yang Bertaqwa<br/></b></i></font>\n <font size='2px' face='Arial' color='777777'><i><b>Salam Sukses!</b></i></font></center></TD>\n </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD width='130px'><center> </center></TD>\n\t\t <td width='3px'> </td>\n\t\t <td width='140px'><center> </center></td>\n\t </TR>\n <TR class='isi6'>\n <TD colspan=3><center><font size='1px' face='Arial' color='777777'><i><b>..Terima kasih atas kerjasamanya <br>dalam memberikan pelayanan yang berkualitas..</b></i></font></center></TD>\n </TR>\n </table>";
?>
</body>
</html>
示例10: fnSpace
$Data .= $row['ItemName'] . fnSpace(42 - strlen($row['ItemName'])) . " | ";
//BatchNumber
$Data .= fnSpace(10 - strlen($row['BatchNumber'])) . $row['BatchNumber'] . " | ";
//Harga Satuan
$Data .= fnSpace(17 - strlen(number_format($row['SalePrice'], 2, ".", ","))) . number_format($row['SalePrice'], 2, ".", ",") . " | ";
//Diskon
$Data .= fnSpace(17 - strlen(number_format($row['DiscountAmount'], 2, ".", ",")) - strlen($row['Discount'])) . number_format($row['DiscountAmount'], 2, ".", ",") . $row['Discount'] . " | ";
//Total
$Data .= fnSpace(19 - strlen(number_format($row['Total'], 2, ".", ","))) . number_format($row['Total'], 2, ".", ",") . " |\n";
$GrandTotal += $row['Total'];
}
//$Data .= "| 2,00 m lari | MAESTRO 646 XTC | 522 | 155,000.00 | 15.500(10%) | 100,201,500.00 |\n";
$Data .= "|---------------------------------------------------------------------------------------------------------------------------------------|\n";
$Data .= " Catatan : " . $Remarks . fnSpace(75 - strlen($Remarks)) . "Jml Pembelian Rp. " . fnSpace(19 - strlen(number_format($GrandTotal, 2, ".", ","))) . number_format($GrandTotal, 2, ".", ",") . "\n";
$Data .= " Kredit : Rp. " . number_format($GrandTotal, 2, ".", ",") . "\n";
$Data .= " Terbilang : " . trim(strtoupper(Terbilang($GrandTotal))) . " RUPIAH\n";
$Data .= "_________________________________________________________________________________________________________________________________________\n";
$Data .= " Penerima," . fnSpace(50) . "Checker," . fnSpace(50) . "Hormat Kami,\n\n\n";
$Data .= fnSpace(115) . fnSpace(ceil((22 - strlen($CreatedBy)) / 2)) . $CreatedBy . "\n";
$Data .= $bold1 . "Barang yang sudah dibeli tidak dapat ditukar/dikembalikan" . Chr(12);
fwrite($handle, $Data);
fclose($handle);
copy($file, $SHARED_PRINTER_ADDRESS);
//exec("lp -d epson ".$file); # Lakukan cetak
//unlink($file);
echo returnstate($ID, $Message, $MessageDetail, $FailedFlag, $State);
}
function returnstate($ID, $Message, $MessageDetail, $FailedFlag, $State)
{
$data = array("ID" => $ID, "Message" => $Message, "MessageDetail" => $MessageDetail, "FailedFlag" => $FailedFlag, "State" => $State);
return json_encode($data);
示例11: setuang
$out .= '<tr class="head">
<td colspan="2" align="center">Total Terbayar </td>
<td style="background-color:lightBlue;" align="right">' . setuang($totNominal) . '</td>
</tr><tr>
<td>* Total Kurangan </td>
<td>: </td>
<td style="background-color:lightBlue;" align="right">' . setuang(intval($r['biayaNett']) - $totNominal) . '</td>
</tr>';
}
$out .= '<tr>
<td >* Tagihan ' . ($r['isAngsur2'] == 1 ? ' Angsuran ke-' . ($angsuranKe == 0 ? 1 : $angsuranKe + 1) : '') . '</td>
<td ' . ($r['isAngsur2'] != 1 ? 'style="background-color:pink;"' : '') . '>: ' . ($r['isAngsur2'] != 1 ? setuang($r['biayaNett']) : '') . '</td>
<td ' . ($r['isAngsur2'] == 1 ? 'align="right" style="background-color:pink;"' : '') . ' >' . ($r['isAngsur2'] == 1 ? setuang($r['angsurNom']) : '') . '</td>
</tr><tr>
<td>* Terbilang</td>
<td colspan="2">: ' . Terbilang($r['isAngsur2'] == 1 ? $r['angsurNom'] : $r['biayaNett']) . ' Rupiah</td>
</tr>
</table>';
// pr(intval($r['biayaNett']));
$out .= '</body>';
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');
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->WriteHTML($out);
$mpdf->Output();
}
示例12: printkwitansi
public function printkwitansi($id_pelanggan = 0, $bulan = 0, $tahun = 0, $nomark = 0)
{
$pelanggan = $this->pams_m->get_pelanggan_by_id($id_pelanggan);
$baca_meter_current = $this->pams_m->baca_meter_current($bulan, $tahun, $id_pelanggan);
$baca_meter_sebelumnya = $this->pams_m->baca_meter_sebelumnya($bulan, $tahun, $id_pelanggan);
// print_r($baca_meter_sebelumnya);die;
$bulan_currents = explode('-', $baca_meter_current[$id_pelanggan]['bulan']);
$bulan_sebelumnya = explode('-', $baca_meter_sebelumnya[$id_pelanggan]['bulan']);
$pemakaian = $baca_meter_current[$id_pelanggan]['baca_meter'] - $baca_meter_sebelumnya[$id_pelanggan]['baca_meter'];
$bayars = bayar($baca_meter_sebelumnya[$id_pelanggan]['baca_meter'], $baca_meter_current[$id_pelanggan]['baca_meter'], $pelanggan[0]['jenis']);
$bulanbayar = strtoupper(date("F", mktime(0, 0, 0, $bulan_currents[1], $bulan_currents[2], $bulan_currents[0])));
$tahunbayar = date("Y", mktime(0, 0, 0, $bulan_currents[1], $bulan_currents[2], $bulan_currents[0]));
$dikurang = 5;
if ($baca_meter_sebelumnya[$id_pelanggan]['baca_meter'] == 0 && $baca_meter_current[$id_pelanggan]['baca_meter'] != 0) {
$dikurang = 10;
} else {
$dikurang = 5;
}
$tempprint = '-----------------------------------------------------------------------
BUKTI PEMBAYARAN UNTUK BULAN ' . $bulanbayar . ' TAHUN ' . $tahunbayar . ' SPAMDES TIRTO ROSO
-----------------------------------------------------------------------
Nomor :GP_' . $pelanggan[0]['alamat'] . '_%s
Nama pelanggan :%s
Alamat :Gamplong %s
Pemakaian Bulan %s %s m3
Bulan %s %s m3
____________________ _
Pemakaian %s m3
Rumus : ((%s-' . $dikurang . ')*2000)+15000 = %s
Jumlah dibayar : %s
Terbilang : %s
Admin : Asbin Arjinto S.Kom
Tanggal : %s
-----------------------------------------------------------------------';
$nomor = $pelanggan[0]['nomor'];
$nama = $pelanggan[0]['nama'];
$alamat = $pelanggan[0]['alamat'];
$bulan_current = date("F", mktime(0, 0, 0, $bulan_currents[1], $bulan_currents[2], $bulan_currents[0]));
$baca_meter_currentt = $baca_meter_current[$id_pelanggan]['baca_meter'];
$bulan_sebelum = date("F", mktime(0, 0, 0, $bulan_sebelumnya[1], $bulan_sebelumnya[2], $bulan_sebelumnya[0]));
$baca_meter_sebelum = $baca_meter_sebelumnya[$id_pelanggan]['baca_meter'];
$pemakaian = $pemakaian;
$jml_bayar = 'Rp. ' . number_format($bayars, 0, '', '.') . ',-';
$terbilang = Terbilang($bayars) . 'Rupiah';
$tanggal = date("d-F-Y", mktime(0, 0, 0, date('m'), date('d'), date('Y')));
$tempprint2 = sprintf($tempprint, $nomor, $nama, $alamat, $bulan_current, $baca_meter_currentt, $bulan_sebelum, $baca_meter_sebelum, $pemakaian, $pemakaian, $jml_bayar, $jml_bayar, $terbilang, $tanggal);
// echo $tempprint2;die;
$datainsert = array('status' => 1);
if ($nomark == 0) {
$this->db->where('id', $baca_meter_current[$id_pelanggan]['id']);
$this->db->update('default_pembayaran', $datainsert);
//echo $this->db->last_query();
}
$pathkwitansi = '/var/www/html/pam/trunk/kwitansi/kwitansi_GP_' . $alamat . '_' . $nomor . '_' . $bulanbayar . '_' . $tahunbayar . '.txt';
file_put_contents($pathkwitansi, $tempprint2);
exec("lp " . $pathkwitansi . "");
// echo "lp ".$pathkwitansi."";die();
//exec("lp /var/www/html/pam/trunk/kwitansi/kwitansi2.txt");
//echo $tempprint2;
//die();
// $this->pams_m->update_iuran($bulan,date('Y'));
if ($nomark == 1) {
echo 1;
} else {
redirect('admin/pam/cari');
}
}
示例13: naikOrTinggalkelas
function naikOrTinggalkelas($id_siswa, $id_kelas, $id_ta_berikutnya)
{
$kelascurrentq = $this->db->query('SELECT * FROM
ak_kelas WHERE
id=?
AND publish=1
', array($id_kelas));
$kelascurrent = $kelascurrentq->result_array();
$query = $this->db->query('SELECT adj.*, ak.kelas, ak.nama as nama_kelas, aj.nama as jurusan FROM
ak_det_jenjang adj
JOIN ak_kelas ak
JOIN ak_jurusan aj
ON ak.id=adj.id_kelas
AND aj.id=ak.id_jurusan
WHERE
adj.id_sekolah=?
AND adj.id_siswa=?
AND adj.id_ta=?
AND ak.publish=1
', array($this->session->userdata['user_authentication']['id_sekolah'], $id_siswa, $id_ta_berikutnya));
$kenaikan = $query->result_array();
if (!empty($kenaikan)) {
if ($kelascurrent[0]['kelas'] == $kenaikan[0]['kelas']) {
//$kenaikannya['statusnaik']='Tinggal di kelas '.$kelascurrent[0]['kelas'].''.$kelascurrent[0]['nama'].'';
$kenaikannya['statusnaik'] = 'Tinggal di kelas ' . romanic_number($kelascurrent[0]['kelas']) . ' (' . Terbilang($kenaikan[0]['kelas']) . ' )';
} else {
//$kenaikannya['statusnaik']='Naik ke kelas '.$kenaikan[0]['kelas'].''.$kenaikan[0]['nama_kelas'].'';
$kenaikannya['statusnaik'] = 'Naik ke kelas ' . romanic_number($kenaikan[0]['kelas']) . ' (' . Terbilang($kenaikan[0]['kelas']) . ' )';
}
$kenaikannya['data'] = $kenaikan;
return $kenaikannya;
} else {
$querylulusan = $this->db->query('SELECT adj.*, ak.kelas, ak.nama as nama_kelas, aj.nama as jurusan FROM
ak_det_jenjang adj
JOIN ak_kelas ak
JOIN ak_jurusan aj
ON ak.id=adj.id_kelas
AND aj.id=ak.id_jurusan
WHERE
adj.id_sekolah=?
AND adj.id_siswa=?
AND adj.id_ta=?
AND ak.publish=1
', array($this->session->userdata['user_authentication']['id_sekolah'], $id_siswa, $this->session->userdata['ak_setting']['ta']));
$kelulusan = $querylulusan->result_array();
if ($kelulusan[0]['kelulusan'] == 1) {
$kelulusannya['statuslulus'] = 'LULUS';
} elseif ($kelulusan[0]['kelulusan'] == 0) {
$kelulusannya['statuslulus'] = 'TIDAK LULUS';
} elseif ($kelulusan[0]['kelulusan'] == 2) {
$kelulusannya['statuslulus'] = 'BELUM LULUS';
}
$kelulusannya['data'] = $kelulusan;
return $kelulusannya;
}
}
示例14: bukaquery
}
}
}
echo "</table>\n </td> \n </tr>";
}
$hasil5 = bukaquery("select temp1,temp2,temp3,temp7 from temporary_bayar_ralan where temp8='Potongan' group by temp2 order by no asc");
while ($inapdrpasien = mysql_fetch_array($hasil5)) {
echo "<tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['0']}</td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['1']}</font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='3' face='Tahoma'>{$inapdrpasien['3']}</font></td> \n </tr>";
}
$hasil6 = bukaquery("select temp1,temp2,temp3,temp7 from temporary_bayar_ralan where temp8='Tambahan' group by temp2 order by no asc");
while ($inapdrpasien = mysql_fetch_array($hasil6)) {
echo "<tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['0']}</td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['1']}</font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='3' face='Tahoma'>{$inapdrpasien['3']}</font></td> \n </tr>";
}
$hasil7 = bukaquery("select temp1,temp2,temp3,temp7 from temporary_bayar_ralan where temp8='-' and temp7<>'' group by temp2 order by no asc");
while ($inapdrpasien = mysql_fetch_array($hasil7)) {
echo "<tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['0']}</td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['1']}</font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='3' face='Tahoma'>{$inapdrpasien['3']}</font></td> \n </tr>";
}
$hasil8 = bukaquery("select temp1,temp2,temp3,temp7 from temporary_bayar_ralan where temp1='TOTAL BAYAR' group by temp2 order by no asc");
while ($inapdrpasien = mysql_fetch_array($hasil8)) {
echo "<tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'>{$inapdrpasien['0']}</td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'>" . Terbilang(str_replace(".", "", $inapdrpasien[3])) . " rupiah</font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='4' face='Tahoma'><b>{$inapdrpasien['3']}</b></font></td> \n </tr>";
}
echo "<tr class='isi12' padding='0'>\n <td padding='0' width='30%' align=center><font color='000000' size='2' face='Tahoma'> </td> \n <td padding='0' width='55%' colspan='4' align='center'><font color='000000' size='2' face='Tahoma'> </font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='center'><font color='000000' size='2' face='Tahoma'>Martapura, " . date('d-m-Y') . "</font></td> \n </tr> \n <tr class='isi12' padding='0'>\n <td padding='0' width='30%' align=center><font color='000000' size='2' face='Tahoma'>Petugas</td> \n <td padding='0' width='55%' colspan='4' align='center'><font color='000000' size='2' face='Tahoma'> </font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='center'><font color='000000' size='2' face='Tahoma'>Penanggung Jawab Pasien</font></td> \n </tr> \n <tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'> </td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='2' face='Tahoma'></font></td> \n </tr> \n <tr class='isi12' padding='0'>\n <td padding='0' width='30%'><font color='000000' size='2' face='Tahoma'> </td> \n <td padding='0' width='55%' colspan='4'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='right'><font color='000000' size='2' face='Tahoma'></font></td> \n </tr> \n <tr class='isi12' padding='0'>\n <td padding='0' width='30%' align=center><font color='000000' size='2' face='Tahoma'>( " . getOne("select nama from petugas where nip='{$petugas}'") . " )</td> \n <td padding='0' width='55%' colspan='4' align='center'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='1%'><font color='000000' size='2' face='Tahoma'></font></td> \n <td padding='0' width='14%' align='center'><font color='000000' size='2' face='Tahoma'>(.............)</font></td> \n </tr> \n </table>";
} else {
echo "<font color='333333' size='2' face='Times New Roman'><b>Data Billing masih kosong !</b>";
}
?>
</body>
</html>
示例15: ucfirst
echo $nomsub;
?>
. <?php
echo ucfirst(strtolower($last_data_sub['pelajaran']));
?>
</td>
<td align="center"><?php
echo $last_data_sub['kkm'];
?>
</td>
<td align="center"><?php
echo round($last_data_sub['kognitif'], 2);
?>
</td>
<td><i><?php
echo Terbilang(round($last_data_sub['kognitif'], 2));
?>
</i></td>
<td><?//=$last_data_sub['ketercapaian']?><? if(round($last_data_sub['kognitif'],2)>$last_data_sub['kkm']){echo 'Terlampaui';}else{ echo 'Tidak Terlampaui';}?></td>
</tr>
<?
$nomsub++;
}
}
}
}
}
?>
</tbody>
</table>