
<style>
#header {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

#header td, #customers th {
 
  padding:4px;
  font-size:10px;
}

#header tr:nth-child(even){background-color: #ffffff;}

#header tr:hover {background-color: #ddd;}

#header th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;
}
</style>




<style>
#scan {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

#scan td, #scan th {
 
  padding: 8px;
  font-size:11px;
}

#scan tr:nth-child(even){background-color: #ffffff;}

#scan tr:hover {background-color: #ddd;}

#scan th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;
}
</style>


<style>
#scan {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

#scan td, #scan th {
  border-collapse: collapse;
  padding: 8px;
  font-size:11px;
}

#scan tr:nth-child(even){background-color: #ffffff;}

#scan tr:hover {background-color: #ddd;}

#scan th {
  border-collapse: collapse;
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;
}
</style>



<style>
#details {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 50%;
}

#details td, #details th {
 
  padding: 8px;
  font-size:11px;
}

#details tr:nth-child(even){background-color: #ffffff;}

#details tr:hover {background-color: #ffffff;}

#details th {
  padding-top: 12px;
 font-style:bold;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;
}
</style>

<style>
#sign {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

#sign td, #sign th {

  padding: 8px;
  font-size:11px;
  text-align: center;
}

#sign tr:nth-child(even){background-color: #ffffff;}

#sign tr:hover {background-color: #ddd;}

#sign th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;
}
</style>



<style>
#title {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 50%;
}

#title td, #title th {
 
  padding:4px;
  font-size:12px;
  border: 0px solid #fff;
}

#title tr:nth-child(even){background-color: #ffffff;}

#title tr:hover {background-color: #ddd;}

#title th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;

}
</style>

<style>
#details {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width:80%;

}

#details td, #details th {
 
  padding:4px;
  font-size:12px;
  border: 0px solid #ddd;
}

#details tr:nth-child(even){background-color: #ffffff;}

#details tr:hover {background-color: #ddd;}

#details th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  padding:4px;
  color:black;

}
</style>










<table id="header">
  <tr>
    <th rowspan="4"  style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
    <th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
  </tr>
  <tr>
    <td>{{ $cawangan_detail['namacaw'] }}</td>
    <td></td>
  </tr>
  <tr>
    <td>{{ $cawangan_detail['alamat1'] }}</td>
    <td></td>
  </tr>
  <tr>
    <td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
    <td></td>
  </tr>
</table>
<br>
<br>
<br>


<table id="title">
<tr>
<th> </th><th> LAPORAN AGING BULANAN   </th>
</tr>
<tr><td style="width:60px"> <b> TARIKH :</b> </td><td> {{$tarikh_aging}} </td>

</table>

