Nomor BAST
                                                                                </td>
                                                                                <td valign="top" align="left" >
                                                                                    <input type="text" name="bupt_bast_nobast" required="required" value="<?php 
echo "{$row->NoBASP}";
?>
">
                                                                                </td>
                                                                                <td valign="top" align="left" width="120px">
                                                                                    Tanggal&nbsp;BAST
                                                                                </td>
                                                                                <!-- Tanggal BASP -->
                                                                                <td valign="top" align="left" >
                                                                                    <input type="text" name="bupt_bast_tglbast" id="tanggal13" required="required" value="<?php 
$change2 = $row->TglBASP;
$change3 = format_tanggal_db3($change2);
echo "{$change3}";
?>
">
                                                                                </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td colspan="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                                <td valign="top" align="left">
                                                                                    Lokasi&nbsp;Serah&nbsp;Terima
                                                                                </td>
                                                                                <td valign="top" align="left" colspan="3"><input type="text" name="LokasiBASP" required="required" value="<?php 
echo "{$row->LokasiBASP}";
?>
($SessionUser['ses_uid']!='') ? $Session = $SessionUser : $Session = $SESSION->get_session(array('title'=>'GuestMenu', 'ses_name'=>'menu_without_login')); 
$SessionUser = $SESSION->get_session_user();
$USERAUTH->FrontEnd_check_akses_menu($menu_id, $SessionUser);

include"$path/meta.php";
include"$path/header.php";
include"$path/menu.php";

$Penetapan_ID = $_GET['id'];
$Satker_ID = $_GET['satker'];

$par_data_table = "Penetapan_ID={$Penetapan_ID}";
$PENYUSUTAN = new RETRIEVE_PENYUSUTAN;
$FlagPenetapan=$PENYUSUTAN->getPenetapanKet($Penetapan_ID,$Satker_ID);
$Tgl=$FlagPenetapan['TglPenyusutan']; 
$TglFix=  format_tanggal_db3($Tgl); 
					
