} if ($Giat['RPHPAGU'] != 0) { $pagu_12 = $Giat['JML_12'] / $Giat['RPHPAGU'] * 100; } else { $pagu_12 = 0; } if ($kdsatker == '') { $pagu = pagu_menteri($th); } else { $pagu = pagu_satker($th, $kdsatker); } for ($i = 1; $i <= 12; $i++) { if ($kdsatker == '') { $real_r[$i] = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $i); if ($pagu != 0) { $real_p[$i] = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $i) / $pagu * 100; } else { $real_p[$i] = 0; } } else { $real_r[$i] = real_satker_spm_sdbulan($th, $kdsatker, $i); if ($pagu != 0) { $real_p[$i] = real_satker_spm_sdbulan($th, $kdsatker, $i) / $pagu * 100; } else { $real_p[$i] = 0; } } if (Date("m") < $i) { $real_p[$i] = ''; } if (Date("m") < $i) {
$sql = "select \tsum(RPHPAGU) as RPHPAGU,\r\n\t\t\t\t\tsum(JML01) as JML01,\r\n\t\t\t\t\tsum(JML01+JML02) as JML02,\r\n\t\t\t\t\tsum(JML01+JML02+JML03) as JML03,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04) as JML04,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05) as JML05,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06) as JML06,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07) as JML07,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08) as JML08,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09) as JML09,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10) as JML10,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10+JML11) as JML11,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10+JML11+JML12) as JML12\r\n\t\t\t\t\tfrom d_trktrm WHERE THANG='{$th}' group by THANG"; $aTarik = mysql_query($sql); $Tarik = mysql_fetch_array($aTarik); $pagu_menteri = pagu_menteri($th) / 1000000; $real_menteri_bulan_1 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 1) / 1000000; $real_menteri_bulan_2 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 2) / 1000000; $real_menteri_bulan_3 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 3) / 1000000; $real_menteri_bulan_4 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 4) / 1000000; $real_menteri_bulan_5 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 5) / 1000000; $real_menteri_bulan_6 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 6) / 1000000; $real_menteri_bulan_7 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 7) / 1000000; $real_menteri_bulan_8 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 8) / 1000000; $real_menteri_bulan_9 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 9) / 1000000; $real_menteri_bulan_10 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 10) / 1000000; $real_menteri_bulan_11 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 11) / 1000000; $real_menteri_bulan_12 = real_menteri_spm_sdbulan($th, $kddept, $kdunit, 12) / 1000000; ?> <tr> <td rowspan="2" align="center"> </td> <td rowspan="2" align="center"><font color="#009900"><strong><?php echo '023'; ?> </strong></font></td> <td rowspan="2" align="left"><font color="#009900"><strong><?php echo strtoupper(nm_unit('2320000')); ?> </strong></font></td> <td rowspan="2" align="right"><font color="#009900"><strong><?php echo number_format($pagu_menteri, "0", ",", "."); ?> </strong></font></td>
<th rowspan="2">Pagu Anggaran</th> <th colspan="3">Realisasi Anggaran</th> <th width="10%" rowspan="2">Sisa<br />Anggaran</th> </tr> <tr> <th>Bulan ini </th> <th>s.d Bulan ini </th> <th>(%)</th> </tr> </thead> <tbody> <?php if ($xlevel != 3 and $xlevel != 4 and $xlevel != 5 and $xlevel != 6 and $xlevel != 7 and $xlevel != 8) { $pagu_menteri = pagu_menteri($th); $real_menteri_bulan = real_menteri_spm_bulan($th, $kddept, $kdunit, $kdbulan); $real_menteri_sdbulan = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $kdbulan); $renc_menteri_sdbulan = renc_menteri_sdbulan($th, $kdbulan); ?> <tr> <td align="center" valign="top"><font color="#009900"><strong><?php echo '023'; ?> </strong></font></td> <td align="left"><font color="#009900"><strong><?php echo strtoupper(nm_unit('2320000')); ?> </strong></font></td> <td align="right" valign="top"><font color="#009900"><strong><?php echo number_format($pagu_menteri, "0", ",", "."); ?> </strong></font></td>
} else { $pagu_11 = 0; } if ($Giat['RPHPAGU'] != 0) { $pagu_12 = $Giat['JML_12'] / $Giat['RPHPAGU'] * 100; } else { $pagu_12 = 0; } if ($kdsatker == '') { $pagu = pagu_menteri($th); } else { $pagu = pagu_satker($th, $kdsatker); } for ($i = 1; $i <= 12; $i++) { if ($kdsatker == '') { $real_r[$i] = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $i); if ($pagu != 0) { $real_p[$i] = $real_r[$i] / $pagu * 100; } else { $real_p[$i] = 0; } } else { $real_r[$i] = real_satker_spm_sdbulan($th, $kdsatker, $i); if ($pagu != 0) { $real_p[$i] = $real_r[$i] / $pagu * 100; } else { $real_p[$i] = 0; } } if ($th == Date("Y")) { if (Date("m") < $i) {
$pagu_1 = $Giat['JML_1'] / $Giat['RPHPAGU'] * 100; $pagu_2 = $Giat['JML_2'] / $Giat['RPHPAGU'] * 100; $pagu_3 = $Giat['JML_3'] / $Giat['RPHPAGU'] * 100; $pagu_4 = $Giat['JML_4'] / $Giat['RPHPAGU'] * 100; $pagu_5 = $Giat['JML_5'] / $Giat['RPHPAGU'] * 100; $pagu_6 = $Giat['JML_6'] / $Giat['RPHPAGU'] * 100; $pagu_7 = $Giat['JML_7'] / $Giat['RPHPAGU'] * 100; $pagu_8 = $Giat['JML_8'] / $Giat['RPHPAGU'] * 100; $pagu_9 = $Giat['JML_9'] / $Giat['RPHPAGU'] * 100; $pagu_10 = $Giat['JML_10'] / $Giat['RPHPAGU'] * 100; $pagu_11 = $Giat['JML_11'] / $Giat['RPHPAGU'] * 100; $pagu_12 = $Giat['JML_12'] / $Giat['RPHPAGU'] * 100; for ($i = 1; $i <= 12; $i++) { if ($kdsatker == '') { $real_r[$i] = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $i); $real_p[$i] = real_menteri_spm_sdbulan($th, $kddept, $kdunit, $i) / $Giat['RPHPAGU'] * 100; } else { $real_r[$i] = real_satker_spm_sdbulan($th, $kdsatker, $i); $real_p[$i] = real_satker_spm_sdbulan($th, $kdsatker, $i) / $Giat['RPHPAGU'] * 100; } if (Date("m") < $i) { $real_p[$i] = ''; } if (Date("m") < $i) { $real_r[$i] = ''; } } $leg = array("", "Jan", "Peb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agt", "Sep", "Okt", "Nop", "Des"); $pagu_p = array("", $pagu_1, $pagu_2, $pagu_3, $pagu_4, $pagu_5, $pagu_6, $pagu_7, $pagu_8, $pagu_9, $pagu_10, $pagu_11, $pagu_12); mysql_query("DELETE FROM das_real_ang_dept WHERE tahun = '{$th}' and kdsatker = '{$kdsatker}'"); for ($i = 1; $i <= 12; $i++) {