

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
    $(document).ready(function () {
      window.print();
      window.onfocus=function(){ window.close();}
    });
</script>
<style>
/* Red border */
hr.new1 {
  border-top: 1px solid red;
}

/* Dashed red border */
hr.new2 {
  border-top: 1px dashed red;
}

/* Dotted red border */
hr.new3 {
  border-top: 1px dotted red;
}

/* Thick red border */
hr.new4 {
  border: 1px solid red;
}

/* Large rounded green border */
hr.new5 {
  border: 10px solid green;
  border-radius: 5px;
}
</style>

<style>

#cust {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width:20%;
    font-size:12px;
    border: 1px solid black;

  }

  #cust td, #cust th {
    border: 0px solid;
    padding: 3px;
    font-size:10px;
    text-align:right;

  }

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

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

  #cust th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align:right;
    background-color: #d9deda;
    color: black;
    padding:2px;
  }

  #cust {
  margin-left: auto;
  margin-right: 0;
}




</style>











<style>
  hr.new1 {
    border-top: 1px dotted black;
  }
  .khazanah{
    border:1px solid black;
    margin-left:20px;
    padding:10px;
    width : 250px;
    transform: rotate(-90deg);
    font-size:12px;
  }

  #inside {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width:100%;
    font-size:15px;
  }

  #inside td, #inside th {
    border: none;
    padding: 2px;
  }

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

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

  #inside th {
    padding-top: 12px;
    padding-bottom: 10px;
    text-align: left;
    background-color: #4CAF50;
    color: white;
  }




  #semakan {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width:100%;
    margin-top:40px;
    font-size:12px;
  }

  #semakan td, #semakan th {
    border: none;
    padding: 2px;
    text-align: center;
  }

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

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

  #semakan th {
    padding-top: 12px;
    padding-bottom: 10px;
    text-align: left;
    background-color: #4CAF50;
    color: white;
  }










  #salinan {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width:100%;
    font-size:12px;
  }

  #salinan td, #salinan th {
    padding: 2px;
  }


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

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

  #salinan th {
    padding-top: 12px;
    padding-bottom: 10px;
    text-align: right;
    background-color: #ffffff;
    color: black;
    padding:2px;
  }
  #perjanjian {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width: 100%;
    font-size:12px;

  }

  #perjanjian td, #perjanjian th {
    border: 1px solid #ddd;
    padding: 2px;
    font-size:10px;
  }

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

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

  #perjanjian th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #d9deda;
    color: black;
    padding:5px;
  }
  #keuntungan {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width: 100%;
    font-size:12px;

  }

  #keuntungan td, #keuntungan th {
    border: 1px solid #ddd;
    padding: 2px;
    font-size:10px;
  }

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

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

  #keuntungan th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #d9deda;
    color: black;
    padding:2px;
  }

  #payment {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width: 60%;
    font-size:12px;
    border: 1px solid black;

  }

  #payment td, #payment th {
    border: 0px solid;
    padding: 3px;
    font-size:15px;
    text-align: left;

  }

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

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

  #payment th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align:left;
    background-color: #d9deda;
    color: black;
    padding:2px;
  }

  #payment {
  margin-left: auto;
  margin-right: auto;
}

  #akuan td, #akuan th {
    padding: 7px;
    font-size:10px;
    padding:4px;
  }

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

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

  #akuan th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #d9deda;
    color: black;
    padding:3px;
  }
  .page-break{
    page-break-before:always;
  }
  
  .formula{
    font-family: Arial, Helvetica, sans-serif;
    font-size:12px;
  }
  
  #copy_cust {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width:10%;
    font-size:12px;

  }



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

  #copy_cust tr:hover {background-color:#ffffff}

  #copy_cust th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #d9deda;
    color: black;
    padding:4px;
  }


  #copy_cust {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    width: 50%;
    font-size:12px;


  }

  #copy_cust td, #copy_cust th {
    border: 1px solid #ddd;
    padding: 2px;
    font-size:10px;
    text-align:right;
    width: 10%;

  }

  #copy_cust {
    margin-right:0px;margin-left:auto
}





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

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

  #inside th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #d9deda;
    color: black;
    padding:4px;
  }


 