?>
	<!-- End Sql -->
	<section id="main">
		<ul class="breadcrumb">
			  <li><a href="#"><i class="fa fa-home fa-2x"></i>  Home</a> <span class="divider"><b>&raquo;</b></span></li>
			  <li><a href="#">Penghapusan</a><span class="divider"><b>&raquo;</b></span></li>
			  <li class="active">Daftar Usulan Penyusutan</li>
			  <?php SignInOut();?>
			</ul>
			<div class="breadcrumb">
				<div class="title">Usulan Penghapusan Penyusutan</div>
				<div class="subtitle">Filter Aset Data </div>
			</div>	
				if ($_GET['pid'] == 1) $no = 1; else $no = $paging;
						if (!empty($data['dataArr']))
						{
							$disabled = '';
							$pid = 0;
				$i=1;
				foreach($data['dataArr'] as $key => $hsl_data){
				?>
						  
					<tr class="gradeA">
						<td><?php echo "$no.";?></td>
						<td>
							<?php echo "$hsl_data[NoBAPemusnahan]";?>
						</td>
						<td>
							<?php $change=$hsl_data[TglBAPemusnahan]; $change2=  format_tanggal_db3($change); echo "$change2";?>
						</td>
						<td><?php echo "$hsl_data[NamaPenandatangan]";?></td>
						<td>	
						  <a href="<?php echo "$url_rewrite/report/template/PEMUSNAHAN/tes_class_barang_validasi_daftar_valid.php?id=$hsl_data[BAPemusnahan_ID]&mode=1";?>" target="_blank">Cetak</a>
						</td>
					</tr>
					  <?php $no++; $pid++;} }?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
					</tr>
						
							<input type="checkbox" class="icheck-input checkbox" onchange="return AreAnyCheckboxesChecked();" name="penetapanpenghapusan[]" value="<?php echo $hsl_data[Usulan_ID];?>" >
							
						</td>
						<td><?php echo $hsl_data['NoUsulan'];?></td>
						<td>
							<?php
							if($hsl_data['SatkerUsul']){ echo "[".$hsl_data['SatkerUsul']."]";}
							?>
							<br/>
							<?php echo $hsl_data['NamaSatkerUsul'];?>
						</td>
						<td>
							<?php echo $jumlahAset;?>
						</td>
						<td><?php $change=$hsl_data[TglUpdate]; $change2=  format_tanggal_db3($change); echo "$change2";?>
						</td>
						<td><?=number_format($hsl_data['TotalNilaiPerolehan'],4)?>
						</td>
						<td>
							<?=$hsl_data['KetUsulan']?>
						</td>
					</tr>
					
				     <?php $no++; } }?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
												while ($dataNew = mysql_fetch_object($result))
												{
													$dataArr[] = $dataNew->Menganggur_ID;
												}
												
												//$no = 1;
												while($row=mysql_fetch_array($exec)){
												/*if($dataArr!="")
												{
													(in_array($row['Menganggur_ID'], $dataArr))   ? $disable = "return false" : $disable = "return true";
												}*/
                                        ?>
                                        <tr>
                                            <td align="center" style="height:100px; background-color: #; border: 1px solid #dddddd; color: ; font-weight: "><?php echo "$no";?></td>
                                            <td align="center" style="height:100px; background-color: #; border: 1px solid #dddddd; color: ; font-weight: ;"><?php echo "$row[NoSKKDH]";?></td>
                                            <td align="center" style="height:100px; background-color: #; border: 1px solid #dddddd; color: ; font-weight: ;"><?php $change=$row[TglSKKDH]; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                                            <td align="center" style="height:100px; background-color: #; border: 1px solid #dddddd; color: ; font-weight: ;">
                                                 <a href="<?php echo "$url_rewrite/module/pemanfaatan/"; ?>pemanfaatan_penetapan_idle_daftar_edit.php?id=<?php echo "$row[Menganggur_ID]";?>">Edit</a> ||
												 <a href="<?php echo "$url_rewrite/module/pemanfaatan/"; ?>pemanfaatan_penetapan_idle_daftar_proses_hapus.php?id=<?php echo "$row[Menganggur_ID]";?>">Hapus</a> 
                                            </td>
                                        </tr>
                                        <?php $no++; } ?>
                                    </tbody>
                                </table>    
                                    &nbsp;
                                    <tfoot></tfoot>
                                    </div>
								<div class="spacer"></div>
							<!-- End Frame -->	
                            </div>
                        </div>
     <tr>
         <td>&nbsp;</td>
     </tr>                      
 </table> 
 <table height="100px" width="318px">	
     <tr>
         <td>No. Dokumen</td>
         <td><input type="text" width="150px" name="mutasi_trans_eks_nodok" required="required" id="posisiKolom" value="<?php echo "$row2[NoSKKDH]";?>">&nbsp;<span id="errmsg"></span></td>
     </tr>
     <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
     </tr> 
     <tr>
         <td valign="top" align="left">Tgl. Proses</td>
         <td valign="top" align="left"><input type="text" width="200px" name="mutasi_trans_eks_tglproses" required="required" id="tanggal12" value="<?php $change=$row2[TglSKKDH]; $change2=  format_tanggal_db3($change); echo "$change2";?>"></td>
     </tr>
     <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
     </tr> 					
     <tr>
         <td valign="top" align="left">Alasan</td>
         <td valign="top" align="left" ><textarea name="mutasi_trans_eks_alasan" cols="50" rows="5" required="required"><?php echo "$row2[Keterangan]";?></textarea></td>
     </tr>
     <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
     </tr> 					
     <tr>
         <td valign="top" align="left"></td>
											while ($dataNew = mysql_fetch_object($result))
											{
												$dataArr[] = $dataNew->Usulan_ID;
											}
											
                                    foreach($data['dataArr'] as $key => $hsl_data){
										
										if($dataArr!="")
												{
													(in_array($hsl_data['Usulan_ID'], $dataArr))   ? $disable = "return false" : $disable = "return true";
												}
                                    ?>
                                    <tr>
                                        <td align="center" style="border: 2px solid #dddddd;"><?php echo "$nomor";?></td>
                                        <td align="center" style="border: 2px solid #dddddd;"><?php echo "$hsl_data[Usulan_ID]";?></td>
                                        <td align="center" style="border: 2px solid #dddddd;"><?php $change=$hsl_data['TglUpdate']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                                        <td align="center" style="border: 2px solid #dddddd;">
                                            <a href="<?php echo "$url_rewrite/report/template/PEMUSNAHAN/tes_class_barang_untuk_dimusnahkan.php?id=$hsl_data[Usulan_ID]&menu_id=46&mode=1";?>" target="_blank">Cetak</a> || <a href="<?php echo "$url_rewrite/module/pemusnahan/"; ?>pemusnahan_usulan_daftar_proses_hapus.php?id=<?php echo "$hsl_data[Usulan_ID]";?>" onclick="<?=$disable?> ">Hapus</a>
                                        </td>
                                    </tr>
                                    <?php $nomor++;}}?>
                                </tbody>
                            </table>
								</div>
								<div class="spacer"></div>
					<!-- End Frame -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
                                        <td>&nbsp;</td>
                                    </tr>
                                        <?php 
                                        
										foreach($data['dataRow']  as $keys => $row){	 
                                        }
                                        ?>
                                    <tr>
                                        <td width='150px'>Nomor Penetapan</td>
                                        <td><input type="text" name="penggu_penet_eks_nopenet" required="required" id="" value="<?php echo $row->NoSKKDH;?>" style="width:180px;">&nbsp;<span id="errmsg"></span></td>
										<td>&nbsp;</td>
                                        <td>&nbsp;</td>
									</tr>
                                    <tr>
                                        <td>Tanggal Penetapan</td>
                                        <td><input type="text" name="penggu_penet_eks_tglpenet" required="required" id="tanggal12" value="<?php $change=$row->TglSKKDH; $hasil=format_tanggal_db3($change); echo "$hasil";?>" style="width:180px;"></td>
										<td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>Keterangan</td>
                                        <td><textarea name="penggu_penet_eks_ket" cols="50" rows="2" required="required"><?php echo $row->Keterangan;?></textarea></td>
										<td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
									</tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>Tanggal Mulai</td>
                                        <td><input type="text" name="peman_penet_eks_tglmulai" required="required" id="id_tgl_start" value="<?php $change=$row2[TglMulai]; $hasil=format_tanggal_db3($change); echo "$hasil";?>" onchange="setjangkawaktu();"></td>
										<td>&nbsp;</td>
                                        <td>&nbsp;</td>
									</tr>
									<tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>Tanggal Selesai</td>
                                        <td><input type="text" name="peman_penet_eks_tglselesai" required="required" id="id_tgl_end" value="<?php $change=$row2[TglSelesai]; $hasil=format_tanggal_db3($change); echo "$hasil";?>" onchange="setjangkawaktu();"></td>
										<td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
									<tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>Jangka Waktu</td>
                                        <td><input type="text" width="50px" readonly="readonly" name="peman_penet_eks_jangkawaktu" required="required" value="<?php echo "$row2[JangkaWaktu]";?>" id="id_jangka_waktu"></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
			echo '<pre>';
			//print_r($data['dataArr']);
			echo '</pre>';
			
			$nomor = 1;
			if (!empty($data['dataArr']))
			{
				$disabled = '';
				$pid = 0;
			foreach($data['dataArr'] as $key => $row)
				{
				?>	  
					<tr class="gradeA">
						<td><?php echo "$nomor";?></td>
						<td><?php echo "$row[NoBAPemusnahan]";?></td>
						<td><?php $change=$row['TglBAPemusnahan']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
						<td>
							<a href="<?php echo "$url_rewrite/module/pemusnahan/"; ?>penetapan_pemusnahan_daftar_hapus.php?id=<?php echo "$row[BAPemusnahan_ID]";?>">Hapus</a> || <a href="<?php echo "$url_rewrite/module/pemusnahan/"; ?>penetapan_pemusnahan_daftar_edit.php?id=<?php echo "$row[BAPemusnahan_ID]";?>">Edit</a>
						</td>
						
					</tr>
					 <?php $nomor++;} }?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
					</tr>
				</tfoot>
				</a>
			</div>		

		<section class="formLegend">
			<form id="Form2" name="myform" method="POST" action ="<?=$url_rewrite?>/module/penyusutan/dftr_penetapan_pnystn_aset_filter.php">
			<div class="detailLeft" style="width:100%">
			<ul>
				<li>
					<span class="labelInfo">No Penetapan</span>
					<input type="text" name = "NoSKPenyusutan" value="<?=$FlagPenetapan['NoSKPenyusutan']?>" disabled/>
				</li>
				<li>
					<span class="labelInfo">Tgl Penetapan</span>
					<?php
						$Tgl=$FlagPenetapan['TglPenyusutan']; 
						$FixTgl=  format_tanggal_db3($Tgl); 
					?>
					<input type="text" name = "TglPenyusutan"  value="<?=$FixTgl?>" disabled/>
				</li>
				<li>
					<span class="labelInfo">Keterangan</span>
					<input type="text" name="AlasanPenyusutan" style="width:350px" id="" value="<?=$FlagPenetapan['AlasanPenyusutan']?>" disabled/> 
				</li>
				<li>
					<span class="labelInfo">Satker</span>
					<input type="text" name="SatkerUsul" value="<?=$FlagPenetapan['NamaSatker']?>" disabled/>
				</li>
				<li>
					<input type="submit" class="btn btn-info btn-small" id= "submit" value="Pilih Usulan" name="submit"  onclick="return check_pilihan(); disabled"/>
					<a class="btn btn-success detailRight" href="filter_aset_penetapan_pnystn.php?idPenyusutan=<?=$_GET['idPenyusutan']?>&satker=<?=$_GET['satker']?>"><i class="fa fa-reply"></i>Kembali Ke Daftar Usulan</a>
					<input type="hidden" name="Satker_ID" value="<?=$Satker_ID?>">
                                        //$parameter = array('menuID'=>$menu_id,'type'=>'checkbox','param'=>$sessi,'paging'=>$paging);
                                        //$data = $RETRIEVE->retrieve_daftar_validasi_pemindahtanganan($parameter);

                                            
                                            if ($_GET['pid'] == 1) $no = 1; else $no = $paging;
                                                if (!empty($data['dataArr']))
                                                {
                                                    $disabled = '';
                                                    $pid = 0;
                                        $i=1;
                                        foreach($data['dataArr'] as $key => $hsl_data){
                                    ?>
                                    <tr>
                                        <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php echo "$no.";?></td>
                                        <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php echo "$hsl_data[NoBASP]";?></td>
                                        <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php $change=$hsl_data[TglBASP]; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                                        <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php echo "$hsl_data[LokasiBASP]";?></td>
                                        <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;">
                                            <!--<a href="<?php echo "$url_rewrite/report/template/PEMINDAHTANGANAN/";?>tes_class_penetapan_aset_yang_dipindahkan_validasi.php?menu_id=44&mode=1&id=<?php echo "$hsl_data[BASP_ID]";?>" target="_blank">Cetak</a> ||-->
											<a href="<?php echo "$url_rewrite/module/pemindahtanganan/"; ?>validasi_pemindahtanganan_daftar_proses_hapus.php?id=<?php echo "$hsl_data[BASP_ID]";?>">Hapus</a>
                                        </td>
                                    </tr>
                                    <?php $no++; $pid++; }}?>
                                </tbody>
								<tfoot></tfoot>
                            </table>	
							</div>
                            &nbsp;
                                    <?php
                                    /*
                                        $total_halaman = ceil($total_record / $jmlperhalaman);
     <td>&nbsp;</td>
     <td>&nbsp;</td>
 </tr>
 <?php 
             $id=$_GET['id'];
             $query="SELECT * FROM BAST_Pengembalian where BAST_Pengembalian_ID='$id'";
             $exec=mysql_query($query);
             $row2=mysql_fetch_array($exec);
 ?>
 <tr>
     <td>Nomor BAST</td>
     <td>
         <input type="text" style="width:200px"  name="peman_pengem_eks_nobast" required="required" id="" value="<?php echo "$row2[NoBAST]";?>">&nbsp;<span id="errmsg"></span>
     </td>
     <td style="width:200px">Tanggal BAST</td>
     <td><input type="text" style="width:200px" name="peman_pengem_eks_tglbast" id="tanggal12" required="required" value="<?php $change=$row2[TglBAST]; $hasil=format_tanggal_db3($change); echo "$hasil";?>"></td>
 </tr>
 <tr>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
 </tr>
 <tr>
     <td valign="top">Lokasi Serah Terima</td>
     <td colspan=3><input type="text" style="width:200px" name="peman_pengem_eks_lokasi_serah_terima" required="required" size="92" value="<?php echo "$row2[LokasiBAST]";?>"/>
         
     </td>
 </tr>
 <tr>
     <td>&nbsp;</td>
								<?php
							}else{
								if ($data['asetList']){
								if (in_array($value['Aset_ID'], $data['asetList'])){
								?>
								<input type="checkbox" class="checkbox" onchange="enable()" name="ValidasiPenghapusan[]" value="<?php echo $value['Penghapusan_ID'];?>" <?php for ($j = 0; $j <= count($data['asetList']); $j++){if ($data['asetList'][$j]==$value['Penghapusan_ID']) echo 'checked';}?>/>
								<?php
									}	
								}
							}
						
						?>                                         
						</td>
						<td><?php echo "$value[NoSKHapus]";?></td>
						<td><?php $change=$value['TglHapus']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
						<td>
							
						<?php
						$dataUsulan = $PENGHAPUSAN->retrieve_daftar_usulan_penghapusan_UsulanAset($value[Usulan_ID]);
							
							foreach ($dataUsulan as $valueUsulan) {
								echo "Usulan ID[".$valueUsulan['Usulan_ID']."]<br/>";
								echo "<ul>";
								$dataAset = $PENGHAPUSAN->retrieve_daftar_usulan_penghapusan_aset_valid($valueUsulan[Aset_ID]);
								$noAset=1;
								//pr($dataAset);
								foreach ($dataAset as $valueAset) {

									if($valueAset[StatusKonfirmasi]==1){
										$textLabel="Diterima";
                                            $exec=mysql_query($query);
                                            $row=mysql_fetch_array($exec);
* 
*/
$row = $data['dataRow'];
?>
                                    <tr>
                                        <td>Nomor Penetapan</td>
                                        <td><input type="text" name="penggu_penet_eks_nopenet" required="required" id="posisiKolom" value="<?php 
