Merge branch 'amirah' of https://gitlab.com/azfararsyad/lelong into amirah

This commit is contained in:
Azfar Arsyad
2022-03-08 09:44:58 +08:00
2 changed files with 71 additions and 66 deletions
+11 -15
View File
@@ -560,7 +560,8 @@ class SimulasiController extends Controller
foreach($cawangansim as $cawsim)
{
$cawangan = Cawangan::where('id','=',$cawsim->caw_id)->first();
$databid = SimulasiBid::where('simulasi_id','=',$simulasi_id)->get();
$databid = SimulasiBid::where('simulasi_id','=',$simulasi_id)
->get();
@@ -638,23 +639,14 @@ class SimulasiController extends Controller
$total9K += SimulasiBidMarhun::where('simulasibid_id','=',$bid->id)
->where('karat','=','9.0K')
->sum('berat');
}
array_push($arraycaw,[
'cawangan'=>$cawangan->caw_name,
't_lelong'=>$simulasi->tarikh_lelong,
'bil_marhun'=>sizeof($databid),
'berat'=>$berat,
'n_marhun'=>$nilai_marhun,
'pinjaman'=>$pinjaman,
'upah'=>0,
'hargaasas'=>$hargaasas,
'cajlelong'=>$cajlelong,
'rugilelong'=>$rugilelong,
'bakilelong'=>$bakilelong,
]);
$total_marhun = $total_marhun + sizeof($databid);
$total_berat = $total_berat + $berat;
@@ -665,6 +657,7 @@ class SimulasiController extends Controller
$total_cazlelong = $total_cazlelong + $cajlelong;
$total_rugilelong = $total_rugilelong + $rugilelong;
$total_bakilelong = $total_bakilelong + $bakilelong;
}
@@ -691,7 +684,10 @@ class SimulasiController extends Controller
'total14K',
'total9K',
'simkarat',
'simulasi_id'))->setPaper('a4', 'landscape');
'simulasi_id',
'databid',
'cawangan',
'bid'))->setPaper('a4', 'potrait');
return $pdf->download('Simulasi Keseluruhan.pdf');
+60 -51
View File
@@ -3,7 +3,7 @@
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
font-size:8px;
border-collapse: collapse;
width: 100%;
}
@@ -11,7 +11,7 @@
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: center;
text-align: left;
}
@@ -20,8 +20,8 @@
#sim tr:hover {}
#sim th {
text-align: center;
border: 1px solid;
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
@@ -81,7 +81,7 @@ tr:nth-child(even) {
<br><br>
<table cellspacing="" cellpadding="5" text-align="left" border="1" height="25" align="left" id="sim">
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
@@ -92,7 +92,7 @@ tr:nth-child(even) {
</thead>
</table>
<table cellspacing="" cellpadding="5" text-align="left" border="1" height="25" align="left" id="sim">
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<tr>
<td>Rugi Lelong Keseluruhan: RM{{ number_format($total_rugilelong, 2, '.', ',') }}</td>
@@ -106,81 +106,87 @@ tr:nth-child(even) {
<br>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="1" width="100%" height="80" align="center" id="sim">
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th width="2%" align="center">No</th>
<th width="9%" align="center">Cawangan</th>
<th width="6%" align="center">Tarikh Lelong</th>
<th width="5%" align="center">Bil Marhun (Paket)</th>
<th width="5%" align="center">Berat(gm)</th>
<th width="9%" align="center">Nilai Marhun(RM)</th>
<th width="9%" align="center">Pembiayaan(RM)</th>
<th width="9%" align="center">Keuntungan(RM)</th>
<th width="9%" align="center">Harga Asas(RM)</th>
<th width="9%" align="center">Caj Lelong(RM)</th>
<th width="9%" align="center">Baki Lelong(RM)</th>
<th width="9%" align="center">Rugi Lelong(RM)</th>
<th width="2%" align="left">No</th>
<th width="9%" align="left">Cawangan</th>
<th width="6%" align="left">Tarikh Lelong</th>
<th width="5%" align="left">No Rujukan</th>
<th width="5%" align="left">Berat(gm)</th>
<th width="9%" align="left">Nilai Marhun(RM)</th>
<th width="9%" align="left">Pembiayaan(RM)</th>
<th width="9%" align="left">Keuntungan(RM)</th>
<th width="9%" align="left">Harga Asas(RM)</th>
<th width="9%" align="left">Caj Lelong(RM)</th>
<th width="9%" align="left">Baki/Rugi Lelong(RM)</th>
{{-- <th width="9%" align="left">Rugi Lelong(RM)</th> --}}
</tr>
</thead>
@foreach ($arraycaw as $index=>$caw)
@foreach ($databid as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td>{{ $caw['cawangan'] }}</td>
<td>{{ $caw['t_lelong'] }}</td>
<td>{{ $caw['bil_marhun'] }}</td>
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['upah'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
<td>({{ number_format($caw['rugilelong'], 2, '.', ',') }})</td>
<td>{{ $cawangan['caw_name'] }}</td>
<td>{{ ($caw['t_lelong']) }}</td>
<td>{{ ($caw['norujukan']) }}</td>
<td>{{ ($caw['berat']) }}</td>
<td>{{ ($caw['nilaimarhun']) }}</td>
<td>{{ ($caw['pinjaman']) }}</td>
<td>{{ ($caw['upahsimpan']) }}</td>
<td>{{ ($caw['hargaasas']) }}</td>
<td>{{ ($caw['cajlelong']) }}</td>
<td>{{ ($caw['baki']) }}</td>
{{-- <td>{{ ($bid['bakilelong']) }}</td>
<td>{{ ($bid['rugilelong']) }}</td> --}}
</tr>
@endforeach
<tr>
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
<td>{{ $total_marhun }}</td>
<td></td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_upah, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>({{ number_format($total_rugilelong, 2, '.', ',') }})</td>
<td></td>
{{-- <td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>({{ number_format($total_rugilelong, 2, '.', ',') }})</td> --}}
</tr>
</table>
</table>
<br><br><br><br><br><br>
<table width="100%" border="0" id="sim">
<tr>
<td><h5>.</h5></td>
</tr>
<table cellspacing="0" cellpadding="2" style="float:right;" border="1" width="100%" height="80" align="right" id="sim">
<thead>
<tr>
<tr>
<th style="text-align:center;" colspan="10"><h3><b>JUMLAH BERAT MENGIKUT MUTU (KESELURUHAN)</b></h3></th>
</tr>
</thead>
<tr>
<td colspan="1" align="left"><strong>MUTU &nbsp;</strong></td>
<td colspan="1" align="center">24Kgb &nbsp;</td>
<td colspan="1" align="center">24K&nbsp;</td>
<td colspan="1" align="center">23K&nbsp;</td>
<td colspan="1" align="center">22K&nbsp;</td>
<td colspan="1" align="center">21K&nbsp;</td>
<td colspan="1" align="center">20K&nbsp;</td>
<td colspan="1" align="center">18K&nbsp;</td>
<td colspan="1" align="center">14K&nbsp;</td>
<td colspan="1" align="center">9K&nbsp;</td>
<td colspan="1" align="center">24Kgb</td>
<td colspan="1" align="center">24K</td>
<td colspan="1" align="center">23K</td>
<td colspan="1" align="center">22K</td>
<td colspan="1" align="center">21K</td>
<td colspan="1" align="center">20K</td>
<td colspan="1" align="center">18K</td>
<td colspan="1" align="center">14K</td>
<td colspan="1" align="center">9K</td>
</tr>
<tr>
<td colspan="1" align="left"><strong>BERAT(gm)</strong></td>
@@ -194,6 +200,9 @@ tr:nth-child(even) {
<td colspan="1" align="center">{{$total14K}}</td>
<td colspan="1" align="center">{{$total9K}}</td>
</tr>
</table>
</table>
</tbody>