<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;
}
.box{
  border:1px solid black;
  padding:3px;
}
</style>
<link rel="stylesheet" href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="{{ asset('vendor/bootstrap/js/bootstrap.min.js') }}"></script>

<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>
<p style="font-weight: bold;margin-left: 10px;">Tarikh Mula: {{ $mula_date }}  <span style="margin-left:20px;">Tarikh Hingga : {{ $hingga_date }}</span> <span style="margin-left:20px;">Tarikh Cetak : {{ $tarikh_cetak }}</span></p>

<div class="row p-4">
  <div class="col-6 box">
    <div class="row form-group">
      <div class="col-12">
        <p><b>A) LAPORAN TERKUMPUL</b></p>
      </div>
      <div class="col-6">1. PEMBIAYAAN</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['total_gadai'],2) }}</div>
      <div class="col-6">2. Penyelesaian Pem.</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['total_tebus'],2) }}</div>
      <div class="col-6">3. ANSURAN PEMBIAYAAN</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['total_ansuran'],2) }}</div>
      <div class="col-6">4. BAYARAN ONLINE</div>
      <div class="col-6"> RM 0.00 </div>
      <div class="col-6">5. KEUNTUNGAN</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['total_keuntungan'],2) }}</div>
      <div class="col-6">6. KEUNTUNGAN ONLINE</div>
      <div class="col-6"> RM 0.00 </div>
    </div>
  </div>
  <div class="col-6 box">
    <div class="row form-group">
      <div class="col-12">
        <p><b>B) BIL TRANSAKSI</b></p>
      </div>
      <div class="col-6">1. PEMBIAYAAN</div>
      <div class="col-6">{{ $laporan_ringkasan['bilangan_gadai'] }}</div>
      <div class="col-6">2. Penyelesaian Pem.</div>
      <div class="col-6">{{ $laporan_ringkasan['bilangan_tebus'] }}</div>
      <div class="col-6">3. ANSURAN PEMBIAYAAN</div>
      <div class="col-6">{{ $laporan_ringkasan['bilangan_ansuran'] }}</div>
      <div class="col-6">4. BAYARAN ONLINE</div>
      <div class="col-6">0</div>
      <div class="col-6">5. PELANGGAN BARU</div>
      <div class="col-6">{{ $laporan_ringkasan['bilangan_customer_baru'] }}</div>
    </div>
  </div>
</div>

<div class="row p-4">
  <div class="col-6 box">
    <div class="row form-group">
      <div class="col-12">
        <p><b>F) LELONG</b></p>
      </div>
      <div class="col-6">1. LELONG HARI INI</div>
      <div class="col-6">RM  {{ number_format($laporan_ringkasan['jumlah_lelong'],2) }}</div>
      <div class="col-6">2. BAKI</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['baki_lelong'],2) }}</div>
      <div class="col-6">3. RUGI</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['rugi_lelong'],2) }}</div>
      <div class="col-6">4. CAJ LELONG</div>
      <div class="col-6">RM {{ number_format($laporan_ringkasan['cas_lelong'],2) }}</div>
      <div class="col-6">5. BIL</div>
      <div class="col-6">{{ $laporan_ringkasan['bilangan_lelong'] }}</div>
    </div>
  </div>
  <div class="col-6 box">
    <div class="row form-group">
      <div class="col-12">
        <p><b>G) BAYAR BAKI LELONG</b></p>
      </div>
      <div class="col-6">1. BAKI LELONG</div>
      <div class="col-6">{{ 'RM '. number_format($laporan_ringkasan['bayar_baki_lelong'],2) }}</div>
      <div class="col-6">2. RUGI LELONG</div>
      <div class="col-6">{{ 'RM '. number_format($laporan_ringkasan['bayar_rugi_lelong'],2) }}</div>
    </div>
  </div>
</div>

<div class="row p-4">
  <div class="col-12 box">
    <div class="row">
      <div class="col-12">
        <p><b>H) PERATUSAN PEMBIAYAAN</b></p>
      </div>
    </div>
    <div class="row">
      <div class="col-12">
        <table class="table">
          <thead>
            <tr>
              <th></th>
              <th>MARGIN</th>
              <th>70%</th>
              <th>75%</th>
              <th>80%</th>
              <th>JUMLAH</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>1</td>
              <td>PEMBIAYAAN</td>
              <td>RM {{ number_format($laporan_ringkasan['gadai_70'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['gadai_75'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['gadai_80'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['total_gadaian'],2) }}</td>
            </tr>
            <tr>
              <td>2</td>
              <td>NILAI MARHUN</td>
              <td>RM {{ number_format($laporan_ringkasan['nilaimarhun_70'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['nilaimarhun_75'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['nilaimarhun_80'],2) }}</td>
              <td>RM {{ number_format($laporan_ringkasan['total_nm'],2) }}</td>
            </tr>
            <tr>
              <td>3</td>
              <td>BILANGAN</td>
              <td>{{ $laporan_ringkasan['bilangan_70'] }}</td>
              <td>{{ $laporan_ringkasan['bilangan_75'] }}</td>
              <td>{{ $laporan_ringkasan['bilangan_80'] }}</td>
              <td>{{ number_format($laporan_ringkasan['total_bilangan']) }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
<br><br>
<div class="row p-4">
  <div class="col-6 text-center">
    <div class="row mb-5">
      <div class="col-12">DISEMAK</div>
    </div>
    <div class="row">
      <div class="col-12">................................................</div>
    </div>
  </div>
  <div class="col-6 text-center">
    <div class="row mb-5">
      <div class="col-12">DISAHKAN</div>
    </div>
    <div class="row">
      <div class="col-12">................................................</div>
    </div>
  </div>
</div>