echo "{$row['NoSKKDH']}";
?>
">&nbsp;<span id="errmsg"></span></td>
                                        <td>Tanggal Penetapan</td>
                                        <td><input type="text" name="penggu_penet_eks_tglpenet" required="required" id="tanggal12" value="<?php 
$change = $row[TglSKKDH];
$hasil = format_tanggal_db3($change);
echo "{$hasil}";
?>
"></td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>Keterangan</td>
                                        <td colspan=3><textarea name="penggu_penet_eks_ket" cols="100" rows="5" required="required"><?php 
echo "{$row['Keterangan']}";
?>
public function retrieve_html_rekap_mutasi($dataArr,$gambar,$skpd_id,$tglawalperolehan,$tglAkhirMutasiAwal,$tglakhirperolehan)
{
//$tglawalperolehan,$tglAkhirMutasiAwal,$tglakhirperolehan
// pr($dataArr);
// exit;
$index_id = 0;
$detailSatker=$this->get_satker($skpd_id);
$NoBidang = $detailSatker[0];
$NoUnitOrganisasi = $detailSatker[1];
$NoSubUnitOrganisasi = $detailSatker[2];
$NoUPB = $detailSatker[3];

if($NoBidang !=""){
	$paramKodeLokasi = $NoBidang;
}
if($NoBidang !="" && $NoUnitOrganisasi != ""){
	$paramKodeLokasi = $NoUnitOrganisasi;
}
if($NoBidang !="" && $NoUnitOrganisasi != "" && $NoSubUnitOrganisasi !=""){
	$paramKodeLokasi = $NoUnitOrganisasi.".".$NoSubUnitOrganisasi;
}
if($NoBidang !="" && $NoUnitOrganisasi != "" && $NoSubUnitOrganisasi !="" && $NoUPB !=""){
	$paramKodeLokasi = $NoUnitOrganisasi.".".$NoSubUnitOrganisasi.".".$NoUPB;
}
$Bidang = $detailSatker[4][0];
$UnitOrganisasi = $detailSatker[4][1];
$SubUnitOrganisasi = $detailSatker[4][2];
$UPB = $detailSatker[4][3];
   
$ex = explode('.',$skpd_id);
$hit = count($ex);

if($hit == 1){
	$head = "<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">BIDANG</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$Bidang</td>
        </tr>
		";
}elseif($hit == 2){
	$head = "<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">BIDANG</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$Bidang</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">UNIT ORGANISASI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$UnitOrganisasi</td>
        </tr>";
}elseif($hit == 3){
	$head = "<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">BIDANG</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$Bidang</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">UNIT ORGANISASI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$UnitOrganisasi</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">SUB UNIT ORGANISASI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$SubUnitOrganisasi</td>
        </tr>";
}elseif($hit == 4){
	$head = "<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">BIDANG</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$Bidang</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">UNIT ORGANISASI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$UnitOrganisasi</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">SUB UNIT ORGANISASI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$SubUnitOrganisasi</td>
        </tr>
		<tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">UPB</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$UPB</td>
        </tr>";
}

foreach ($dataArr as $satker_id => $value)
{
	$KeadaanAwal = format_tanggal_db3($tglAkhirMutasiAwal);
	$KeadaanAkhir = format_tanggal_db3($tglakhirperolehan);
    $html = "<html>
        <head>
      <meta content=\"text/html; charset=UTF-8\"
     http-equiv=\"content-type\">
      <title></title>
    </head>
    <body>
    <table style=\"text-align: left; width: 100%;\" border=\"0\"
     cellpadding=\"2\" cellspacing=\"2\">
      <tbody>
        <tr>
          <td style=\"width: 150px; text-align: LEFT;\"><img
     style=\"width: 80px; height: 85px;\" alt=\"\"
     src=\"$gambar\"></td>
          <td style=\"width: 902px; text-align: center;\">
          <h3>REKAPITULASI MUTASI</h3>
          </td>
        </tr>
      </tbody>
    </table>
    <br>";
    
    $html .="
    
    <table style=\"text-align: left; width: 100%;\" border=\"0\"
     cellpadding=\"2\" cellspacing=\"2\">
      <tbody>
        <tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">KABUPATEN / KOTA</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$this->NAMA_KABUPATEN</td>
        </tr>
        <tr>
          <td style=\"width: 200px; font-weight: bold; text-align: left;\">PROVINSI</td>
          <td style=\"text-align: center; font-weight: bold; width: 10px;\">:</td>
          <td style=\"width: 873px; font-weight: bold;\">$this->NAMA_PROVINSI</td>
        </tr>
		$head
      </tbody>
    </table>
    <br>
    <table style=\"width: 100%; text-align: left; margin-left: auto; margin-right: auto; border-collapse:collapse\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\; \">
      <thead>
        <tr>
          <td rowspan = \"3\" style=\" text-align: center; font-weight: bold; width: \">KODE</td>
          <td rowspan = \"3\" style=\"text-align: center; font-weight: bold; width: \">NAMA BARANG</td>
          <td colspan =\"2\" style=\"text-align: center; font-weight: bold; width: \">KEADAAN PER $KeadaanAwal</td>
          <td colspan =\"4\" style=\"text-align: center; font-weight: bold; width: \">MUTASI / PERUBAHAN</td>
          <td colspan =\"2\" style=\"text-align: center; font-weight: bold; width: \">KEADAAN PER $KeadaanAkhir</td>
        </tr>
		<tr>
			<td rowspan = \"2\" style=\"text-align: center; font-weight: bold; width: \">JUMLAH</td>
			<td rowspan = \"2\"  style=\"text-align: center; font-weight: bold; width: \">NILAI (Rp.)</td>
			<td colspan =\"2\" style=\"text-align: center; font-weight: bold; width: \">BERKURANG</td>
			<td colspan =\"2\" style=\"text-align: center; font-weight: bold; width: \">BERTAMBAH</td>
			<td rowspan = \"2\" style=\"text-align: center; font-weight: bold; width: \">JUMLAH</td>
			<td rowspan = \"2\" style=\"text-align: center; font-weight: bold; width: \">NILAI (Rp.)</td>
        </tr>
		<tr>
			<td style=\"text-align: center; font-weight: bold; width: \">JUMLAH</td>
			<td style=\"text-align: center; font-weight: bold; width: \">NILAI (Rp.)</td>
			<td style=\"text-align: center; font-weight: bold; width: \">JUMLAH</td>
			<td style=\"text-align: center; font-weight: bold; width: \">NILAI (Rp.)</td>
		</tr>
        </thead>
        <tbody>
		<tr>
			<td>&nbsp;</td>
			<td style=\"text-align: left; font-weight: bold;\">ASET TETAP</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>";
    
    // $no =1;
    // echo "total all".$totALL;
    foreach ($value as $keys => $data)
    {	
		// pr($keys);
		$exp = explode('_',$keys);
		$kode_1_parent = $exp[0];
		$kode_2_parent = end($exp);
		//tahun aktif - 1
		$TotalNilai = $this->get_TotalNilaiNeraca($skpd_id,$kode_1_parent,$tglawalperolehan,$tglAkhirMutasiAwal);
		$TotalNilaiFix=number_format($TotalNilai[0],2,",",".");
		$TotalJmlFix=number_format($TotalNilai[1],0,",",".");
		
		//tahun aktif
		$exeTempTable_getTotal = $this->tempTableMutasi($skpd_id,$kode_1_parent,$tglawalperolehan,$tglakhirperolehan);
		$TotalNilai_Mutasi = $this->get_TotalNilaiNeraca($skpd_id,$kode_1_parent,$tglawalperolehan,$tglakhirperolehan);
		$TotalNilaiFix_Mutasi =number_format($TotalNilai_Mutasi[0],2,",",".");
		$TotalJmlFix_Mutasi=number_format($TotalNilai_Mutasi[1],0,",",".");
		
		if($keys != '07_Aset Lainnya'){
			$totalALL = $totalALL + $TotalNilai[0];
			$jmlALL = $jmlALL + $TotalNilai[1];
			$header = "";
		}else{
			
			$header="
			<tr>
				<td colspan = \"2\" align=\"center\" style=\"font-weight: bold;\">TOTAL ASET TETAP</td>
				<td align=\"right\" style=\"font-weight: bold;\">".number_format($jmlALL,2,",",".")."</td>
				<td align=\"right\" style=\"font-weight: bold;\">".number_format($totalALL,2,",",".")."</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
				<td align=\"right\" style=\"font-weight: bold;\">-</td>
			</tr>";
			  $totalALL = $TotalNilai[0];
			  $jmlALL = $TotalNilai[1];
			  $header.="<tr>
				<td>&nbsp;</td>
				<td style=\"text-align: left; font-weight: bold;\">ASET LAINNYA</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			  </tr>";
		}
		$html .= "$header
				<tr>
					<td style=\"text-align: center; font-weight: bold;\">$kode_1_parent</td>
					<td style=\"text-align: left; font-weight: bold;\">$kode_2_parent</td>
					<td style=\"text-align: center;\">$TotalJmlFix</td>
					<td style=\"text-align: center;\">$TotalNilaiFix</td>
					<td style=\"text-align: center;\">&nbsp;</td>
					<td style=\"text-align: center;\">&nbsp;</td>
					<td style=\"text-align: center;\">&nbsp;</td>
					<td style=\"text-align: center;\">&nbsp;</td>
					<td style=\"text-align: center;\">$TotalJmlFix_Mutasi</td>
					<td style=\"text-align: center;\">$TotalNilaiFix_Mutasi</td>
				  </tr>";
        
        foreach ($data as $index => $value)
        {
		// pr($value);
		$exp2 = explode('_',$index);
		$kode_1_child = $exp2[0];
		$kode_2_child = end($exp2);
		// pr($value[0]);
		$val =count($value[0]);
		 
		if($val == 2){
			$hit = 2;
				
			$nilai_1 =$value[0][0];
			$nilai_2 =$value[0][1];
			$ex_1 = explode("_",$nilai_1);
			// pr($ex_1);
				$jumlah_1 = $ex_1[0];
				$nilai_1= $ex_1[1];	
			$ex_2 = explode("_",$nilai_2);
			// pr($ex_2);
				$jumlah_2 = $ex_2[0];
				$nilai_2 = $ex_2[1];	
			$jmlFix = ($jumlah_1) + ($jumlah_2);
			$nilaiFix = ($nilai_1) + ($nilai_2);
		}else{
			$hit = 1;
			// echo "hit =".$hit; 
			$nilai_1 =$value[0][0];
			$ex_1 = explode("_",$nilai_1);
				$jumlah_1 = $ex_1[0];
				$nilai_1= $ex_1[1];
			$jmlFix = $jumlah_1;
			$nilaiFix = $nilai_1;	
		}
		// echo $jmlFix;
		// echo "<br>";
		// echo $nilaiFix;
		// echo "<br>";
		
				/*
				skenario cek mutasi u/berkurang atau bertambah neraca
				1.panggil tempTablemutasi
				2.panggil fungsi berdasarkan $kode_1_child (contoh : 01.01)
				*/
				//start
				/*$tmp[] = $kode_1_child;
				$lastKode = end($tmp);
				if(count($tmp) == 1){*/
					//gol tanah pertama kali
					// echo "gol =".$lastKode;
					// echo "<br>";
					$exeTempTable = $this->tempTableMutasi($skpd_id,$kode_1_child,$tglawalperolehan,$tglakhirperolehan);
				/*}else{
					$getKodeFirst = explode('.',$kode_1_child);
					$getKodeLast = explode('.',$lastKode);
					$last = end($getKodeLast);
					if($getKodeFirst[0] != $getKodeLast[0]){
						//exe temp table
						echo "jika beda golongan aja".$last;
						echo "<br>";
						$exeTempTable = $this->tempTableMutasi($skpd_id,$kode_1_child,$tglawalperolehan,$tglakhirperolehan);
					}
				
				}*/
				$TotalNilaiMutasi = $this->get_TotalNilaiNeracaMutasi($skpd_id,$kode_1_child,$tglawalperolehan,$tglakhirperolehan);
				$nilaiFixMutasi = $TotalNilaiMutasi[0];
				$jmlFixMutasi = $TotalNilaiMutasi[1];
				
				$jmlFix_final=number_format($jmlFixMutasi,0,",",".");
				$nilaiFix_final=number_format($nilaiFixMutasi,2,",",".");
				
				if($nilaiFixMutasi > $nilaiFix){
					//bertambah
					$jmlFix_bertambah = $jmlFixMutasi - $jmlFix;
					$nilaiFix_bertambah = $nilaiFixMutasi - $nilaiFix;
					
					//berkurang
					$jmlFix_berkurang = 0;
					$nilaiFix_berkurang = 0;
				}elseif($nilaiFixMutasi < $nilaiFix){
					//bertambah
					$jmlFix_bertambah = 0;
					$nilaiFix_bertambah = 0;
					
					//berkurang
					$jmlFix_berkurang = abs($jmlFixMutasi - $jmlFix);
					$nilaiFix_berkurang = abs($nilaiFixMutasi - $nilaiFix);
				
				}else{
					//bertambah
					$jmlFix_bertambah = 0;
					$nilaiFix_bertambah = 0;
					
					//berkurang
					$jmlFix_berkurang = 0;
					$nilaiFix_berkurang = 0;
				}
				//jml Bertambah
					$jmlFix_bertambah_Total +=$jmlFix_bertambah;
					$nilaiFix_bertambah_Total +=$nilaiFix_bertambah;
				//jml Berkurang
					$jmlFix_berkurang_Total +=$jmlFix_berkurang;
					$nilaiFix_berkurang_Total +=$nilaiFix_berkurang;
				
				//end
				
				 $html .= "<tr>
						<td style=\"text-align: right;\">$kode_1_child</td>
                        <td style=\"text-align: ;\">$kode_2_child</td>
						
                        <td style=\"text-align: center;\">".number_format($jmlFix,0,",",".")."</td>
                        <td style=\"text-align: right;\">".number_format($nilaiFix,2,",",".")."</td>
						
						<td style=\"text-align: center;\">".number_format($jmlFix_berkurang,0,",",".")."</td>
                        <td style=\"text-align: right;\">".number_format($nilaiFix_berkurang,2,",",".")."</td>
						
						<td style=\"text-align: center;\">".number_format($jmlFix_bertambah,0,",",".")."</td>
                        <td style=\"text-align: right;\">".number_format($nilaiFix_bertambah,2,",",".")."</td>
						
						<td style=\"text-align: center;\">$jmlFix_final</td>
                        <td style=\"text-align: right;\">$nilaiFix_final</td>
                      </tr>";
				 if($kode_1_child == '07.24'){
					$html .="<tr>
								<td colspan = \"2\" align=\"center\" style=\"font-weight: bold;\">TOTAL ASET LAINNYA</td>
								<td align=\"right\" style=\"font-weight: bold;\">".number_format($jmlALL,2,",",".")."</td>
								<td align=\"right\" style=\"font-weight: bold;\">".number_format($totalALL,2,",",".")."</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
								<td align=\"right\" style=\"font-weight: bold;\">-</td>
							</tr>
							</table>
							</tbody>
						</body>
					</html>";
				 }	  
					  
                // $total_perolehan += ($nilaiFix);
				
        }
        // $no++;
        $jmlFix = 0;
		$nilaiFix = 0;
    }
		/*$html .="
			
			<tr>
				<td colspan = \"3\" align=\"center\" style=\"font-weight: bold;\">TOTAL</td>
				<td align=\"right\" style=\"font-weight: bold;\">".number_format($total_perolehan,2,",",".")."</td>
			</tr>
			</table>
			</tbody>
		</body>
	</html>"; */ 
	$total_perolehan = 0;
	// $totALL = $totalALL;	
    $hasil_html[]=$html;
}
return $hasil_html;
}		
						}else{
							$no = 1;
						}
					// pr($data);
					foreach($data as $key => $hsl_data)
					{    
						?>
					<tr class="gradeA">
						<td><?php echo "$no.";?></td>
						<td class="checkbox-column">	 
						<input type="checkbox" class="checkbox" onchange="enable()" name="ValidasiPenggunaan[]" value="<?php echo $hsl_data['Penggunaan_ID'];?>" 
													<?php for ($j = 0; $j <= count($data['asetList']); $j++){
														if ($data['asetList'][$j]==$hsl_data['Penggunaan_ID']) echo 'checked';}?>/>
						</td>
						<td><?php echo $hsl_data['NoSKKDH'];?></td>
						<td><?php $change=$hsl_data['TglSKKDH']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
						<td><?php echo $hsl_data['Keterangan'];?>
						</td>
					</tr>
					 <?php $no++; //$pid++; 
											}
										} ?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
					</tr>
															if (!$query) {
																die('Gagal query: ' . mysql_error());
															  }
															$total = mysql_num_rows($query);
															$i =1;
															if($total > 0){
															while($row = mysql_fetch_array($query)){
																$no_skh = $row['NoSKHapus'];
																$tglhps = $row['TglHapus'];
																$alasan = $row['AlasanHapus'];
															
															?>
															<tr id="row_666">
															  <td class="listdata" align="center" valign="top"><?php echo $i; ?></td>
															  <td class="listdata" align="left" valign="top"><?php echo $no_skh; ?></td>
															  <td class="listdata" align="right" valign="top"><?php echo format_tanggal_db3($tglhps);?></td>
															   <td class="listdata" align="left" valign="top"><?php echo $alasan; ?></td>
															  <td class="listdata" align="center" valign="top"><a class="listdata" title="edit data penghapusan barang" href="penetapan_penghapusan_tambah_data.php">Edit</a>
																											   |<a class="listdata" href="javascript:void()" style="cursor: pointer;" title="hapus data penghapusan barang" onclick="HapusPenghapusan( 'menuid=37&amp;iddttrfstart=03/07/2012&amp;iddttrfend=25/07/2012&amp;idgetsatker=&amp;idsatker=(semua SKPD)&amp;idnotrf=666&amp;exec=del&amp;delid=666');">Hapus</a></td>
															</tr>
                                                            
                                                            <?php
															$i++;
																}												
															}
															?>
															<?php 
															  }
															  else
															  {
																  echo '<tr>';
     <td colspan="4">&nbsp;</td>
 </tr>
  <tr>
 <!-- Nomor BASP -->
         <td valign="top" align="left" width="120px">
             Nomor&nbsp;BAST
         </td>
         <td valign="top" align="left" >
             <input type="text" name="bupt_bast_nobast" required="required" value="<?php echo "$row->NoBASP";?>">
         </td>
         <td valign="top" align="left" width="120px">
             Tanggal&nbsp;BAST
         </td>
         <!-- Tanggal BASP -->
         <td valign="top" align="left" >
             <input type="text" name="bupt_bast_tglbast" id="tanggal13" required="required" value="<?php $change2=$row->TglBASP; $change3=  format_tanggal_db3($change2); echo "$change3";?>">
         </td>
 </tr>
 <tr>
     <td colspan="4">&nbsp;</td>
 </tr>
 <tr>
         <td valign="top" align="left">
             Lokasi&nbsp;Serah&nbsp;Terima
         </td>
         <td valign="top" align="left" colspan="3"><input type="text" name="LokasiBASP" required="required" value="<?php echo "$row->LokasiBASP";?>">
         </td>
 </tr>
 <tr>
     <td colspan="4">&nbsp;</td>
 </tr>
        while ($row = mysql_fetch_array($query)) {
            $no_skh = $row['NoSKHapus'];
            $tglhps = $row['TglHapus'];
            $alasan = $row['AlasanHapus'];
            ?>
															<tr id="row_666">
															  <td class="listdata" align="center" valign="top"><?php 
            echo $i;
            ?>
</td>
															  <td class="listdata" align="left" valign="top"><?php 
            echo $no_skh;
            ?>
</td>
															  <td class="listdata" align="right" valign="top"><?php 
            echo format_tanggal_db3($tglhps);
            ?>
</td>
															   <td class="listdata" align="left" valign="top"><?php 
            echo $alasan;
            ?>
</td>
															  <td class="listdata" align="center" valign="top"><a class="listdata" title="edit data penghapusan barang" href="penetapan_penghapusan_tambah_data.php">Edit</a>
																											   |<a class="listdata" href="javascript:void()" style="cursor: pointer;" title="hapus data penghapusan barang" onclick="HapusPenghapusan( 'menuid=37&amp;iddttrfstart=03/07/2012&amp;iddttrfend=25/07/2012&amp;idgetsatker=&amp;idsatker=(semua SKPD)&amp;idnotrf=666&amp;exec=del&amp;delid=666');">Hapus</a></td>
															</tr>
                                                            
                                                            <?php 
            $i++;
        }
    }
    ?>
												<input type="checkbox" class="checkbox" onchange="enable()" name="ValidasiPenghapusan[]" value="<?php echo $value['Penghapusan_ID'];?>" <?php for ($j = 0; $j <= count($data['asetList']); $j++){if ($data['asetList'][$j]==$value['Penghapusan_ID']) echo 'checked';}?>/>

												<?php
											}else{
												if ($data['asetList']){
												if (in_array($value['Aset_ID'], $data['asetList'])){
												?>
												<input type="checkbox" class="checkbox" onchange="enable()" name="ValidasiPenghapusan[]" value="<?php echo $value['Penghapusan_ID'];?>" <?php for ($j = 0; $j <= count($data['asetList']); $j++){if ($data['asetList'][$j]==$value['Penghapusan_ID']) echo 'checked';}?>/>
												<?php
													}	
												}
											}
						
						?>                                            </td>
                                            <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php echo "$value[NoSKHapus]";?></td>
                                            <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php $change=$value['TglHapus']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                                            <td align="center" style="border: 1px solid #dddddd; height:100px; color: #; font-weight: ;"><?php echo "$value[AlasanHapus]";?></td>
                                        </tr>
                                        </tr>
                                                <?php $nomor++; }} ?>
                                    </tbody>
                                </table>
                                </form>
                                    
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <?php
							
							if ($_GET['pid'] == 1) $no = 1; else $no = $paging;
							if (!empty($data['dataArr']))
							{
								$disabled = '';
								$pid = 0;
						foreach($data['dataArr'] as $key => $value)
							{
				   
					?>
						  
					<tr class="gradeA">
						<td><?php echo "$no.";?></td>
						<td><?php echo $value['NoBASP'];?></td>
						<td>
							<?php $change=$value['TglBASP']; $change2=  format_tanggal_db3($change); echo "$change2";?>
						</td>
						<td><?php echo $value['LokasiBASP'];?></td>
						<td>	
						 <a href="<?php echo "$url_rewrite/report/template/PEMINDAHTANGANAN/";?>tes_class_penetapan_aset_yang_dipindahkan_validasi.php?menu_id=45&mode=1&id=<?php echo $value['BASP_ID'];?>" target="_blank">Cetak</a>
						</td>
					</tr>
					 <?php 
						$no++; 
						// $pid++; 
						}} ?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
			?>
					</tr>
			</table>
			<br/>
			<table width='100%'>
				<tr>
					<td width="200px">Nomor SK Penghapusan</td>
					<td><input type="text" style="width: 150px;" id="idnoskhapus" name="bup_pp_noskpenghapusan" value="<?php echo $row[NoSKHapus]?>"></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>Tanggal SK Penghapusan</td>
					<td> <input name="bup_pp_tanggal" style="width: 150px;" type="text" id="tanggal12" value="<?php $change=$row[TglHapus]; $change2=  format_tanggal_db3($change); echo "$change2";?>"/></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>Keterangan Penghapusan</td>
					<td><textarea rows="4" cols="50" id="idinfohapus" name="bup_pp_get_keterangan"><?php echo "$row[AlasanHapus]";?></textarea></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
						<td>
							<?php
							if($row['SatkerUsul']){ echo "[".$row['SatkerUsul']."]";}
							?>
							<br/>
							<?php echo $row['NamaSatkerUsul'];?>
						</td>
						<td>
							<?php 
							$jmlUsul=explode(",", $row[Usulan_ID]);
							echo count($jmlUsul);

							?>
						
						</td>
						<td><?php $change=$row[TglHapus]; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
						<td><?php echo "$row[AlasanHapus]";?></td>
						<td align="center">	
						 <!--<a href="<?php echo "$url_rewrite/report/template/PENGHAPUSAN/";?>tes_class_penetapan_aset_yang_dihapuskan.php?menu_id=39&mode=1&id=<?php echo "$row[Penghapusan_ID]";?>" target="_blank">Cetak</a> ||--> 
						<a href="<?php echo "$url_rewrite/module/penghapusan/"; ?>dftr_review_edit_penetapan_usulan_validasi_pmd.php?id=<?php echo "$row[Penghapusan_ID]";?>" class="btn btn-success"><i class="fa fa-pencil-square-o"></i> View</a>&nbsp;
						<!-- <a href="<?php echo "$url_rewrite/module/penghapusan/"; ?>penetapan_penghapusan_daftar_hapus_pmd.php?id=<?php echo "$row[Penghapusan_ID]";?>" class="btn btn-danger"> <i class="fa fa-trash"></i>
 Hapus</a>   -->
						</td>
					</tr>
					<?php $nomor++;} }?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
                                 </tr>
                                 <tr align="left">
                                     <td>Status</td>
                                     <td>&nbsp;</td>
                                     <td>&nbsp;</td>
                                     <td>:  </td>
                                     <td>---</td>
                                 </tr>
                             </table>
                         </td>
                     </tr>
                 </table>
             </td>
             <td align="center" style="border: 1px solid #004933; height:100px; color: red; font-weight: bold;"><?php echo "$value->NoSKKDH";?></td>
             <td align="center" style="border: 1px solid #004933; height:100px; color: red; font-weight: bold;"><?php $date=date('d/m/Y'); echo "$date";?></td>
             <td align="center" style="border: 1px solid #004933; height:100px; color: red; font-weight: bold;"><?php $change2=$value->TglSelesai; $change3=format_tanggal_db3($change2); echo "$change3";?></td>
         </tr>
         <?php $i++; } }?>
         <tr style="background-color:#004933; color:white; height:20px;">
             <th width="20px" align="center" style="border: 1px solid #004933;">No</th>
             <th width="100px" align="center" style="border: 1px solid #004933;">Pilihan</th>
             <th width="300px" align="left" style="border: 1px solid #004933;">&nbsp;Informasi Aset</th>
             <th width="100px" align="center" style="border: 1px solid #004933;">No SKKDH Pemanfaatan</th>
             <th width="100px" align="center" style="border: 1px solid #004933;">Tgl Sekarang</th>
             <th width="100px" align="center" style="border: 1px solid #004933;">Tgl Habis Pemanfaatan</th>
         </tr>
     </tbody>
 </table>
     &nbsp;
     <?php
         $total_halaman = ceil($total_record / $jmlperhalaman);
                                                                </tr>
                                                                <tr align="left">
                                                                    <td>Status</td>
                                                                    <td>&nbsp;</td>
                                                                    <td>&nbsp;</td>
                                                                    <td></td>
                                                                    <td>-</td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td align="center" style="background-color: #; border: 1px solid #dddddd; height:100px; color: ; font-weight: bold;"><?php echo "$value->NoSKKDH";?></td>
                                            <td align="center" style="background-color: #; border: 1px solid #dddddd; height:100px; color: ; font-weight: bold;"><?php $date=date('d/m/Y'); echo "$date";?></td>
                                            <td align="center" style="background-color: #; border: 1px solid #dddddd; height:100px; color: ; font-weight: bold;"><?php $change2=$value->TglSelesai; $change3=format_tanggal_db3($change2); echo "$change3";?></td>
                                        </tr>
                                        <?php $no++; } }
                                        else 
                                        {
											$disabled = 'disabled';
										}
                                        ?>
                                         <tfoot>
											<tr>
												<th width="20px" align="center" style="background-color: #eeeeee; border:1px solid #dddddd;">No</th>
												<th width="100px" align="center" style="background-color: #eeeeee; border: 1px solid #dddddd;">Pilihan</th>
												<th width="300px" align="left" style="background-color: #eeeeee; border: 1px solid #dddddd;">&nbsp;Informasi Aset</th>
												<th width="100px" align="center" style="background-color: #eeeeee; border: 1px solid #dddddd;">No SKKDH Pemanfaatan</th>
												<th width="100px" align="center" style="background-color: #eeeeee; border: 1px solid #dddddd;">Tgl Sekarang</th>
												<th width="100px" align="center" style="background-color: #eeeeee; border: 1px solid #dddddd;">Tgl Habis Pemanfaatan</th>
    $pid = 0;
    $i = 1;
    foreach ($data['dataArr'] as $key => $hsl_data) {
        ?>
                                    <tr>
                                        <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php 
        echo "{$no}.";
        ?>
</td>
                                        <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php 
        echo "{$hsl_data['NoBASP']}";
        ?>
</td>
                                        <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php 
        $change = $hsl_data[TglBASP];
        $change2 = format_tanggal_db3($change);
        echo "{$change2}";
        ?>
</td>
                                        <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php 
        echo "{$hsl_data['LokasiBASP']}";
        ?>
</td>
                                        <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;">
                                            <a href="<?php 
        echo "{$url_rewrite}/report/template/PEMINDAHTANGANAN/";
        ?>
tes_class_penetapan_aset_yang_dipindahkan_validasi.php?menu_id=44&mode=1&id=<?php 
        echo "{$hsl_data['BASP_ID']}";
        ?>
" target="_blank">Cetak</a> || <a href="<?php 
													<td></td>
													<td>-</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
						</td>
						<td>	
							<?php echo "$value->NoSKKDH";?>
						</td>
						<td>	
							<?php $date=date('d/m/Y'); echo "$date";?>
						</td>
						<td>
							<?php $change2=$value->TglSelesai; $change3=format_tanggal_db3($change2); echo "$change3";?>
						</td>
					</tr>
					 <?php $no++; } }
						else 
						{
							$disabled = 'disabled';
						}
						?>
				</tbody>
				<tfoot>
					<tr>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
                     //print_r($data['dataArr']);
                     echo '</pre>';
                     
                     if ($_GET['pid'] == 1) $no = 1; else $no = $paging;
                     if (!empty($data['dataArr']))
                     {
                         $disabled = '';
                         $pid = 0;
                 foreach($data['dataArr'] as $key => $value)
                     {
            
             ?>
             <tr>
                 <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php echo "$no.";?></td>
                 <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php echo $value['NoBASP'];?></td>
                 <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php $change=$value['TglBASP']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                 <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;"><?php echo $value['LokasiBASP'];?></td>
                 <td align="center" style="border: 1px solid #004933; height:100px; color: #cc3333; font-weight: bold;">
                     <a href="<?php echo "$url_rewrite/report/template/PEMINDAHTANGANAN/";?>tes_class_penetapan_aset_yang_dipindahkan.php?menu_id=43&mode=1&id=<?php echo $value['BASP_ID'];?>" target="_blank">Cetak</a> || <a href="<?php echo "$url_rewrite/module/pemindahtanganan/"; ?>tampil_pemindahtanganan_daftar_hapus.php?id=<?php echo $value['BASP_ID'];?>">Hapus</a> || <a href="<?php echo "$url_rewrite/module/pemindahtanganan/"; ?>tampil_pemindahtanganan_daftar_edit.php?id=<?php echo $value['BASP_ID'];?>">Edit</a>
                 </td>
             </tr>
             <?php $no++; $pid++; }} ?>
         </tbody>
     </table>
 &nbsp;
 <?php
 /*
     $total_halaman = ceil($total_record / $jmlperhalaman);
     echo "<center><b style='color:#004933;'>Halaman :</b><br />";
 ?>
     <div class="paging">
                                                                        echo '<pre>';
                                                                        //print_r($data['dataArr']);
                                                                        echo '</pre>';
                                                                        
                                                                        $nomor = 1;
                                                                        if (!empty($data['dataArr']))
                                                                        {
                                                                            $disabled = '';
                                                                            $pid = 0;
                                                                        foreach($data['dataArr'] as $key => $row)
                                                                            {
                                                                            ?>
                                                                            <tr>
                                                                                <td align="center" style="border: 2px solid #dddddd;"><?php echo "$nomor";?></td>
                                                                                <td align="center" style="border: 2px solid #dddddd;"><?php echo "$row[NoBAPemusnahan]";?></td>
                                                                                <td align="center" style="border: 2px solid #dddddd;"><?php $change=$row['TglBAPemusnahan']; $change2=  format_tanggal_db3($change); echo "$change2";?></td>
                                                                                <td align="center" style="border: 2px solid #dddddd;">
                                                                                    <a href="<?php echo "$url_rewrite/module/pemusnahan/"; ?>penetapan_pemusnahan_daftar_hapus.php?id=<?php echo "$row[BAPemusnahan_ID]";?>">Hapus</a> || <a href="<?php echo "$url_rewrite/module/pemusnahan/"; ?>penetapan_pemusnahan_daftar_edit.php?id=<?php echo "$row[BAPemusnahan_ID]";?>">Edit</a>
                                                                                </td>
                                                                            </tr>
                                                                            <?php $nomor++;} }?>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
																		<div class="spacer"></div>
															<!-- End Frame -->
                                                                <?php
                                                                /*
                                                                    $total_halaman = ceil($total_record / $jmlperhalaman);
                                                                    echo "<center><b style='color:#004933;'>Halaman :</b><br />";
                                                                ?>