</style>







  <table>

      <td rowspan="4" style="width:50px;"> <img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" >  </td>
      <td rowspan="4"  style="width:50px;"><img src="{{ asset('img/pkb.png') }}" style="width:50px" alt="User Image" class="center" > </td>   




  </table>

  <table id="cust">
<tr>
 <th style="width:5px;"> UNTUK KEGUNAAN PELANGGAN</th>
</tr>
<tr>
<td  style="width:5px;"> RESIT BAYARAN  </td>

</tr>

  </table>

<br>



  <table id="inside">

 <tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> </td>  <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
 </tr>
 <tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> </td>  <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/Y'); echo $date; @endphp</td>
 </tr>

 <tr>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td>  <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b>  {{ $gadai['tempoh'] }} </b></td>
 </tr>

 <tr>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> </td>  <td> </td><td> </td><td> </td><td> </td>
 </tr>

 <tr>
<td colspan="3">No K/P Wakil </td> <td>: @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp </td> <td colspan="3"> </td>  <td> </td><td> </td><td> </td><td> </td>
 </tr>
  </table>
  <br>

<h1 style="float:left;position:absolute;margin-left:100px;">T</h1>

<table id="payment">

<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/Y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman']),2) }} </td>
</tr>
<tr>
  <td style="width:10px">Jumlah Keuntungan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
  </tr>
<tr>
  <td style="width:10px"><b>Jumlah Keseluruhan</b></td><td style="width:5px"> </td><td style="width:10px">:<b> RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }} </b></td>
  </tr>


</table>

<br>





  <table id="semakan">
      <tr>
      <td colspan="3">.................................................... </td> 
      <td></td>    
      <td colspan="3">.................................................... </td>
      <td></td> 
      <td colspan="3">.................................................... </td>
      <td></td> 
      <td colspan="3">.................................................... </td>
</tr>
<tr>

<td colspan="3">DiSemak </td> 
      <td></td>    
      <td colspan="3"> Cagaran Di Keluarkan</td>
      <td></td> 
      <td colspan="3">Cagaran Diterima </td>
      <td></td> 
      <td colspan="3"> Ar-Rahn<br><b>{{ Auth::user()->name }}</b></td>
</tr>
  </table>
  <br>
  <br>
  <hr class="new2"></hr>

<br>
<br>

</table>


<table id="cust">
<tr>
<th style="width:5px;"> UNTUK KEGUNAAN PEJABAT</th>
</tr>
<tr>
<td  style="width:5px;"> RESIT BAYARAN  </td>

</tr>

</table>

<br>
<table id="inside">

<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d>  <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d>  <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp </td>
</tr>

<tr>
<td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d>  <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr>



<tr>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> <t/d>  <td> </td><td> </td><td> </td><td> </td>
</tr>


<tr>
<td colspan="3">No K/P Wakil </td> <td>: @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp</td> <td colspan="3"> <td>  </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>

<h1 style="float:left;position:absolute;margin-left:100px;">T</h1>


<table id="payment">

<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman']),2) }} </td>
</tr>
<tr>
  <td style="width:10px">Jumlah Keuntungan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
  </tr>
<tr>
  <td style="width:10px"><b>Jumlah Keseluruhan</b></td><td style="width:5px"> </td><td style="width:10px">:<b> RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }}</b></td>
  </tr>

</table>

<br>





<table id="semakan">
    <tr>
    <td colspan="3">.................................................... </td> 
    <td></td>    
    <td colspan="3">.................................................... </td>
    <td></td> 
    <td colspan="3">.................................................... </td>
    <td></td> 
    <td colspan="3">.................................................... </td>
</tr>
<tr>

<td colspan="3">DiSemak </td> 
    <td></td>    
    <td colspan="3"> Cagaran Di Keluarkan</td>
    <td></td> 
    <td colspan="3">Cagaran Diterima </td>
    <td></td> 
    <td colspan="3"> Ar-Rahn<br><b>{{ Auth::user()->name }}</b></td>

</tr>
</table>
<br>
