fix laporan

This commit is contained in:
MUHD HAFIFIE
2021-05-04 16:34:47 +08:00
parent 107d7d85dc
commit b46d62e7e9
6 changed files with 67 additions and 10 deletions
+14 -2
View File
@@ -1978,10 +1978,13 @@ class KhazanahController extends Controller
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
}
$tebus = Http::get(config('api.url'). '/api/tebus/laporan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json();
$tebuspengasingan = Http::get(config('api.url'). '/api/tebus/laporanjenistawarruq/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
$upahlama = Http::get(config('api.url'). '/api/advansurdetails/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
// dd($gadai);
return view('print.laporan_penebusan', compact('tebus','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
return view('print.laporan_penebusan', compact('tebus','cawangan_detail','tarikh_cetak','tebus_date','tebuspengasingan','api_url','upahlama'));
}
public function laporanLelongan(){
@@ -2353,6 +2356,15 @@ class KhazanahController extends Controller
return view('print.laporan_marhunterkumpul', compact('marhun','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
}
public function laporanRingkasanHarian(){
$auth_user = Auth::user();
$api_url = config('api.url');
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
return view('khazanah.laporan.ringkasanharian',compact('cawangan_info','api_url'));
}
public function cetakLaporanRingkasanHarian(Request $request){
// dd($request);
@@ -2859,7 +2871,7 @@ class KhazanahController extends Controller
// $tanggungansemasa = ['pendahuluan' => $imbangduga['pendahuluan'],'bds' => $panjar['bds'],'perubatan' => $panjar['perubatan'],'keraian' => $panjar['keraian'],'bakilelong' => $bakilelong['bakilelong'],'rugilelong' => $bakilelong['rugilelong'],'wtd' => $wtd,'cajlelong' => $cajlelong];
array_push($tanggungansemasa,['glcode' => '2000/007','descpt' => 'Keuntungan Tergantung', 'amaun' => $keuntungan]);
array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Keuntungan Sebenar','amaun' => $keuntungansebenar]);
array_push($tanggungansemasa,['glcode' => '5000/013','descpt' => 'Upah Simpan','amaun' => $keuntungansebenar]);
array_push($tanggungansemasa,['glcode' => '5000/241','descpt' => 'Rebet','amaun' => ($rebet * -1)]);
array_push($tanggungansemasa,['glcode' => '7000/102','descpt' => 'Pendahuluan Daripada HQ','amaun' => $imbangduga['pendahuluan']]);
array_push($tanggungansemasa,['glcode' => '3000/017','descpt' => 'PANJAR - Baiki dan Selenggara','amaun' => -$panjar['bds']]);
@@ -152,7 +152,7 @@
<div class="inner">
<h5>RM {{ (empty($arraytunaiharini[$index1])) ? '0.00' : number_format($arraytunaiharini[$index1]['tambah'],2) }}</h5>
<p>Tunai Diterima</p>
<p>Pendahuluan</p>
</div>
<div class="icon">
</div>
@@ -165,7 +165,7 @@
<div class="inner">
<h5>RM {{ (empty($arraytunaiharini[$index1])) ? '0.00' : number_format($arraytunaiharini[$index1]['kurang'],2) }}</h5>
<p>Tunai Dikeluar</p>
<p>Serahan</p>
</div>
<div class="icon">
</div>
@@ -208,8 +208,9 @@
<th>Bayaran (RM)</th>
<th>Keuntungan (RM)</th>
</tr>
@php $counter = 1; @endphp
@php $counter = 1;$totalduitmasuk = 0;$totalkeuntungan = 0; @endphp
@foreach($tebus as $index=>$item)
@php $totalduitmasuk += $item['duit_masuk'];$totalkeuntungan += $item['bayaran_keuntungan']; @endphp
<tr>
<td>{{ $counter }}</td>
<td>{{$item['norujukan']}}</td>
@@ -232,13 +233,17 @@
@if($index+1 < sizeof($tebus))
@if($item['teller'] != $tebus[$index + 1]['teller'])
<tr>
<td colspan=12>{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}</td>
<td colspan="6">{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}</td>
<td><b>{{ number_format($totalduitmasuk,2) }} </b></td>
<td><b>{{ number_format($totalkeuntungan,2) }} </b></td>
</tr>
@php $counter = 0; @endphp
@endif
@else
<tr>
<td colspan=12>{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}</td>
<td colspan="6">{{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }}</td>
<td><b>{{ number_format($totalduitmasuk,2) }} </b></td>
<td><b>{{ number_format($totalkeuntungan,2) }} </b></td>
</tr>
@endif
@endforeach
@@ -211,6 +211,7 @@
<th>Berat</th>
<th>N Marhun</th>
<th>Pembiayaan</th>
<th>Keuntungan</th>
<th>Peratus (%)</th>
</tr>
@php $counter = 1; $totalpinjaman = 0; @endphp
@@ -227,7 +228,7 @@
<tr>
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0; @endphp
@php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0;$totalupah12 = 0; @endphp
@endif
<tr>
@@ -245,10 +246,11 @@
<td>{{ number_format($item['berat'],2) }}</td>
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
<td>{{ number_format($item['pinjaman'],2) }}</td>
<td>{{ number_format($item['upah12'],2) }}</td>
<td>{{ $item['percentpinj'] }}</td>
</tr>
@php $counter++; @endphp
@php $totalpinjamanteller += $item['pinjaman'];$totalnmteller += $item['nilaimarhun'];$totalberatteller += $item['berat']; @endphp
@php $totalpinjamanteller += $item['pinjaman'];$totalnmteller += $item['nilaimarhun'];$totalberatteller += $item['berat'];$totalupah12 += $item['upah12']; @endphp
@if($index+1 < sizeof($gadai))
@if($item['teller'] != $gadai[$index + 1]['teller'])
<tr>
@@ -256,6 +258,8 @@
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
<td><b>{{ number_format($totalupah12,2) }} </b></td>
</tr>
@php $counter = 1; @endphp
@endif
@@ -265,6 +269,8 @@
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
<td><b>{{ number_format($totalupah12,2) }} </b></td>
</tr>
@endif
@endforeach
@@ -302,6 +302,40 @@
</tr>
</table>
<h4>Laporan Transaksi Penebusan</h4>
<br>
<table id="details">
<thead>
<th>Bil</th>
<th>Jenis</th>
<th>Penebusan(RM)</th>
<th>Keuntungan(RM)</th>
<th>Rebate(RM)</th>
</thead>
<tr>
<td>{{ $tebuspengasingan['biltawarruq'] }}</td>
<td>Tawarruq</td>
<td>{{ number_format($tebuspengasingan['totaltawarruq'],2) }}</td>
<td>{{ number_format($tebuspengasingan['keuntungantawarruq'],2) }}</td>
<td>{{ number_format($tebuspengasingan['totalrebate'],2) }}</td>
</tr>
<tr>
<td>{{ $tebuspengasingan['bilarrahn'] }}</td>
<td>Ar-Rahn</td>
<td>{{ number_format($tebuspengasingan['totalarrahn'],2) }}</td>
<td>{{ number_format($tebuspengasingan['keuntunganarrahn'],2) }}</td>
<td> Not Applicable </td>
</tr>
<tr>
<td>{{ $upahlama['bil'] }}</td>
<td>Bayaran Upah</td>
<td> Not Applicable </td>
<td>{{ number_format($upahlama['total'],2) }}</td>
<td> Not Applicable </td>
</tr>
</table>
@@ -65,7 +65,7 @@
<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 class="col-6">{{ 'RM '. number_format($laporan['total_keuntungan'],2) }}</div>
</div>
</div>
<div class="col-6 box">