<br>




 
<table id="details">
<tr>
<th style="width:30px">TEMPOH </th><th style="width:45px"> BIL PEMBIAYAAN </th><th style="width:45px"> JUM PINJAMAN (RM) </th><th style="width:45px"> PERATUSAN % </th>
</tr>




 <tr>


 <td style="width:30px" >  1 BULAN</td><td style="width:45px"> @foreach($data as $index=>$var) {{$var['a']}}@endforeach</td><td style="width:45px"> @foreach($data as $index=>$var) {{ number_format($var['b'],2)}}@endforeach </td>
 <td>
 @foreach($data as $index=>$var) @foreach($data2 as $in=>$vr){{  round(($var['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td>

  


 


 </tr>
 <tr>


<td style="width:30px">  2 BULAN</td><td style="width:45px"> @foreach($data_2 as $index_2=>$var2) {{$var2['a']}}@endforeach</td><td style="width:45px" > @foreach($data_2 as $index_2=>$var2) {{ number_format($var2['b'],2)}}@endforeach </td>
<td>  @foreach($data_2 as $index=>$var2) @foreach($data2 as $in=>$vr){{  round(($var2['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td>

 


</tr>

<tr>
<td style="width:30px" >  3 BULAN</td><td style="width:45px"> @foreach($data_3 as $index_3=>$var3) {{$var3['a']}}@endforeach</td><td style="width:45px"> @foreach($data_3 as $index_2=>$var2) {{ number_format($var3['b'],2)}}@endforeach </td>
<td> @foreach($data_3 as $index=>$var3) @foreach($data2 as $in=>$vr){{ round( ($var3['a'] /$vr['a'])*100 ,2) }}@endforeach @endforeach   </td>
 
</tr>



<tr>
<td style="width:30px">   4 BULAN</td><td style="width:45px"> @foreach($data_4 as $index_4=>$var4) {{$var4['a']}}@endforeach</td><td style="width:45px"> @foreach($data_4 as $index_4=>$var4) {{ number_format($var4['b'],2)}}@endforeach </td>
<td>  @foreach($data_4 as $index=>$var4) @foreach($data2 as $in=>$vr){{  round(($var4['a'] /$vr['a'])*100 ,2) }}@endforeach @endforeach  </td>
 
</tr>


<tr>
<td style="width:30px" >   5 BULAN</td><td style="width:45px">    @foreach($data_5 as $index_5=>$var5) {{$var5['a']}}@endforeach                   </td><td style="width:45px">@foreach($data_5 as $index_5=>$var5) {{ number_format($var5['b'],2)}}@endforeach  </td>
<td>  @foreach($data_5 as $index=>$var5) @foreach($data2 as $in=>$vr){{ round( ($var5['a'] /$vr['a'])*100 ,2) }}@endforeach @endforeach  </td>
 
</tr>


<tr>

<td style="width:30px">   6 BULAN</td><td style="width:45px">    @foreach($data_6 as $index_6=>$var6) {{$var6['a']}}@endforeach                   </td><td style="width:45px">@foreach($data_6 as $index_6=>$var6) {{ number_format($var6['b'],2)}}@endforeach  </td>
<td> @foreach($data_6 as $index=>$var6) @foreach($data2 as $in=>$vr){{  round(($var6['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach   </td>
 
</tr>


<tr>

<td style="width:30px" >   7 BULAN</td><td style="width:45px">     @foreach($data7 as $index7=>$var7) {{$var7['a']}}@endforeach                      </td><td style="width:45px">   @foreach($data7 as $index7=>$var7) {{ number_format($var7['b'],2)}}@endforeach     </td>
<td>  @foreach($data7 as $index=>$var7) @foreach($data2 as $in=>$vr){{ round( ($var7['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td>
 

</tr>



<tr>

<td style="width:30px">   8 BULAN</td><td style="width:45px">     @foreach($data_8 as $index_8=>$var8) {{$var8['a']}}@endforeach                      </td><td style="width:45px">  @foreach($data_8 as $index_8=>$var8) {{ number_format($var8['b'],2)}}@endforeach    </td>
<td>  @foreach($data_8 as $index=>$var8) @foreach($data2 as $in=>$vr){{ round( ($var8['a'] /$vr['a'])*100 ,2) }}@endforeach @endforeach  </td>
 
 
</tr>


<tr>

<td style="width:30px">    9 BULAN</td><td style="width:45px">     @foreach($data_9 as $index_9=>$var9) {{$var9['a']}}@endforeach                      </td><td style="width:45px">  @foreach($data_9 as $index_9=>$var9) {{ number_format($var9['b'],2)}}@endforeach    </td>
<td>  @foreach($data_9 as $index=>$var9) @foreach($data2 as $in=>$vr){{  round(($var9['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td>
 
 
</tr>



<tr>

<td style="width:30px" >    10  BULAN</td><td style="width:45px">     @foreach($data_10 as $index_10=>$var10) {{$var10['a']}}@endforeach                      </td><td style="width:45px">  @foreach($data_10 as $index_10=>$var10) {{number_format($var10['b'],2)}}@endforeach    </td>
<td>  @foreach($data_10 as $index=>$var10) @foreach($data2 as $in=>$vr){{ round( ($var10['a'] /$vr['a'])*100 ,2)  }}@endforeach @endforeach  </td>
 
 
</tr>

<tr>

<td style="width:30px" >    11  BULAN</td><td style="width:45px">     @foreach($data_11 as $index_11=>$var11) {{$var11['a']}}@endforeach                      </td><td style="width:45px">  @foreach($data_11 as $index_11=>$var11) {{number_format($var11['b'],2)}}@endforeach    </td>
<td>  @foreach($data_11 as $index=>$var11) @foreach($data2 as $in=>$vr){{ round(($var11['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td> 
</tr>
<tr>
<td style="width:30px">    12  BULAN</td><td style="width:45px">     @foreach($data_12 as $index_12=>$var12) {{$var12['a']}}@endforeach  </td><td style="width:45px">  @foreach($data_12 as $index_12=>$var12) {{ number_format($var12['b'],2)}}@endforeach    </td>
<td>  @foreach($data_12 as $index=>$var) @foreach($data2 as $in=>$vr){{ round (($var12['a'] /$vr['a'])*100,2)  }}@endforeach @endforeach  </td>
 
</tr>

<tr>
<td style="width:30px">    12 > BULAN</td><td style="width:45px">     @foreach($data_13 as $index_13=>$var13) {{$var13['a']}}@endforeach   </td><td style="width:45px">  @foreach($data_13 as $index_13=>$var13) {{ number_format($var13['b'],2)}}@endforeach    </td>
<td>   @foreach($data_13 as $index=>$var13) @foreach($data2 as $in=>$vr){{  round(($var13['a'] /$vr['a'])*100, 2)  }}@endforeach @endforeach </td>
</tr>



<tr>
<td>  </td><td>       </td><td>    </td>
<td>  </td>
</tr>




  <tr>

  <td style="width:30px"> <B>JUMLAH</B></td><td style="width:45px"> @foreach($data2 as $index2=>$var1){{$var1['a']}}
   @endforeach </td><td style="width:45px">  @foreach($data2 as $index2=>$var1){{ number_format($var1['b'],2)}}
   @endforeach          </td><td>  </td>
  </tr>
</table>

<br>
<br>
<br>


<table id="details">
<tr>
<th> </th><th> DISEMAK  </th><th></th> <th> DISAHKAN </th><th></th>
</tr>
 <tr>
 <td></td>
 <td>........................................................</td><td></td>
 <td>......................................................... </td>
 <td> </td>
 </tr>

</table>

<br>