update, simulasi pdf, lelong pdf, simulasi by caw pdf

This commit is contained in:
Amirah22
2022-07-26 13:56:25 +08:00
parent e0d731ff92
commit c66c520706
10 changed files with 716 additions and 61 deletions
+191 -15
View File
@@ -88,7 +88,7 @@ class LelongController extends Controller
return view('lelong.senarailelong',compact('lelong', 'arraydetails'));
}
public function show($id)
public function show(Request $request, $id)
{
$lelong_id = $id;
$lelong = Lelong::where('id','=',$id)->first();
@@ -423,18 +423,7 @@ class LelongController extends Controller
->with('success','Create Lelong Berjaya');
}
public function exportnotis($id)
{
$currentdate = Carbon::now();
$currentdate = $currentdate->toDateString();
$lelong = Lelong::where('id','=',$id)->first();
$lelongbid = LelongBid::where('lelong_id','=',$lelong->id)->get();
// return view('pdf.notislelong',compact('currentdate','lelongbid')); //page for editing
$pdf = PDF::loadView('pdf.notislelong',compact('currentdate','lelongbid'));
return $pdf->download('Notis Lelong.pdf');
}
public function delete($id)
{
@@ -2606,8 +2595,6 @@ class LelongController extends Controller
return redirect()->route('lelong.senarailelongtaklaku');
}
public function renewxlakujanadata(Request $request)
@@ -2770,6 +2757,195 @@ class LelongController extends Controller
return view('lelong.listsagbycust',compact('marhuns','lelongid','cawid','listsag','ktlhbyr','arrayinfo'));
}
public function exportlelong(Request $request)
{
$lelong_id = $request->lelongid;
$lelong = Lelong::where('id','=',$lelong_id)->first();
$cawanganlel = CawanganLelong::where('lelong_id','=',$lelong_id)->get();
$lelkarat = LelKarat::where('lelong_id','=',$lelong_id)->get();
$jeniskarat = JenisKarat::all();
$arraydata = [];
$arraycaw = [];
$data = [];
$total_marhun = 0;
$total_berat = 0;
$total_nmarhun = 0;
$total_pinjaman = 0;
$total_upah = 0;
$total_hargaasas = 0;
$total_cazlelong = 0;
$total_rugilelong = 0;
$total_bakilelong = 0;
$total24Kgb = 0;
$total24K = 0;
$total23k = 0;
$total22K = 0;
$total21K = 0;
$total20K = 0;
$total18Kp = 0;
$total18K = 0;
$total14Kp = 0;
$total14K = 0;
$total9K = 0;
$total_nilaimarhun = 0;
$nilai_marhun = 0;
$total_bakiupah = 0;
foreach($cawanganlel as $cawlel)
{
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
$databid = LelongBid::select('lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.cajlelong','lelongbid.baki','lelongbid.nilaimarhun',
'lelongbid.pinjaman','lelongbid.hargaasas','lelongbid.cajlelong','lelongbid.bakiupah')
->where('caw_id','=',$cawlel->caw_id)->where('lelong_id','=',$lelong_id)->get();
// dd($databid->toArray());
$packet = 0;
$berat = 0;
$pinjaman =0;
$nilai_marhun = 0;
$bakiupah = 0;
$hargaasas = 0;
$cajlelong = 0;
$rugilelong = 0;
$bakilelong = 0;
foreach($databid as $index1=>$bid)
{
$marhun = LelongBidMarhun::where('lelongbid_id','=',$bid['id'])->get();
$berat = $berat + $bid['berat'];
$nilai_marhun = $nilai_marhun + $bid['nilaimarhun'];
$pinjaman =$pinjaman + $bid['pinjaman'];
$bakiupah = $bakiupah + $bid['bakiupah'];
$hargaasas = $hargaasas + $bid['hargaasas'];
$cajlelong = $cajlelong + $bid['cajlelong'];
if($bid['baki'] > 0)
{
$bakilelong = $bakilelong + $bid['baki'];
}
else
{
$rugilelong = $rugilelong - $bid['baki'];
}
$total24Kgb += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','24.0Kgb')
->sum('berat');
$total24K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','24.0K')
->sum('berat');
$total23k += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','23.0K')
->sum('berat');
$total22K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','22.0K')
->sum('berat');
$total21K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','21.0K')
->sum('berat');
$total20K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','20.0K')
->sum('berat');
$total18Kp += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','18.0Kp')
->sum('berat');
$total18K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','18.0K')
->sum('berat');
$total14Kp += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','14.0Kp')
->sum('berat');
$total14K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','14.0K')
->sum('berat');
$total9K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
->where('karat','=','9.0K')
->sum('berat');
}
array_push($arraycaw,[
'id_cawangan'=> $cawangan['id'],
'cawangan'=>$cawangan['caw_name'],
't_lelong'=>$lelong['tarikh_lelong'],
'bil_marhun'=>sizeof($databid),
'berat'=>$berat,
'n_marhun'=>$nilai_marhun,
'pinjaman'=>$pinjaman,
'upahsimpan'=>$bakiupah,
'bakiupah'=>$bakiupah,
'hargaasas'=>$hargaasas,
'cajlelong'=>$cajlelong,
'rugilelong'=>$rugilelong,
'bakilelong'=>$bakilelong,
]);
$total_marhun = $total_marhun + sizeof($databid);
$total_berat = $total_berat + $berat;
$total_pinjaman = $total_pinjaman + $pinjaman;
$total_hargaasas = $total_hargaasas + $hargaasas;
$total_cazlelong = $total_cazlelong + $cajlelong;
$total_rugilelong = $total_rugilelong + $rugilelong;
$total_bakilelong = $total_bakilelong + $bakilelong;
$total_nilaimarhun = $total_nilaimarhun + $nilai_marhun;
$total_bakiupah = $total_bakiupah + $bakiupah;
$data = Lelong::where('lelong.id','=',$lelong_id)
->first();
}
$pdf = PDF::loadView('pdf.lelreport',compact('arraycaw',
'total_marhun',
'total_berat',
'total_nmarhun',
'total_pinjaman',
'total_upah',
'total_hargaasas',
'total_cazlelong',
'total_rugilelong',
'total_bakilelong',
'total24Kgb',
'total24K',
'total23k',
'total22K',
'total21K',
'total20K',
'total18Kp',
'total18K',
'total14Kp',
'total14K',
'total9K',
'lelkarat',
'lelong_id',
'jeniskarat',
'data',
'total_bakiupah',
'total_nilaimarhun'
))->setPaper('a4', 'potrait');
return $pdf->download('Lelong Keseluruhan.pdf');
}
+82
View File
@@ -30,6 +30,8 @@ use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\LelKarat_temp;
use App\Models\Resit;
use App\Models\Customer;
use Carbon\Carbon;
class ReportController extends Controller
@@ -501,6 +503,86 @@ class ReportController extends Controller
}
Public function simulasireport ($simulasi_id, $cawid){
$keuntungan = 0;
$marhuns = SimulasiBid::join('cawangan', 'simulasibid.caw_id', '=', 'cawangan.id')
// ->join('gadai','simulasibid.norujukan','=','gadai.norujukan')
->where('simulasi_id','=',$simulasi_id)
->where('caw_id','=',$cawid)
->select(
'simulasibid.t_lelong',
'simulasibid.kodcaw',
'cawangan.caw_name',
'simulasibid.norujukan',
'simulasibid.pinjaman',
'simulasibid.berat',
'simulasibid.nilaimarhun',
'simulasibid.hargaasas',
'simulasibid.bakiupah',
'simulasibid.cajlelong',
'simulasibid.baki',
'simulasibid.status_jual',
'simulasibid.jbg'
// 'gadai.bakipjm',
// 'gadai.bakihargajualan',
// 'gadai.upah12',
// 'gadai.ansakhir',
// 'gadai.tempoh',
// 'gadai.tempohbayar',
// 'gadai.kadarupah',
// 'gadai.nokp'
)
->get()->toArray();
// dd($marhuns);
$arraymarhun = [];
foreach($marhuns as $index1=>$cal){
// dd($cal);
$gadai = Gadai::on($cal['kodcaw'])
->where('norujukan','=',$cal['norujukan'])
->first();
// dd($gadai);
$customer = Customer::where('kpbaru','=',$gadai['nokp'])
->orWhere('kplama','=',$gadai['nokp'])
->first();
// dd($customer);
// $keuntungan = $cal['bakipjm'] - ($cal['bakihargajualan'] - ($cal['upah12'] - $cal['ansakhir'])-(($cal['tempoh']-$cal['tempohbayar'])*$cal['kadarupah']/100*$cal['bakipjm']) );
$marhuns[$index1]['keuntungan'] = $keuntungan;
$marhuns[$index1]['nama'] = $customer;
array_push($arraymarhun,[
'norujukan' => $cal['norujukan'],
'tempoh' => $gadai['tempoh'],
'nama' => $customer['nama'],
'berat' => $cal['berat'],
'nilaimarhun' => $cal['nilaimarhun'],
'hargaasas' => $cal['hargaasas'],
'pinjaman' => $cal['pinjaman'],
'bakiupah' => $cal['bakiupah'],
'cajlelong' => $cal['cajlelong'],
'baki' => $cal['baki'],
]);
$datacaw = Cawangan::where('id','=',$cawid)
->get();
}
$pdf = PDF::loadView('pdf.pdfsimulasireport',compact('arraymarhun','marhuns','simulasi_id','cawid','keuntungan','datacaw'))
->setPaper('a4','potrait');
return $pdf->download('Laporan Barang Lelong Pembida.pdf');
}
+28 -32
View File
@@ -585,13 +585,9 @@ class SimulasiController extends Controller
{
$simulasi_id = $request->simulasiid;
// $simulasi = Simulasi::where('id','=',$request->simulasiid)->first();
// $cawangansim = CawanganSimulasi::where('simulasi_id','=',$request->simulasiid)->get();
// $simkarat = SimKarat::where('simulasi_id','=',$request->simulasiid)->get();
$simulasi = Simulasi::where('id','=',$request->simulasiid)->first();
$cawangansim = CawanganSimulasi::where('simulasi_id','=',$request->simulasiid)->get();
$simkarat = SimKarat::where('simulasi_id','=',$request->simulasiid)->get();
$simulasi = Simulasi::where('id','=',$simulasi_id)->first();
$cawangansim = CawanganSimulasi::where('simulasi_id','=',$simulasi_id)->get();
$simkarat = SimKarat::where('simulasi_id','=',$simulasi_id)->get();
$jeniskarat = JenisKarat::all();
$arraydata = [];
@@ -619,16 +615,19 @@ class SimulasiController extends Controller
$total14Kp = 0;
$total14K = 0;
$total9K = 0;
$total_upahkeuntungan2 = 0;
$total_bakiupah = 0;
$total_nilaimarhun = 0;
foreach($cawangansim as $cawsim)
{
$cawangan = Cawangan::where('id','=',$cawsim->caw_id)->first();
$databid = SimulasiBid::join('gadai','simulasibid.norujukan','=','gadai.norujukan')
->select('simulasibid.id','simulasibid.berat','simulasibid.marhun','simulasibid.cajlelong','simulasibid.baki','simulasibid.nilaimarhun',
'simulasibid.pinjaman','simulasibid.hargaasas','simulasibid.cajlelong','gadai.bakipjm','gadai.bakihargajualan','gadai.upah12',
'gadai.ansakhir','gadai.tempoh','gadai.kadarupah','gadai.tempohbayar')
// $databid = SimulasiBid::join('gadai','simulasibid.norujukan','=','gadai.norujukan')
// ->select('simulasibid.id','simulasibid.berat','simulasibid.marhun','simulasibid.cajlelong','simulasibid.baki','simulasibid.nilaimarhun',
// 'simulasibid.pinjaman','simulasibid.hargaasas','simulasibid.cajlelong','gadai.bakipjm','gadai.bakihargajualan','gadai.upah12',
// 'gadai.ansakhir','gadai.tempoh','gadai.kadarupah','gadai.tempohbayar')
// ->where('caw_id','=',$cawsim->caw_id)->where('simulasi_id','=',$simulasi_id)->get();
$databid = SimulasiBid::select('simulasibid.id','simulasibid.berat','simulasibid.marhun','simulasibid.cajlelong','simulasibid.baki','simulasibid.nilaimarhun',
'simulasibid.pinjaman','simulasibid.hargaasas','simulasibid.cajlelong','simulasibid.bakiupah')
->where('caw_id','=',$cawsim->caw_id)->where('simulasi_id','=',$simulasi_id)->get();
// ->toArray();
@@ -636,14 +635,14 @@ class SimulasiController extends Controller
$berat = 0;
$nilai_marhun = 0;
$pinjaman =0;
$upah = 0;
$bakiupah = 0;
$hargaasas = 0;
$cajlelong = 0;
$rugilelong = 0;
$bakilelong = 0;
$keuntungan = 0;
$total_upahkeuntungan = 0;
// $keuntungan = 0;
// $total_upahkeuntungan = 0;
foreach($databid as $index1=>$bid)
@@ -653,16 +652,16 @@ class SimulasiController extends Controller
// $nilai_marhun = $nilai_marhun + ($marhun->sum('n_marhun'));
$nilai_marhun = $nilai_marhun + $bid['nilaimarhun'];
$pinjaman =$pinjaman + $bid['pinjaman'];
// $upah = $upah + $bid['upah'];
$bakiupah = $bakiupah + $bid['bakiupah'];
$hargaasas = $hargaasas + $bid['hargaasas'];
$cajlelong = $cajlelong + $bid['cajlelong'];
$keuntungan = $bid['bakipjm'] - ($bid['bakihargajualan'] - ($bid['upah12'] - $bid['ansakhir'])-(($bid['tempoh']-$bid['tempohbayar'])*$bid['kadarupah']/100*$bid['bakipjm']) );
$databid[$index1]['keuntungan'] = $keuntungan;
// $keuntungan = $bid['bakipjm'] - ($bid['bakihargajualan'] - ($bid['upah12'] - $bid['ansakhir'])-(($bid['tempoh']-$bid['tempohbayar'])*$bid['kadarupah']/100*$bid['bakipjm']) );
// $databid[$index1]['keuntungan'] = $keuntungan;
// $total_upahkeuntungan = $total_upahkeuntungan + $keuntungan;
$total_upahkeuntungan = bcdiv($total_upahkeuntungan,1,1) + bcdiv($keuntungan,1,1);
// // $total_upahkeuntungan = $total_upahkeuntungan + $keuntungan;
// $total_upahkeuntungan = bcdiv($total_upahkeuntungan,1,1) + bcdiv($keuntungan,1,1);
@@ -732,7 +731,8 @@ class SimulasiController extends Controller
'berat'=>$berat,
'n_marhun'=>$nilai_marhun,
'pinjaman'=>$pinjaman,
'upahsimpan'=>bcdiv($total_upahkeuntungan,1,1),
'upahsimpan'=>$bakiupah,
'bakiupah'=>$bakiupah,
'hargaasas'=>$hargaasas,
'cajlelong'=>$cajlelong,
'rugilelong'=>$rugilelong,
@@ -743,23 +743,23 @@ class SimulasiController extends Controller
$total_marhun = $total_marhun + sizeof($databid);
$total_berat = $total_berat + $berat;
$total_nilaimarhun = $total_nilaimarhun + $nilai_marhun;
//dd($nilai_marhun);
$total_pinjaman = $total_pinjaman + $pinjaman;
$total_hargaasas = $total_hargaasas + $hargaasas;
$total_cazlelong = $total_cazlelong + $cajlelong;
$total_rugilelong = $total_rugilelong + $rugilelong;
$total_bakilelong = $total_bakilelong + $bakilelong;
$total_upahkeuntungan2 = $total_upahkeuntungan2 + $total_upahkeuntungan;
$total_bakiupah = $total_bakiupah + $bakiupah;
$data = Simulasi::where('simulasi.id','=',$simulasi_id)
->get();
->first();
}
$pdf = PDF::loadView('pdf.simrpt2',compact('arraycaw',
'total_marhun',
'total_berat',
@@ -775,7 +775,7 @@ class SimulasiController extends Controller
'total23k',
'total22K',
'total21K',
'total20K',
'total20K',
'total18Kp',
'total18K',
'total14Kp',
@@ -785,13 +785,9 @@ class SimulasiController extends Controller
'simulasi_id',
'jeniskarat',
'data',
'total_upahkeuntungan',
'total_nilaimarhun',
'total_upahkeuntungan2',
'databid',
'cawangan',
'simulasi_id',
'bid'))->setPaper('a4', 'potrait');
'total_bakiupah',
'total_nilaimarhun'
))->setPaper('a4', 'potrait');
return $pdf->download('Simulasi Keseluruhan.pdf');
+6 -4
View File
@@ -19,8 +19,11 @@
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<form id="exportform" action="{{route('lelong.exportlelong')}}" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<input type="hidden" name="lelongid" value="{{ $lelong_id }}">
<div class="row">
<div class="col-md-5">
<table class="table table-striped table-xl" id="conclusion" style="width:100%">
@@ -122,7 +125,6 @@
</tfoot>
</table>
{{-- {{dd($lelkarat)}}; --}}
<table class="table table-striped table-xl" id="jumlahberat" style="width:80%">
<thead class="bg-primary text-white">
<tr class="text-center">
@@ -375,7 +377,7 @@
"searching":false,
"info": false,
"lengthChange": false,
"pageLength": 15,
"pageLength": 9999,
dom: 'Bfrtip',
buttons: [
// 'copy', 'excel', 'pdf'
+207
View File
@@ -0,0 +1,207 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:8px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr:hover {}
#sim th {
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
th, td {
text-align: left;
padding: 16px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<h3><b>Laporan Lelong Cawangan:<br> @foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}<br>@endforeach</b></h3>
<br>
<h3><b>PERMODALAN KELANTAN BERHAD</b></h3>
</table>
<br>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>Bilangan Lelong: {{$total_marhun}}</td>
<td>Nilai Marhun Keseluruhan: RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>Pembiayaan Keseluruhan: RM{{ number_format($total_pinjaman, 2, '.', ',') }} </td>
<td>Keuntungan Keseluruhan:RM{{ number_format($total_bakiupah, 2, '.', ',') }}</td>
</thead>
</table>
<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>
<td>Baki Lelong Keseluruhan: RM{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>Caj Lelong Keseluruhan: RM{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>Tempoh: {{ $data['jbg']}}</td>
<td>Tarikh Lelong :@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp
</td>
</tr>
</thead>
</table>
<br>
<table width="100%" border="0" id="sim">
<thead>
<tr>
<th style="text-align:center;" colspan="12"><h3><b>SIMULASI KESELURUHAN</b></h3></th>
</tr>
<tr class="text-center">
<th>No</th>
<th>Cawangan</th>
<th>Bil Marhun (Paket)</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Pinjaman (RM)</th>
<th>Keuntungan (RM)</th>
<th>Harga Asas (RM)</th>
<th>Caj Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
<th>Rugi Lelong (RM)</th>
</tr>
</thead>
<tbody>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td>{{ $caw['cawangan'] }}</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['upahsimpan'], 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>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ $total_marhun }}</td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakiupah, 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>
</tr>
</tfoot>
</table>
<br>
<table width="100%" border="0" id="sim">
<thead>
<tr>
<th style="text-align:center;" colspan="10"><h3><b>JUMLAH BERAT MENGIKUT MUTU (KESELURUHAN)</b></h3></th>
</tr>
<tr>
<td colspan="1" align="left"><strong>MUTU &nbsp;</strong></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>
<td colspan="1" align="center">{{$total24Kgb}}</td>
<td colspan="1" align="center">{{$total24K}}</td>
<td colspan="1" align="center">{{$total23k}}</td>
<td colspan="1" align="center">{{$total22K}}</td>
<td colspan="1" align="center">{{$total21K}}</td>
<td colspan="1" align="center">{{$total20K}}</td>
<td colspan="1" align="center">{{$total18Kp}}</td>
<td colspan="1" align="center">{{$total14K}}</td>
<td colspan="1" align="center">{{$total9K}}</td>
</tr>
</thead>
</table>
</tbody>
@@ -0,0 +1,186 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr:hover {}
#sim th {
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
text-align: left;
padding: 16px;
}
th{
text-align: left;
padding: 16px;
background-color:gainsboro;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
@foreach($datacaw as $data)
<tr>
<td colspan="2"><u><b>LAPORAN SIMULASI CAWANGAN: {{$data['caw_name']}}</b></u></td>
@endforeach
</tr>
</table>
{{-- <table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>ID Lelong: {{$lelong_id}}</td>
@foreach ($info as $info)
<td>Tarikh Lelong: @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $info->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa: {{$info->fasa}} </td>
@endforeach
@foreach ($arrayinfocaw as $laporancaw)
@foreach ($laporancaw['cawangan'] as $details)
<td>Cawangan : {{$details['caw_name']}}
@endforeach
@endforeach
</thead>
</table> --}}
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th>No</th>
<th>No Rujukan</th>
<th>Nama Pelanggan</th>
<th>Tempoh</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Caj Lelong (%)</th>
<th>Rugi Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
</tr>
</thead>
@foreach ($arraymarhun as $index=> $marhun)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $marhun['norujukan']}}</td>
<td>{{ $marhun['nama']}}</td>
<td>{{ number_format($marhun['tempoh'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
<?php
$rugi = 0;
$baki = 0;
if(strpos($marhun['baki'], '-') !== false)
{
$rugi = $marhun['baki'];
}
else {
$baki = $marhun['baki'];
}
?>
<td>{{number_format($rugi, 2, '.', ',')}}</td>
<td>{{number_format($baki, 2, '.', ',')}}</td>
</tr>
@endforeach
{{-- <tr>
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
<td><strong>{{ number_format($total_berat, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargalelong, 2, '.', ',') }}</strong></td>
<td></td>
</tr> --}}
</table>
</tbody>
+3 -5
View File
@@ -71,7 +71,7 @@ tr:nth-child(even) {
<table width="100%" border="0" id="sim">
<h3><b>Laporan Simulasi Cawangan: @foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}, @endforeach</b></h3>
<h3><b>Laporan Simulasi Cawangan: <br>@foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}<br> @endforeach</b></h3>
<br>
<h3><b>PERMODALAN KELANTAN BERHAD</b></h3>
@@ -87,7 +87,7 @@ tr:nth-child(even) {
<td>Bilangan Lelong: {{$total_marhun}}</td>
<td>Nilai Marhun Keseluruhan: RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>Pembiayaan Keseluruhan: RM{{ number_format($total_pinjaman, 2, '.', ',') }} </td>
<td>Keuntungan Keseluruhan:RM{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
<td>Keuntungan Keseluruhan:RM{{ number_format($total_bakiupah, 2, '.', ',') }}</td>
</thead>
</table>
@@ -97,7 +97,6 @@ tr:nth-child(even) {
<td>Rugi Lelong Keseluruhan: RM{{ number_format($total_rugilelong, 2, '.', ',') }}</td>
<td>Baki Lelong Keseluruhan: RM{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>Caj Lelong Keseluruhan: RM{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
@foreach ($data as $data)
<td>Tempoh: {{ $data['jbg']}}</td>
<td>Tarikh Lelong :@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
@@ -105,7 +104,6 @@ tr:nth-child(even) {
echo($datez);
@endphp
</td>
@endforeach
</tr>
</thead>
</table>
@@ -157,7 +155,7 @@ tr:nth-child(even) {
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakiupah, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
@@ -13,6 +13,7 @@
</div>
@endif
<div class="text-left pt-4">
<a href=" {{ route('report.simulasireport',[$simulasi_id,$cawid]) }}" class="btn btn-success">PDF</a>
<a href="{{ route('analisa.senaraimarhunlel',[$simulasi_id,$cawid]) }}" class="btn btn-success">Simulasi Lelong</a>
<a href="{{ route('analisa.listsagbycust',[$simulasi_id,'cawid'=>$cawid]) }}" class="btn btn-success">Senarai Mengikut Nama Pelangan</a>
</div>
@@ -358,11 +358,11 @@
buttons: [
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<i class="fas fa-download"></i>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Muat Turun PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
+7
View File
@@ -113,6 +113,9 @@ Route::group(['prefix'=>'lelong'], function () {
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
Route::get('/kemaskinidata/{lelong_id}',['as'=>'lelong.kemaskinidata','uses'=>'LelongController@kemaskinidata']);
Route::post('/exportlelong',['as'=>'lelong.exportlelong','uses'=>'LelongController@exportlelong']);
//pindahlelong
Route::get('/pindahsenarailelong',['as'=>'lelong.pindahsenarailelong','uses'=>'LelongController@pindahsenarailelong']);
Route::get('/temppindahsenarailelong/{lelong_id}',['as'=>'lelong.temppindahsenarailelong','uses'=>'LelongController@temppindahsenarailelong']);
@@ -351,6 +354,9 @@ Route::get('/laplelong/{lelong_id}/{kodcaw}',['as' =>'report.laplelong','uses'=>
Route::get('/lapbrglelpembidaindex',['as'=>'report.lapbrglelpembidaindex','uses'=>'ReportController@lapbrglelpembidaindex']);
Route::get('/lapbrglelpembida/{lelong_id}/{kodcaw}',['as'=>'report.lapbrglelpembida','uses'=>'ReportController@lapbrglelpembida']);
Route::get('/simulasireport/{simulasi_id}/{cawid}',['as'=>'report.simulasireport','uses'=>'ReportController@simulasireport']);
});
@@ -378,6 +384,7 @@ Route::get('laporanbrglelpembidacaw/{lelong_id}',['as'=>'reportcaw.laporanbrglel
});