ringkasan harian

This commit is contained in:
afiq
2021-03-09 10:52:45 +08:00
parent b499182e0a
commit 176c164497
3 changed files with 219 additions and 284 deletions
+7 -12
View File
@@ -1493,21 +1493,16 @@ class KhazanahController extends Controller
$current = Carbon::now();
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
if($request->datetimepicker1 == null){
$tebus_date = $current->toDateString();
}else{
$split_date = explode('-',$request->datetimepicker1);
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
}
$marhun = Http::get(config('api.url'). '/api/gadai/laporan/ringkasanharian/'. $auth_user['cawangan'] .'/'. $tebus_date)->json();
$marhun = $marhun[0];
$keseluruhanupahsimpan = $marhun['lelongupahsimpan'] + $marhun['tebus'][0]['upahsimpan'] + $marhun['advansur'][0]['upahsimpan'];
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
// dd($gadai);
return view('print.laporan_ringkasanharian', compact('keseluruhanupahsimpan', 'marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
$laporan_ringkasan = Http::get(config('api.url') . '/api/laporan/harian',[
'kodcaw'=>$auth_user['cawangan'],
'tarikh'=>$tarikh_cetak
])->json();
$laporan = $laporan_ringkasan[0];
return view('print.laporan_ringkasanharian', compact('cawangan_detail','tarikh_cetak','api_url','laporan'));
}
public function cetakLaporanRingkasanTerkumpul(Request $request){
@@ -34,6 +34,7 @@
<tr>
<td>Bil</td>
<td>Cawangan</td>
<td>No Sijil</td>
<td>Jumlah Nilai Komoditi</td>
</tr>
</thead>
@@ -90,6 +91,7 @@
tablerekod.row.add([
count,
rekodkomoditi['cawangan'],
rekodkomoditi['nosijil'],
formatter.format(rekodkomoditi['totalkomoditi'])
]).draw();
})
@@ -22,123 +22,14 @@
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;
.box{
border:1px solid black;
padding:3px;
}
</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: 100%;
/* border:1px solid black; */
}
#details td, #details th {
padding: 8px;
font-size:11px;
/* border:1px solid black; */
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ddd;}
#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>
<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>
@@ -158,166 +49,213 @@
<td></td>
</tr>
</table>
<br>
<table id="scan">
<tr>
<th colspan ="5"><b>LAPORAN RINGKASAN HARIAN</b></th>
<th> </th>
<th> </th>
<th><b> Tarikh Cetak:</b>
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp
</th>
<th></th>
</tr>
<tr>
<td style="width:10px"> <b>TARIKH</b></td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tebus_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
<td style="width:50px">
</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<div class="row p-4">
<div class="col-6 box">
<div class="row form-group">
<div class="col-12">
<p><b>A) LAPORAN HARIAN</b></p>
</div>
<div class="col-6">1. PEMBIAYAAN</div>
<div class="col-6">{{ 'RM '. number_format($laporan['total_gadai'],2) }}</div>
<div class="col-6">2. PENEBUSAN</div>
<div class="col-6">{{ 'RM '. number_format($laporan['total_tebus'],2) }}</div>
<div class="col-6">3. ANSURAN PEMBIAYAAN</div>
<div class="col-6">{{ 'RM '. number_format($laporan['total_ansuran'],2) }}</div>
<div class="col-6">4. BAYARAN ONLINE</div>
<div class="col-6"></div>
<div class="col-6">5. KEUNTUNGAN</div>
<div class="col-6"></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['bilangan_gadai'] }}</div>
<div class="col-6">2. PENEBUSAN</div>
<div class="col-6">{{ $laporan['bilangan_tebus'] }}</div>
<div class="col-6">3. ANSURAN PEMBIAYAAN</div>
<div class="col-6">{{ $laporan['bilangan_ansuran'] }}</div>
<div class="col-6">4. BAYARAN ONLINE</div>
<div class="col-6"></div>
<div class="col-6">5. PELANGGAN BARU</div>
<div class="col-6">{{ $laporan['bilangan_customer_baru'] }}</div>
</div>
</div>
</div>
<br>
<table id="details">
<tr>
<th colspan='3' width="65%">JUMLAH</th>
<th colspan="2" width="35%" style="text-align: center;">JUMLAH PENDAPATAN</th>
</tr>
<tr>
<td width="20%"><b>GADAI</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN
</td>
<td width="20%"><span>{{ $marhun['gadai'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['gadai'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['gadai'][0]['jumlahpinjaman'],2) }}</span><br>
</td>
<td></td>
</tr>
<tr>
<td><b>PENEBUSAN</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN <br>
KEUNTUNGAN
</td>
<td><span>{{ $marhun['tebus'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['tebus'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['tebus'][0]['jumlahpinjaman'],2) }}</span><br>
<span id="tebusupahsimpan">{{ number_format($marhun['tebus'][0]['upahsimpan'],2) }}</span>
</td>
<td>KEUNTUNGAN <br>
CAJ LELONG <br>
</td>
<td><span id="totalupahsimpan">{{ number_format($keseluruhanupahsimpan,2) }}</span> <br>
<span id="totalcajlelong">{{ number_format($marhun['cajlelong'],2) }}</span> <br>
</td>
</tr>
<tr>
<td><b>ANSURAN</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN <br>
KEUNTUNGAN
</td>
<td><span>{{ $marhun['advansur'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['advansur'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['advansur'][0]['jumlahpinjaman'],2) }}</span><br>
<span id="tebusupahsimpan">{{ number_format($marhun['advansur'][0]['upahsimpan'],2) }}</span>
</td>
<td></td>
</tr>
<tr>
<td><b>LELONGAN</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN <br>
KEUNTUNGAN <br>
CAJ LELONG <br>
LEBIHAN LELONG <br>
RUGI LELONG <br><br>
TERIMA RUGI LELONG <br><br>
BAYAR LEBIHAN LELONG
</td>
<td>
<span>{{ $marhun['lelong'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['lelong'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['lelong'][0]['jumlahpinjaman'],2) }}</span><br>
<span id="lelongupahsimpan">{{ number_format($marhun['lelongupahsimpan'],2) }}</span><br>
<span>{{ number_format($marhun['cajlelong'],2) }}</span><br>
<span>{{ number_format($marhun['lelongbaki'],2) }}</span><br>
<span>{{ number_format($marhun['lelongrugi'],2) }}</span><br><br>
<span>{{ number_format($marhun['terimarugilelong'],2) }}</span><br><br>
<span>{{ number_format($marhun['bayarlebihanlelong'],2) }}</span>
</td>
<td>
<table id="sign">
<tr>
<td></td>
<td colspan="3"> .................................................................. <br>
<p style="margin-bottom:50px;">DI SEMAK</p>
.................................................................. <br>
<p>DI SAHKAN</p>
</td>
<td> </td>
<td colspan="3"></td>
<td> </td>
</tr>
<div class="row p-4">
<div class="col-6 box">
<div class="row form-group">
<div class="col-12">
<p><b>C) WANG PETI BESI</b></p>
</div>
<div class="col-6">1. SISTEM</div>
<div class="col-6"></div>
<div class="col-6">2. IMBANG DUGA</div>
<div class="col-6"></div>
<div class="col-6">3. DENOMINASI</div>
<div class="col-6"></div>
</div>
</div>
<div class="col-6 box">
<div class="row form-group">
<div class="col-12">
<p><b>D) PERBELANJAAN</b></p>
</div>
<div class="col-6">1. HARI INI</div>
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_harian'],2) }}</div>
<div class="col-6">2. BULANAN</div>
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_bulanan'],2) }}</div>
<div class="col-6">3. TERKUMPUL</div>
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_tahunan'],2) }}</div>
</div>
</div>
</div>
<div class="row p-4">
<div class="col-12 box">
<div class="row">
<div class="col-12">
<p><b>E) OUTSTANDING</b></p>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table">
<thead>
<tr>
<th></th>
<th></th>
<th>Pembiayaan</th>
<th>Nilai Marhun</th>
<th>Bil</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>IMBANG DUGA</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>STOK AUDIT</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>3</td>
<td>KAWALAN STOK</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</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['jumlah_lelong'],2) }}</div>
<div class="col-6">2. BAKI</div>
<div class="col-6">{{ 'RM '. number_format($laporan['baki_lelong'],2) }}</div>
<div class="col-6">3. RUGI</div>
<div class="col-6">{{ 'RM '. number_format($laporan['rugi_lelong'],2) }}</div>
<div class="col-6">4. CAJ LELONG</div>
<div class="col-6">{{ 'RM '. number_format($laporan['cas_lelong'],2) }}</div>
<div class="col-6">5. BIL</div>
<div class="col-6">{{ $laporan['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">RM</div>
<div class="col-6">{{ 'RM '. number_format($laporan['bayar_baki_lelong'],2) }}</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td><b>HAPUS KIRA</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN
</td>
<td>
<span>{{ $marhun['hapuskira'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['hapuskira'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['hapuskira'][0]['jumlahpinjaman'],2) }}</span><br>
</td>
<td></td>
</tr>
<tr>
<td><b>SERAHAN WANG TAK DITUNTUT</b></td>
<td>BIL <br>
N. MARHUN <br>
PEMBIAYAAN <br>
</td>
<td> <span>{{ $marhun['wtd'][0]['bilangan'] }}</span><br>
<span>{{ number_format($marhun['wtd'][0]['jumlahmarhun'],2) }}</span><br>
<span>{{ number_format($marhun['wtd'][0]['jumlahpinjaman'],2) }}</span><br>
</td>
<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>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>PEMBIAYAAN</td>
<td>{{ 'RM '. number_format($laporan['gadai_70'],2) }}</td>
<td>{{ 'RM '. number_format($laporan['gadai_75'],2) }}</td>
<td>{{ 'RM '. number_format($laporan['gadai_80'],2) }}</td>
</tr>
<tr>
<td>2</td>
<td>NILAI MARHUN</td>
<td>{{ 'RM '. number_format($laporan['nilaimarhun_70'],2) }}</td>
<td>{{ 'RM '. number_format($laporan['nilaimarhun_75'],2) }}</td>
<td>{{ 'RM '. number_format($laporan['nilaimarhun_80'],2) }}</td>
</tr>
<tr>
<td>3</td>
<td>BILANGAN</td>
<td>{{ $laporan['bilangan_70'] }}</td>
<td>{{ $laporan['bilangan_75'] }}</td>
<td>{{ $laporan['bilangan_80'] }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<td></td>
</tr>
</table>
<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>