fix jbg gadai customerinfo

This commit is contained in:
MUHD HAFIFIE
2021-04-22 12:50:07 +08:00
parent a4ef5a6903
commit 56f3354177
3 changed files with 46 additions and 35 deletions
+1 -1
View File
@@ -533,7 +533,7 @@
'RM '+ formatter.format(gadai_detail['bakihargajualan']),
'RM '+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['jbg'],
gadai_detail['tempoh'],
'RM '+ formatter.format(upahsemasa)
]).draw();
}
+38 -27
View File
@@ -146,21 +146,21 @@
<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>
{{-- <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 style="font-size:20px;">{{ $cawangan_detail['namacaw'] }}</td>
<td></td>
</tr>
<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>
</tr> --}}
</table>
<br>
@@ -169,22 +169,25 @@
<th colspan ="5"><b>LAPORAN GADAIAN</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></th>
</tr>
<tr>
<td style="width:10px"> <b>TARIKH</b></td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $gadai_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
<td><b> Tarikh:</b></td>
<td style="text-align:left;"> @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $gadai_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
</tr>
<tr>
<td style="width:10px"> <b>Tarikh Cetak</b></td>
<td style="text-align:left;">@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
<td style="width:50px">
</td>
<td> </td>
@@ -205,7 +208,6 @@
<th>Alamat</th>
<th>No K/P</th>
<th>Masa</th>
<th>Marhun</th>
<th>Berat</th>
<th>N Marhun</th>
<th>Pembiayaan</th>
@@ -217,17 +219,20 @@
@if($index > 0)
@if($item['teller'] != $gadai[$index - 1]['teller'])
<tr>
<td colspan=10>Teller : {{$item['teller']}}</td>
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0; @endphp
@endif
@else
<tr>
<td colspan=10>Teller : {{$item['teller']}}</td>
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0; @endphp
@endif
<tr>
<td>{{ $counter }}</td>
<td colspan=2 style="width:100px">{{$item['norujukan']}}</td>
<td style="width:100px">{{$item['norujukan']}}</td>
<td>
@php
$customer_detail = Http::get($api_url . '/api/customers/' . $item['nokp'])->json();
@@ -237,29 +242,35 @@
<td>{{$customer_detail[0]['alamat1']}}</td>
<td>{{ $item['nokp'] }}</td>
<td>{{ $item['masa'] }}</td>
<td>{{ $item['marhun'] }}</td>
<td>{{ number_format($item['berat'],2) }}</td>
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
<td>{{ number_format($item['pinjaman'],2) }}</td>
<td>{{ $item['percentpinj'] }}</td>
</tr>
@php $counter++; @endphp
@php $totalpinjamanteller += $item['pinjaman'];$totalnmteller += $item['nilaimarhun'];$totalberatteller += $item['berat']; @endphp
@if($index+1 < sizeof($gadai))
@if($item['teller'] != $gadai[$index + 1]['teller'])
<tr>
<td colspan=10>{{ $counter-1 }} Jumlah Surat Bagi Teller : {{$item['teller']}}</td>
<td colspan="6"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
</tr>
@php $counter = 0; @endphp
@php $counter = 1; @endphp
@endif
@else
<tr>
<td colspan=10>{{ $counter }} Jumlah Bagi Teller : {{$item['teller']}}</td>
<td colspan="6"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
</tr>
@endif
@endforeach
<tfoot>
<th colspan="9" style="text-align:right;">JUMLAH</th>
<th>{{ number_format($totalpinjaman,2) }}</th>
<th colspan="8" style="text-align:right;font-size:13px;">JUMLAH KESELURUHAN :</th>
<th style="font-size:13px;">{{ number_format($totalpinjaman,2) }}</th>
<th></th>
</tfoot>
</table>
@@ -213,22 +213,22 @@
<th>N Marhun</th>
<th>Jenis Tebus</th>
</tr>
@php $counter = 0; $totalpembiayaan = 0;@endphp
@php $counter = 1; $totalpembiayaan = 0;@endphp
@foreach($tebus as $index=>$item)
@if($index > 0)
@if($item['teller'] != $tebus[$index - 1]['teller'])
<tr>
<td colspan=12>Teller : {{$item['teller']}}</td>
<td colspan=12>Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@endif
@else
<tr>
<td colspan=12>Teller : {{$item['teller']}}</td>
<td colspan=12>Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@endif
<tr>
<td>{{ $loop->iteration }}</td>
<td colspan=2>{{$item['norujukan']}}</td>
<td>{{ $counter }}</td>
<td>{{ $item['norujukan'] }}</td>
<td>
@php
$gadai_detail = Http::get($api_url . '/api/gadai/norujukan/'. $item['norujukan'])->json();
@@ -258,13 +258,13 @@
@if($index+1 < sizeof($tebus))
@if($item['teller'] != $tebus[$index + 1]['teller'])
<tr>
<td colspan=12>{{ $counter }} Jumlah Bagi Teller : {{$item['teller']}}</td>
<td colspan=12><b>{{ $counter-1 }}</b> Jumlah Bagi Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@php $counter = 0; @endphp
@endif
@else
<tr>
<td colspan=12>{{ $counter }} Jumlah Bagi Teller : {{$item['teller']}}</td>
<td colspan=12><b>{{ $counter-1 }}</b> Jumlah Bagi Teller : <b>{{ $item['teller'] }}</b></td>
</tr>
@endif
@endforeach