antonsofyan.com 'stylesheet' type='text/css' media='all' href='style.css' />
"content">
include "finance.php";
if(isset($_POST['submit']))
{
if(empty($_POST['sp']) || empty($_POST['lama_angsuran']) || empty($_POST['flat']) || empty($_POST['sliding']))
{
}
else
{
$SP_FLAT = $_POST['sp'];
$SP_SLIDING = $_POST['sp'];
$LA = $_POST['lama_angsuran'];
$I_FLAT = $_POST['flat'];
$I_SLIDING = $_POST['sliding'];
$bunga_flat = 0;
$total_bunga_flat = 0;
$cicilan_flat = 0;
$total_cicilan_flat = 0;
$bunga_sliding = 0;
$total_bunga_sliding = 0;
$cicilan_sliding = 0;
$total_cicilan_sliding = 0;
$c_pokok = $_POST['sp'] / $LA;
echo "
RESULT
";
echo ""
;
echo "
"
;
echo "Bulan ";
echo "Sisa Pinjaman ";
echo "Cicilan Pokok ";
echo "Flat Rate ";
echo "Sliding Rate ";
echo "
; echo "
"
; echo "Bunga " .$I_FLAT." %; echo "Total Cicilan "; echo "Bunga " .$I_SLIDING." %; echo "Total Cicilan "; echo "; for($x = 0; $x <= $LA; $x++) { echo "
"
; echo "" .$x."; // Sisa Pinjaman echo "" ; if($x == 0) { echo to_rupiah($SP_FLAT); } else { echo to_rupiah($SP_FLAT -= $c_pokok); } echo "; // Cicilan Pokok echo "" ; if($x == 0) { echo 0; } else { echo to_rupiah($c_pokok); } echo "; // Bunga Flat Rate echo "" ; if($x == 0) { echo 0; } else { $bunga_flat = $_POST['sp'] * $I_FLAT / 100 * 30 / 360; echo to_rupiah($bunga_flat); } echo "; //// Total Cicilan Flat Rate echo "" ; if($x == 0) { echo 0; } else { $total_cicilan_flat = $bunga_flat + $c_pokok; echo to_rupiah($total_cicilan_flat); } echo "; // Bunga Sliding Rate echo "" ; if($x == 0) { echo 0; } else { $bunga_sliding = $SP_SLIDING * $I_SLIDING / 100 * 30 / 360; echo to_rupiah($bunga_sliding); $SP_SLIDING -= $c_pokok; } echo "; //// Total Cicilan Sliding Rate echo "" ; if($x == 0) { echo 0; } else { $cicilan_sliding = $c_pokok + $bunga_sliding; echo to_rupiah($cicilan_sliding); } echo "; echo "; $total_bunga_flat += $bunga_flat; $total_cicilan_flat += $cicilan_flat; $total_bunga_sliding += $bunga_sliding; $total_cicilan_sliding += $cicilan_sliding; } echo "
"
; echo "Total "; echo "" .to_rupiah($_POST['sp'])."; echo "" .to_rupiah($total_bunga_flat)."; echo "" .to_rupiah($_POST['sp'] + $total_bunga_flat)."; echo "" .to_rupiah($total_bunga_sliding)."; echo "" .to_rupiah($total_cicilan_sliding)."; echo "; echo "; } } else { ?>
"center" cellpadding='0' cellspacing='1' border='0' style='width:50%;' class='tableborder'>
"45%">Saldo Pokok Pinjaman "1%">: "text-align: left;">"30" type="text" name="sp" placeholder="ex:24000000"/>
Suku Bunga (Flat Rate) : "text-align: left;">"10" type="text" name="flat" placeholder="ex:10"/> %
Suku Bunga (Sliding Rate) : "text-align: left;">"10" type="text" name="sliding" placeholder="ex:10"/> %
Lama Angsuran : "text-align: left;">"10" type="text" name="lama_angsuran" placeholder="ex:12"/> Bulan
"2"> "text-align: left;">class="submit" type="submit" name="submit" value="Submit"/> } ?>