Merged in izzati-hotfix-laporan (pull request #58)
update pdf laporan simulasi lelong tagujrah
This commit is contained in:
@@ -3979,12 +3979,14 @@ class LelongController extends Controller
|
||||
$total_nilaimarhun = 0;
|
||||
$nilai_marhun = 0;
|
||||
$total_bakiupah = 0;
|
||||
$total_onepercent= 0;
|
||||
$total_ujrah = 0;
|
||||
|
||||
foreach($cawanganlel as $cawlel)
|
||||
{
|
||||
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
|
||||
$databid = LelongBid::select('lelongbid.jbg','lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.cajlelong','lelongbid.baki','lelongbid.nilaimarhun',
|
||||
'lelongbid.pinjaman','lelongbid.hargaasas','lelongbid.cajlelong','lelongbid.bakiupah')
|
||||
'lelongbid.pinjaman','lelongbid.hargaasas','lelongbid.cajlelong','lelongbid.bakiupah','lelongbid.onepercent','lelongbid.ujrah')
|
||||
->where('caw_id','=',$cawlel->caw_id)->where('lelong_id','=',$lelong_id)->get();
|
||||
|
||||
// dd($databid->toArray());
|
||||
@@ -3997,6 +3999,9 @@ class LelongController extends Controller
|
||||
$cajlelong = 0;
|
||||
$rugilelong = 0;
|
||||
$bakilelong = 0;
|
||||
$onepercent = 0;
|
||||
$ujrah = 0;
|
||||
|
||||
|
||||
foreach($databid as $index1=>$bid)
|
||||
{
|
||||
@@ -4007,11 +4012,16 @@ class LelongController extends Controller
|
||||
$bakiupah = $bakiupah + $bid['bakiupah'];
|
||||
$hargaasas = $hargaasas + $bid['hargaasas'];
|
||||
$cajlelong = $cajlelong + $bid['cajlelong'];
|
||||
if($lelong->tagujrah == '1'){
|
||||
$onepercent = $onepercent + $bid['onepercent'];
|
||||
$ujrah = $ujrah + $bid['ujrah'];
|
||||
}
|
||||
|
||||
$lelongsim = Lelong::where('id', $lelong_id )->get();
|
||||
$sumcajlelong = $bid['hargaasas'] * ($lelongsim[0]['cajlelong']/100);
|
||||
$cajlelong = $cajlelong + bcdiv($sumcajlelong,1,1);
|
||||
$totalbaki = $bid['hargaasas'] - $bid['pinjaman'] - $bid['bakiupah'] - bcdiv($sumcajlelong,1,1);
|
||||
|
||||
|
||||
if($totalbaki > 0)
|
||||
{
|
||||
@@ -4081,6 +4091,9 @@ class LelongController extends Controller
|
||||
'pinjaman'=>$pinjaman,
|
||||
'upahsimpan'=>$bakiupah,
|
||||
'bakiupah'=>$bakiupah,
|
||||
'onepercent'=>$onepercent,
|
||||
'ujrah'=>$ujrah,
|
||||
'tagujrah'=>$lelong->tagujrah,
|
||||
'hargaasas'=>$hargaasas,
|
||||
'cajlelong'=>$cajlelong,
|
||||
'rugilelong'=>$rugilelong,
|
||||
@@ -4096,12 +4109,17 @@ class LelongController extends Controller
|
||||
$total_bakilelong = $total_bakilelong + $bakilelong;
|
||||
$total_nilaimarhun = $total_nilaimarhun + $nilai_marhun;
|
||||
$total_bakiupah = $total_bakiupah + $bakiupah;
|
||||
if($lelong->tagujrah == '1'){
|
||||
$total_onepercent = $total_onepercent + $onepercent;
|
||||
$total_ujrah = $total_ujrah + $ujrah;
|
||||
}
|
||||
|
||||
|
||||
$data = Lelong::where('lelong.id','=',$lelong_id)
|
||||
->first();
|
||||
}
|
||||
|
||||
|
||||
$tagujrah = $lelong->tagujrah;
|
||||
$pdf = PDF::loadView('pdf.lelreport',compact('arraycaw',
|
||||
'total_marhun',
|
||||
'total_berat',
|
||||
@@ -4128,7 +4146,10 @@ class LelongController extends Controller
|
||||
'jeniskarat',
|
||||
'data',
|
||||
'total_bakiupah',
|
||||
'total_nilaimarhun'
|
||||
'total_nilaimarhun',
|
||||
'total_onepercent',
|
||||
'total_ujrah',
|
||||
'tagujrah'
|
||||
))->setPaper('a4', 'landscape');
|
||||
return $pdf->download('Lelong Simulasi Keseluruhan.pdf');
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ use App\Models\SimKarat_temp;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use PDF;
|
||||
|
||||
class SimulasiUjrahController extends Controller
|
||||
{
|
||||
@@ -1254,8 +1255,8 @@ class SimulasiUjrahController extends Controller
|
||||
|
||||
//kiraan keuntungan ujrah
|
||||
$jeniskeuntungan = 'onepercent';
|
||||
$keuntungan1 = Http::get(config('app.api_ujrah_url'). 'upahrebettawarruq/'.$cawanganDetail->caw_code.'/'.$datagadai->norujukan.'/'.$jeniskeuntungan)->json();
|
||||
$ujrahonepercentrebet = Http::get(config('app.api_ujrah_url'). 'kiraupahUjrahOnePercentRebate/'.$cawanganDetail->caw_code.'/'.$datagadai->norujukan)->json();
|
||||
$keuntungan1 = Http::get(config('app.api_ujrah_url'). 'upahrebettawarruq/'.$details.'/'.$surats['norujukan'].'/'.$jeniskeuntungan)->json();
|
||||
$ujrahonepercentrebet = Http::get(config('app.api_ujrah_url'). 'kiraupahUjrahOnePercentRebate/'.$details.'/'.$surats['norujukan'])->json();
|
||||
$keuntungan = $keuntungan1['pendapatan'];
|
||||
$rounded_ujrah = $ujrahonepercentrebet['ujrah'];
|
||||
$rounded_onepercent = $ujrahonepercentrebet['onepercent'];
|
||||
@@ -1278,10 +1279,236 @@ class SimulasiUjrahController extends Controller
|
||||
'senarai',
|
||||
'keuntungan',
|
||||
't_gadais',
|
||||
'ktlhbyr'
|
||||
'ktlhbyr','rounded_ujrah','rounded_onepercent'
|
||||
|
||||
));
|
||||
}
|
||||
|
||||
public function export(Request $request)
|
||||
{
|
||||
$simulasi_id = $request->simulasiid;
|
||||
|
||||
$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 = [];
|
||||
$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_bakiupah = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
$total_onepercent = 0;
|
||||
$total_ujrah = 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')
|
||||
// ->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','simulasibid.onepercent','simulasibid.ujrah')
|
||||
->where('caw_id','=',$cawsim->caw_id)->where('simulasi_id','=',$simulasi_id)->get();
|
||||
// ->toArray();
|
||||
|
||||
$packet = 0;
|
||||
$berat = 0;
|
||||
$nilai_marhun = 0;
|
||||
$pinjaman =0;
|
||||
$bakiupah = 0;
|
||||
$onepercent = 0;
|
||||
$ujrah = 0;
|
||||
$hargaasas = 0;
|
||||
$cajlelong = 0;
|
||||
$rugilelong = 0;
|
||||
$bakilelong = 0;
|
||||
|
||||
// $keuntungan = 0;
|
||||
// $total_upahkeuntungan = 0;
|
||||
|
||||
|
||||
foreach($databid as $index1=>$bid)
|
||||
{
|
||||
$marhun = SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])->get();
|
||||
$berat = $berat + $bid['berat'];
|
||||
// $nilai_marhun = $nilai_marhun + ($marhun->sum('n_marhun'));
|
||||
$nilai_marhun = $nilai_marhun + $bid['nilaimarhun'];
|
||||
$pinjaman =$pinjaman + $bid['pinjaman'];
|
||||
$bakiupah = $bakiupah + $bid['bakiupah'];
|
||||
$onepercent = $onepercent + $bid['onepercent'];
|
||||
$ujrah = $ujrah + $bid['ujrah'];
|
||||
$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;
|
||||
|
||||
// // $total_upahkeuntungan = $total_upahkeuntungan + $keuntungan;
|
||||
// $total_upahkeuntungan = bcdiv($total_upahkeuntungan,1,1) + bcdiv($keuntungan,1,1);
|
||||
|
||||
$sumcajlelong = $bid['hargaasas'] * ($simulasi['cajlelong']/100);
|
||||
$cajlelongnew = round($sumcajlelong, 1, 1);
|
||||
$cajlelong = $cajlelong + $cajlelongnew;
|
||||
$totalbaki = $bid['hargaasas'] - $bid['pinjaman'] - $bid['bakiupah'] - $cajlelongnew;
|
||||
if(strpos($totalbaki, '-') !== false)
|
||||
{
|
||||
$rugi = -$totalbaki;
|
||||
$rugilelong += $rugi;
|
||||
}
|
||||
else {
|
||||
$baki = $totalbaki;
|
||||
$bakilelong += $baki;
|
||||
}
|
||||
|
||||
$total24Kgb += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','24.0Kgb')
|
||||
->sum('berat');
|
||||
|
||||
$total24K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','24.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total23k += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','23.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total22K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','22.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total21K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','21.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total20K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','20.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total18Kp += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','18.0Kp')
|
||||
->sum('berat');
|
||||
|
||||
$total18K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','18.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total14Kp += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','14.0Kp')
|
||||
->sum('berat');
|
||||
|
||||
$total14K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','14.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total9K += SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])
|
||||
->where('karat','=','9.0K')
|
||||
->sum('berat');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
array_push($arraycaw,[
|
||||
'id_cawangan'=> $cawangan['id'],
|
||||
'cawangan'=>$cawangan['caw_name'],
|
||||
't_lelong'=>$simulasi['tarikh_lelong'],
|
||||
'bil_marhun'=>sizeof($databid),
|
||||
'berat'=>$berat,
|
||||
'n_marhun'=>$nilai_marhun,
|
||||
'pinjaman'=>$pinjaman,
|
||||
'upahsimpan'=>$bakiupah,
|
||||
'bakiupah'=>$bakiupah,
|
||||
'onepercent'=>$onepercent,
|
||||
'ujrah'=>$ujrah,
|
||||
'hargaasas'=>$hargaasas,
|
||||
'cajlelong'=>$cajlelong,
|
||||
'rugilelong'=>$rugilelong,
|
||||
'bakilelong'=>$bakilelong,
|
||||
]);
|
||||
|
||||
|
||||
$total_marhun = $total_marhun + sizeof($databid);
|
||||
$total_berat = $total_berat + $berat;
|
||||
$total_nilaimarhun = $total_nilaimarhun + $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_bakiupah = $total_bakiupah + $bakiupah;
|
||||
$total_onepercent = $total_onepercent + $onepercent;
|
||||
$total_ujrah = $total_ujrah + $ujrah;
|
||||
|
||||
|
||||
$data = Simulasi::where('simulasi.id','=',$simulasi_id)
|
||||
->first();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.simrpt2ujrah',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',
|
||||
'simkarat',
|
||||
'simulasi_id',
|
||||
'jeniskarat',
|
||||
'data',
|
||||
'total_bakiupah',
|
||||
'total_onepercent',
|
||||
'total_ujrah',
|
||||
'total_nilaimarhun'
|
||||
))->setPaper('a4', 'landscape');
|
||||
return $pdf->download('Simulasi Keseluruhan.pdf');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ class AddOnepercentUjrahToLelongbidTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('lelongbid', function (Blueprint $table) {
|
||||
$table->decimal('ujrah', 5, 2);
|
||||
$table->decimal('onepercent', 5, 2);
|
||||
$table->decimal('ujrah', 9, 2);
|
||||
$table->decimal('onepercent', 9, 2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ class AddOnepercerntUjrahToSimulasibidTable extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::table('simulasibid', function (Blueprint $table) {
|
||||
$table->decimal('ujrah', 5, 2);
|
||||
$table->decimal('onepercent', 5, 2);
|
||||
$table->decimal('ujrah', 9, 2);
|
||||
$table->decimal('onepercent', 9, 2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
<table width="100%" border="0" id="sim">
|
||||
@@ -131,6 +130,11 @@
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
@if($tagujrah == 1)
|
||||
<th>1% (RM)</th>
|
||||
<th>Lain-Lain Caj (RM)</th>
|
||||
@endif
|
||||
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Baki Lelong (RM)</th>
|
||||
@@ -148,6 +152,10 @@
|
||||
<td align = 'right'>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['upahsimpan'], 2, '.', ',') }}</td>
|
||||
@if($tagujrah == 1)
|
||||
<td align = 'right'>{{ number_format($caw['onepercent'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['ujrah'], 2, '.', ',') }}</td>
|
||||
@endif
|
||||
<td align = 'right'>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
|
||||
@@ -163,6 +171,10 @@
|
||||
<td align = 'right'><b>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_pinjaman, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
|
||||
@if($tagujrah == 1)
|
||||
<td align = 'right'><b>{{ number_format($total_onepercent, 2, '.', ',') }}<b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_ujrah, 2, '.', ',') }}<b></td>
|
||||
@endif
|
||||
<td align = 'right'><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_bakilelong, 2, '.', ',') }}</b></td>
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
|
||||
<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%;
|
||||
}
|
||||
|
||||
#sim2 {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:10px;
|
||||
border-collapse: collapse;
|
||||
width: 40%;
|
||||
border: 0px solid #ddd;
|
||||
|
||||
}
|
||||
|
||||
#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: center;
|
||||
border: 0px solid;
|
||||
table-layout:auto;
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-right:-5px;
|
||||
margin-right:-5px;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Clearfix (clear floats) */
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 200%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: right;
|
||||
padding: 16px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th{
|
||||
text-align: center;
|
||||
padding: 16px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<u><b><h5>LAPORAN SIMULASI CAWANGAN</h5></b></u>
|
||||
</header>
|
||||
|
||||
|
||||
{{-- <table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
|
||||
<thead>
|
||||
<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 id="sim2">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- <td>Harga Asas Keseluruhan: RM{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
|
||||
<td>Caj Lelong Keseluruhan: RM{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
|
||||
<td>Baki Lelong Keseluruhan: RM{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
|
||||
<td>Rugi Lelong Keseluruhan: RM{{ number_format($total_rugilelong, 2, '.', ',') }}</td> --}}
|
||||
<div>Batch Lelong : {{$simulasi_id}}</div>
|
||||
<div>Tarikh Lelong :@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
|
||||
$datez = $myDateTime->format('d-m-Y');
|
||||
echo($datez);
|
||||
@endphp</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<div>Harga Emas Lelong 916: RM {{ $data['harga_emas_asas']}}</div>
|
||||
<div>Tempoh: {{ $data['jbg']}}</div>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
<table width="100%" border="0" id="sim">
|
||||
<thead>
|
||||
<tr >
|
||||
<th>No</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Bil SAG</th>
|
||||
<th>Berat (gm)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Lain-Lain Caj (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 align = 'left' style="white-space: nowrap;">{{ $caw['cawangan'] }}</td>
|
||||
<td align = 'center'>{{ $caw['bil_marhun'] }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['upahsimpan'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['onepercent'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['ujrah'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
|
||||
<td align = 'right'>({{ number_format($caw['rugilelong'], 2, '.', ',') }})</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
|
||||
<td align = 'center'><b>{{ $total_marhun }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_berat, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_pinjaman, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_onepercent, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_ujrah, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>{{ number_format($total_bakilelong, 2, '.', ',') }}</b></td>
|
||||
<td align = 'right'><b>({{ number_format($total_rugilelong, 2, '.', ',') }})</b></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 </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>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-pane fade show active" id="nav-simulasi" role="tabpanel" aria-labelledby="nav-simulasi-tab">
|
||||
<form id="exportform" action="{{route('analisa.export')}}" method="POST">
|
||||
<form id="exportform" action="{{route('analisaujrah.export')}}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="User">
|
||||
<input type="hidden" name="simulasiid" value="{{ $simulasi_id }}">
|
||||
|
||||
@@ -130,6 +130,7 @@ Route::group(['middleware' => ['permission:analisaujrah'],'prefix'=>'analisaujra
|
||||
Route::get('/listsagbycust/{simulasi_id}/{cawid}',['as'=>'analisaujrah.listsagbycust','uses'=>'SimulasiUjrahController@listsagbycust']);
|
||||
Route::post('/kemaskini',['as'=>'analisaujrah.kemaskiniharga','uses'=>'SimulasiUjrahController@kemaskini2']);
|
||||
Route::get('/tempbycawsimulasi/{details}/{t_lelong}/{fasa}',['as'=>'analisaujrah.tempbycawsimulasi','uses'=>'SimulasiUjrahController@tempbycawsimulasi']);
|
||||
Route::post('/export',['as'=>'analisaujrah.export','uses'=>'SimulasiUjrahController@export']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['permission:sistem'],'prefix'=>'sistem'], function () {
|
||||
|
||||
Reference in New Issue
Block a user