tambah tagujrah,ujrah dan onepercent dlm arrahnbid

This commit is contained in:
Nur Izzati Zulkifli
2023-12-11 11:51:32 +08:00
parent 3aba20615c
commit e01835fb59
26 changed files with 370 additions and 113 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class kemaskiniLelong extends Command
$currentdate = $currentdate->toDateTimeString();
$data = [];
$lelongbids = LelongBid::where('status_jual',0)->where('ujrah','0')->get();
$lelongbids = LelongBid::where('status_jual',0)->where('tagujrah','0')->get();
foreach($lelongbids as $index=>$lelongbid){
$gadai = Gadai::on($lelongbid->kodcaw)->where('norujukan',$lelongbid->norujukan)->first();
+19 -4
View File
@@ -49,7 +49,7 @@ class kemaskiniLelongUjrah extends Command
$currentdate = $currentdate->toDateTimeString();
$data = [];
$lelongbids = LelongBid::where('status_jual',0)->where('ujrah','1')->get();
$lelongbids = LelongBid::where('status_jual',0)->where('tagujrah','1')->get();
// dd($lelongbids);
foreach($lelongbids as $index=>$lelongbid){
@@ -86,7 +86,13 @@ class kemaskiniLelongUjrah extends Command
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan.'/'.$jeniskeuntungan)->json();
$keuntungan1 = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan.'/'.$jeniskeuntungan)->json();
// $ujrahonepercent = Http::get(config('app.api_url'). 'lelong/kiraupahUjrahOnePercent/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan)->json();
$ujrahonepercentrebet = Http::get(config('app.api_url'). 'kiraupahUjrahOnePercentRebate/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan)->json();
$keuntungan = round(($keuntungan1*100)/5,0)*5/100;
$rounded_ujrah = round(($ujrahonepercentrebet['ujrah']*100)/5,0)*5/100;
$rounded_onepercent = round(($ujrahonepercentrebet['onepercent']*100)/5,0)*5/100;
// dd($ujrahonepercentrebet, $rounded_ujrah, $rounded_onepercent);
}
$checkdataxlaku = LelongBid::where('norujukan', $lelongbid->norujukan)
@@ -96,6 +102,8 @@ class kemaskiniLelongUjrah extends Command
$lelongbid->jbg = $gadai->tempoh;
$lelongbid->pinjaman = $gadai->bakipjm;
$lelongbid->bakiupah = $keuntungan;
$lelongbid->ujrah = $rounded_ujrah;
$lelongbid->onepercent = $rounded_onepercent;
$lelongbid->save();
}
}
@@ -121,7 +129,12 @@ class kemaskiniLelongUjrah extends Command
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan.'/'.$jeniskeuntungan)->json();
$keuntungan1 = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan.'/'.$jeniskeuntungan)->json();
$ujrahonepercentrebet = Http::get(config('app.api_url'). 'lelong/kiraupahUjrahOnePercentRebate/'.$lelongbid->kodcaw.'/'.$lelongbid->norujukan)->json();
$keuntungan = round(($keuntungan1*100)/5,0)*5/100;
$rounded_ujrah = round(($ujrahonepercentrebet['ujrah']*100)/5,0)*5/100;
$rounded_onepercent = round(($ujrahonepercentrebet['onepercent']*100)/5,0)*5/100;
// dd($ujrahonepercent, $ujrahonepercentrebet, $rounded_ujrah, $rounded_onepercent);
}
$checkdataxlaku = LelongBid::where('norujukan', $lelongbid->norujukan)
@@ -131,6 +144,8 @@ class kemaskiniLelongUjrah extends Command
$lelongbid->jbg = $gadai->tempoh;
$lelongbid->pinjaman = $gadai->bakipjm;
$lelongbid->bakiupah = $keuntungan;
$lelongbid->ujrah = $rounded_ujrah;
$lelongbid->onepercent = $rounded_onepercent;
$lelongbid->save();
}
}
@@ -145,7 +160,7 @@ class kemaskiniLelongUjrah extends Command
$lelongtebus->batch_no = $lelongbid->lelong_id;
$lelongtebus->nilaimarhun = $lelongbid->nilaimarhun;
$lelongtebus->pinjaman = $gadai->bakipjm;
$lelongtebus->upah = $gadai->bakiupah;
$lelongtebus->upah = $keuntungan ?? '0.00';
$lelongtebus->jbg = $gadai->tempoh;
$lelongtebus->jenis_tebus = $sebab_keluar;
$lelongtebus->save();
+76 -21
View File
@@ -231,6 +231,8 @@ class LelongController extends Controller
$total_cazlelong = 0;
$total_rugilelong = 0;
$total_bakilelong = 0;
$total_ujrah = 0;
$total_onepercent = 0;
$total24Kgb = 0;
$total24K = 0;
@@ -260,6 +262,8 @@ class LelongController extends Controller
$cajlelong = 0;
$rugilelong = 0;
$bakilelong = 0;
$ujrah = 0;
$onepercent = 0;
foreach ($caw['lelongBid'] as $lel_bid) {
$total_marhun += 1;
$nilai_marhun += $lel_bid->nilaimarhun;
@@ -267,6 +271,8 @@ class LelongController extends Controller
$bakiupah += $lel_bid->bakiupah;
$berat += $lel_bid->berat;
$hargaasas += $lel_bid->hargaasas;
$ujrah += $lel_bid->ujrah;
$onepercent += $lel_bid->onepercent;
//$cajlelong += $lel_bid->cajlelong;
$sumcajlelong = $lel_bid['hargaasas'] * ($lelong->cajlelong / 100);
@@ -321,6 +327,8 @@ class LelongController extends Controller
'cajlelong' => $cajlelong,
'rugilelong' => $rugilelong,
'bakilelong' => $bakilelong,
'ujrah' => $ujrah,
'onepercent' => $onepercent,
]);
$total_nilaimarhun += $nilai_marhun;
@@ -331,6 +339,8 @@ class LelongController extends Controller
$total_cazlelong += $cajlelong;
$total_berat += $berat;
$total_hargaasas += $hargaasas;
$total_ujrah += $ujrah;
$total_onepercent += $onepercent;
}
$tarikhkemaskini = $lelong->lelKarat[0];
@@ -347,6 +357,8 @@ class LelongController extends Controller
'total_cazlelong',
'total_rugilelong',
'total_bakilelong',
'total_ujrah',
'total_onepercent',
'total24Kgb',
'total24K',
'total23k',
@@ -1482,6 +1494,8 @@ class LelongController extends Controller
$keuntungan = 0;
$bakilelong = 0;
$total_cazlelong = 0;
$total_ujrah = 0;
$total_onepercent = 0;
// dd($cawid);
$lelonglel = Lelong::with('cawangan')->find($lelongid);
@@ -1508,6 +1522,8 @@ class LelongController extends Controller
$total_nilaimarhun = $total_nilaimarhun + $cal['nilaimarhun'];
$total_bakiupah = $total_bakiupah + $cal['bakiupah'];
$total_cazlelong = $total_cazlelong + $cajlelongnew;
$total_ujrah += $cal['ujrah'];
$total_onepercent += $cal['onepercent'];
array_push($arraymarhun,[
'norujukan' => $cal['norujukan'],
@@ -1519,6 +1535,8 @@ class LelongController extends Controller
'bakiupah' => $cal['bakiupah'],
'cajlelong' => $cajlelongnew,
'baki' => $cal['baki'],
'ujrah' => $cal['ujrah'],
'onepercent' => $cal['onepercent'],
]);
}
@@ -1545,6 +1563,8 @@ class LelongController extends Controller
'total_upah',
'total_hargaasas',
'total_bakiupah',
'total_ujrah',
'total_onepercent',
'total_nilaimarhun',
'lelonglel',
'cawanganDetail',
@@ -3710,7 +3730,7 @@ class LelongController extends Controller
$lelongbid_keyby_norujukan = $caw->lelongBid->keyBy('norujukan');
$gadai_all = Gadai::on($cawanganDetail->caw_code)->whereIn('norujukan', $lelongbid_data_pluck_norujukan)
->select('kadarupah','nokp','tempoh','tempohbayar','norujukan','berat','nilaimarhun','pinjaman','bakipjm','bakiupah','hargajualan','bakihargajualan')
->select('kadarupah','nokp','tempoh','tempohbayar','norujukan','berat','nilaimarhun','pinjaman','bakipjm','bakiupah','hargajualan','bakihargajualan','tagbaru')
->orderBy('norujukan','ASC')
->get();
@@ -3773,26 +3793,61 @@ class LelongController extends Controller
$beza_keuntungan = bcdiv($beza_keuntungan, 1, 2);
// dd($beza_keuntungan);
// dd(true);
$jbg = $datagadai->tempoh - $datagadai->tempohbayar;
$jbg2 = 12 - $datagadai->tempohbayar;
if($datagadai->tempoh <= '12.00'){
$keuntungan = bcdiv(($jbg)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}else{
$keuntungan = bcdiv(($jbg2)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
if($datagadai->tagbaru == 0){
$jbg = $datagadai->tempoh - $datagadai->tempohbayar;
$jbg2 = 12 - $datagadai->tempohbayar;
if($datagadai->tempoh <= '12.00'){
$keuntungan = bcdiv(($jbg)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}else{
$keuntungan = bcdiv(($jbg2)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}
}elseif($datagadai->tagbaru == 1){
if($datagadai->tempohbayar == 12){
$keuntungan = 0.00;
}
elseif($datagadai->tempohbayar == $datagadai->tempoh ){
$keuntungan = 0.00;
}
else{
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan1 = Http::get(config('app.api_url'). 'upahtawarruq/'.$cawanganDetail->caw_code.'/'.$datagadai->norujukan.'/'.$jeniskeuntungan)->json();
$keuntungan = round(($keuntungan1*100)/5,0)*5/100;
// dd($keuntungan);
}
}
}
else{
// dd(false);
$jbg = $datagadai->tempoh - $datagadai->tempohbayar;
$jbg2 = 12 - $datagadai->tempohbayar;
$beza_keuntungan = 0.00;
// dd($beza_keuntungan);
if($datagadai->tempoh <= '12.00'){
// dd($jbg,$datagadai->kadarupah, $datagadai->bakipjm);
$keuntungan = bcdiv(($jbg)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}else{
// dd(false);
$keuntungan = bcdiv(($jbg2)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
if($datagadai->tagbaru == 0){
$jbg = $datagadai->tempoh - $datagadai->tempohbayar;
$jbg2 = 12 - $datagadai->tempohbayar;
$beza_keuntungan = 0.00;
// dd($beza_keuntungan);
if($datagadai->tempoh <= '12.00'){
// dd($jbg,$datagadai->kadarupah, $datagadai->bakipjm);
$keuntungan = bcdiv(($jbg)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}else{
// dd(false);
$keuntungan = bcdiv(($jbg2)*$datagadai->kadarupah/100*$datagadai->bakipjm,1,1)-$beza_keuntungan;
}
}elseif($datagadai->tagbaru == 1){
if($datagadai->tempohbayar == 12){
$keuntungan = 0.00;
}
elseif($datagadai->tempohbayar == $datagadai->tempoh ){
$keuntungan = 0.00;
}
else{
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan1 = Http::get(config('app.api_url'). 'upahtawarruq/'.$cawanganDetail->caw_code.'/'.$datagadai->norujukan.'/'.$jeniskeuntungan)->json();
$keuntungan = round(($keuntungan1*100)/5,0)*5/100;
// dd($keuntungan);
}
}
}
$lelongbid_true = $lelongbid_keyby_norujukan[$datagadai->norujukan];
@@ -5697,7 +5752,7 @@ class LelongController extends Controller
$total_nilaimarhun = 0;
$keuntungan = 0;
$total_cazlelong = 0;
$lelonglel = Lelong::where('id','=',$lelongid)->first();
$marhuns = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
->where('lelong_id','=',$lelongid)->where('caw_id','=',$cawid)
->where('status_jual','=',0)
@@ -5736,7 +5791,7 @@ class LelongController extends Controller
->orWhere('kplama','=',$gadai['nokp'])
->first();
// dd($customer);
$lelonglel = Lelong::where('id','=',$lelongid)->first();
$sumcajlelong = $cal['hargaasas'] * ($lelonglel->cajlelong/100);
$cajlelongnew = round($sumcajlelong,1,1);
$totalbaki = $cal['hargaasas'] - $cal['pinjaman'] - $cal['bakiupah'] - $cajlelongnew;
@@ -5787,7 +5842,7 @@ class LelongController extends Controller
->toArray();
array_push($arrayinfo,['laporan' => $laporan,'details' => $details]);
}
return view('lelong.senaraimarhunpc',compact('totalbaki','arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
return view('lelong.senaraimarhunpc',compact('lelonglel','totalbaki','arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
'total_pinjaman',
'total_upah',
'total_hargaasas',
@@ -56,7 +56,7 @@ class LelongUjrahController extends Controller
$lelong->cajlelong = $simulasi->cajlelong;
$lelong->fasa = $simulasi->fasa;
$lelong->kali = $simulasi->kali;
$lelong->ujrah = 1;
$lelong->tagujrah = 1;
$lelong->save();
@@ -90,7 +90,7 @@ class LelongUjrahController extends Controller
$caw_lelong->lokasi = $caw->lokasi;
$caw_lelong->fasa = $caw->fasa;
$caw_lelong->kali = $caw->kali;
$caw_lelong->ujrah = 1;
$caw_lelong->tagujrah = 1;
$caw_lelong->save();
$datasimbid = SimulasiBid::where('caw_id','=',$caw->caw_id)->where('simulasi_id',$id)->get();
@@ -126,7 +126,7 @@ class LelongUjrahController extends Controller
"status_payment" => 0,
"mora_upah" => 0,
"fasa" => $data->fasa,
"ujrah" => 1
"tagujrah" => 1
]);
@@ -179,7 +179,7 @@ class LelongUjrahController extends Controller
}
$simulasi = Simulasi::where('id','=',$id)->where('ujrah', 1)->first();
$simulasi = Simulasi::where('id','=',$id)->where('tagujrah', 1)->first();
// dd($role);
$simulasi->delete();
+8 -4
View File
@@ -610,13 +610,15 @@ class ReportAllController extends Controller
$total_hargalelong = 0;
$total_bakirugi = 0;
$total_hargaasas = 0;
$total_onepercent = 0;
$total_ujrah = 0;
$arrayinfocaw = [];
$info = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan.caw_code','=',$kodcaw)
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->select('lelong_id','tarikh_lelong','lelong.fasa')
->select('lelong_id','tarikh_lelong','lelong.fasa','lelong.tagujrah')
->groupBy('lelong_id')
->get();
@@ -635,7 +637,7 @@ class ReportAllController extends Controller
->where('lelongbid.kodcaw','=',$kodcaw)
->where('lelongbidder.status_bidder','=','1')
->select('lelongbid.norujukan','lelongbid.nilaimarhun','lelongbid.pinjaman','lelongbid.bakiupah',
'lelongbid.cajlelong','lelongbidder.hargabida','lelongbid.baki','lelongbid.hargaasas','lelongbidder.nama_bidder')
'lelongbid.cajlelong','lelongbidder.hargabida','lelongbid.baki','lelongbid.hargaasas','lelongbidder.nama_bidder','lelongbid.tagujrah','lelongbid.ujrah','lelongbid.onepercent')
->get()->toArray();
foreach($laporanlelong as $index1=>$laplelong)
@@ -645,6 +647,8 @@ class ReportAllController extends Controller
$total_nmarhun = $total_nmarhun + $laplelong['nilaimarhun'];
$total_pembiayaan = $total_pembiayaan + $laplelong['pinjaman'];
$total_upahsimpan = $total_upahsimpan + $laplelong['bakiupah'];
$total_onepercent += $laplelong['onepercent'];
$total_ujrah += $laplelong['ujrah'];
$total_cajlelong = $total_cajlelong + $laplelong['cajlelong'];
$total_hargalelong = $total_hargalelong + $laplelong['hargabida'];
$total_bakirugi = $total_bakirugi + $laplelong['baki'];
@@ -652,11 +656,11 @@ class ReportAllController extends Controller
$laporanlelong[$index1]['margin']=$margin;
}
}
$pdf = PDF::loadView('pdf.laporanlelfullcaw',compact('info','lelong_id','laporanlelong','lelong_id','total_nmarhun','total_pembiayaan',
'total_upahsimpan','total_cajlelong','total_hargalelong','total_bakirugi','total_hargaasas','arrayinfocaw'))
'total_upahsimpan','total_cajlelong','total_hargalelong','total_bakirugi','total_hargaasas','arrayinfocaw','total_ujrah','total_onepercent'))
->setPaper('a4', 'landscape');
return $pdf->download('Laporan Lelong Keseluruhan.pdf');
+19 -5
View File
@@ -426,6 +426,8 @@ class ReportController extends Controller
$total_hargalelong = 0;
$total_bakirugi = 0;
$total_hargaasas = 0;
$total_onepercent = 0;
$total_ujrah = 0;
$jumlahmargin = 0;
$arrayinfocaw = [];
$arraydetails = [];
@@ -440,7 +442,7 @@ class ReportController extends Controller
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan.caw_code',$kodcaw)
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->select('lelong_id','tarikh_lelong','lelong.fasa')
->select('lelong_id','tarikh_lelong','lelong.fasa','lelong.tagujrah')
->groupBy('lelong_id')
->get();
@@ -459,7 +461,7 @@ class ReportController extends Controller
->where('lelongbidder.status_bidder','=','1')
->where('lelongbid.kodcaw',$kodcaw)
->select('lelongbid.norujukan','lelongbid.nilaimarhun','lelongbid.pinjaman','lelongbid.bakiupah','lelongbid.berat',
'lelongbid.cajlelong','lelongbidder.hargabida','lelongbid.baki','lelongbid.hargaasas','lelongbidder.nama_bidder')
'lelongbid.cajlelong','lelongbidder.hargabida','lelongbid.baki','lelongbid.hargaasas','lelongbidder.nama_bidder','lelongbid.tagujrah','lelongbid.ujrah','lelongbid.onepercent')
->get()->toArray();
foreach($laporanlelong as $index1=>$laplelong)
@@ -495,6 +497,8 @@ class ReportController extends Controller
$total_hargalelong = $total_hargalelong + $laplelong['hargabida'];
$total_bakirugi = $total_bakirugi + $laplelong['baki'];
$total_hargaasas = $total_hargaasas + $laplelong['hargaasas'];
$total_onepercent += $laplelong['onepercent'];
$total_ujrah += $laplelong['ujrah'];
array_push($arraydetails,['laplelong' => $laplelong,
'margin' => $margin,
@@ -515,7 +519,7 @@ class ReportController extends Controller
$pdf = PDF::loadView('pdf.pdflaplelong',compact('info','lelong_id','laporanlelong','lelong_id','total_nmarhun','total_pembiayaan',
'total_upahsimpan','total_cajlelong','total_hargalelong','total_bakirugi','total_hargaasas','arrayinfocaw','margin','arraydetails',
'total_rugilelong','total_bakilelong','bakilelong','rugilelong','total_berat'))
'total_rugilelong','total_bakilelong','bakilelong','rugilelong','total_berat','total_onepercent','total_ujrah'))
->setPaper('a4', 'landscape');
return $pdf->download('Laporan Lelong Keseluruhan.pdf');
@@ -850,6 +854,8 @@ class ReportController extends Controller
$total_upah = 0;
$total_hargaasas = 0;
$total_bakiupah = 0;
$total_onepercent = 0;
$total_ujrah = 0;
$total_nilaimarhun = 0;
$keuntungan = 0;
$bakilelong = 0;
@@ -872,8 +878,12 @@ class ReportController extends Controller
'lelongbid.cajlelong',
'lelongbid.baki',
'lelongbid.bakiupah',
'lelongbid.onepercent',
'lelongbid.ujrah',
'lelongbid.status_jual',
'lelongbid.jbg'
'lelongbid.jbg',
'lelongbid.tagujrah'
)
->get()->toArray();
// dd($marhuns);
@@ -923,6 +933,8 @@ class ReportController extends Controller
$total_nilaimarhun = $total_nilaimarhun + $cal['nilaimarhun'];
$total_bakiupah = $total_bakiupah + $cal['bakiupah'];
$total_cazlelong = $total_cazlelong + $cajlelongnew;
$total_onepercent += $cal['onepercent'];
$total_ujrah += $cal['ujrah'];
}
@@ -930,7 +942,7 @@ class ReportController extends Controller
$lelong_id = Lelong::join('cawangan_lelong','lelong.id','=','cawangan_lelong.lelong_id')
->where('cawangan_lelong.lelong_id','=',$lelongid)
->select('lelong_id','tarikh_lelong','lelong.fasa')
->select('lelong_id','tarikh_lelong','lelong.fasa','lelong.tagujrah')
->groupBy('lelong_id')
->get()->toArray();
@@ -952,6 +964,8 @@ class ReportController extends Controller
'total_upah',
'total_hargaasas',
'total_bakiupah',
'total_onepercent',
'total_ujrah',
'total_nilaimarhun',
'total_cazlelong'))
->setPaper('a4','potrait');
+2 -2
View File
@@ -292,7 +292,7 @@ class SimulasiController extends Controller
'fasa' => $fasa,
'kali' => $kali,
'success_import' => 1,
'ujrah' => 0
'tagujrah' => 0
]);
//create harga asas berdasarkan input harga asas
@@ -707,7 +707,7 @@ class SimulasiController extends Controller
public function senaraisimulasi()
{
$simulasiAll = Simulasi::with('cawangan')->where('ujrah', 0)->orderBy('id', 'desc')->get();
$simulasiAll = Simulasi::with('cawangan')->where('tagujrah', 0)->orderBy('id', 'desc')->get();
return view('simulasi.senaraisimulasi',compact('simulasiAll'));
}
@@ -232,7 +232,7 @@ class SimulasiUjrahController extends Controller
'fasa' => $fasa,
'kali' => $kali,
'success_import' => 1,
'ujrah' => 1
'tagujrah' => 1
]);
//create harga asas berdasarkan input harga asas
@@ -264,7 +264,7 @@ class SimulasiUjrahController extends Controller
$caw_simulasi->lokasi = $cawsimulasi['cawangan']->lokasi;
$caw_simulasi->fasa = $request->fasa;
$caw_simulasi->kali = $request->kali;
$caw_simulasi->ujrah = 1;
$caw_simulasi->tagujrah = 1;
$caw_simulasi->save();
$suratcaw = $cawsimulasi['data'];
@@ -296,7 +296,7 @@ class SimulasiUjrahController extends Controller
$simulasi_to_be_inserted->status_payment = 0;
$simulasi_to_be_inserted->mora_upah = 0;
$simulasi_to_be_inserted->fasa = $request->fasa;
$simulasi_to_be_inserted->ujrah = 1;
$simulasi_to_be_inserted->tagujrah = 1;
$simulasi_bid_arr[] = $simulasi_to_be_inserted->attributesToArray();
}
@@ -360,7 +360,7 @@ class SimulasiUjrahController extends Controller
}
public function senaraisimulasi()
{
$simulasiAll = Simulasi::with('cawangan')->where('ujrah', 1)->orderBy('id', 'desc')->get();
$simulasiAll = Simulasi::with('cawangan')->where('tagujrah', 1)->orderBy('id', 'desc')->get();
return view('simulasiujrah.senaraisimulasi',compact('simulasiAll'));
}
@@ -479,12 +479,16 @@ class SimulasiUjrahController extends Controller
$total_untung_asal = TransaksiKeuntungan::on('main')->where('norujukan','=',$data['norujukan'])->sum('bayaran_keuntungan');
$beza_keuntungan = $total_untung_asal - $total_untung_rebet;
$jbg = $data['tempoh']-$data['tempohbayar'];
$jbg2 = 12- $data['tempohbayar'];
if($data['tempoh'] <= '12.00'){
$keuntungan = bcdiv(($jbg)*$data['kadarupah']/100*$data['bakipjm'],1,1)-$beza_keuntungan;
if($data['tempoh'] == $data['tempohbayar']){
$keuntungan = 0.00;
}else{
$keuntungan = bcdiv(($jbg2)*$data['kadarupah']/100*$data['bakipjm'],1,1)-$beza_keuntungan;
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$data['kodcaw'].'/'.$data['norujukan'].'/'.$jeniskeuntungan)->json();
$ujrahonepercentrebet = Http::get(config('app.api_url'). 'kiraupahUjrahOnePercentRebate/'.$data['kodcaw'].'/'.$data['norujukan'])->json();
$rounded_keuntungan = round(($keuntungan*100)/5,0)*5/100;
$rounded_ujrah = round(($ujrahonepercentrebet['ujrah']*100)/5,0)*5/100;
$rounded_onepercent = round(($ujrahonepercentrebet['onepercent']*100)/5,0)*5/100;
}
// dd($keuntungan);
//update dalam simulasibid
@@ -493,7 +497,10 @@ class SimulasiUjrahController extends Controller
->first();
$updatetempoh->jbg = $data['tempoh'];
$updatetempoh->pinjaman = $data['bakipjm'];
$updatetempoh->bakiupah = bcdiv($keuntungan,1,1);
// $updatetempoh->bakiupah = bcdiv($keuntungan,1,1);
$updatetempoh->bakiupah = $rounded_keuntungan;
$updatetempoh->ujrah = $rounded_ujrah;
$updatetempoh->onepercent = $rounded_onepercent;
$updatetempoh->update();
//insert loguser
@@ -555,12 +562,16 @@ class SimulasiUjrahController extends Controller
$total_untung_asal = TransaksiKeuntungan::on('main')->where('norujukan','=',$data['norujukan'])->sum('bayaran_keuntungan');
$beza_keuntungan = $total_untung_asal - $total_untung_rebet;
$jbg = $data['tempoh']-$data['tempohbayar'];
$jbg2 = 12- $data['tempohbayar'];
if($data['tempoh'] <= '12.00'){
$keuntungan = bcdiv(($jbg)*$data['kadarupah']/100*$data['bakipjm'],1,1)-$beza_keuntungan;
if($data['tempoh'] == $data['tempohbayar']){
$keuntungan = 0.00;
}else{
$keuntungan = bcdiv(($jbg2)*$data['kadarupah']/100*$data['bakipjm'],1,1)-$beza_keuntungan;
//kiraan keuntungan ujrah
$jeniskeuntungan = 'onepercent';
$keuntungan = Http::get(config('app.api_url'). 'upahrebettawarruq/'.$data['kodcaw'].'/'.$data['norujukan'].'/'.$jeniskeuntungan)->json();
$ujrahonepercentrebet = Http::get(config('app.api_url'). 'kiraupahUjrahOnePercentRebate/'.$data['kodcaw'].'/'.$data['norujukan'])->json();
$rounded_keuntungan = round(($keuntungan*100)/5,0)*5/100;
$rounded_ujrah = round(($ujrahonepercentrebet['ujrah']*100)/5,0)*5/100;
$rounded_onepercent = round(($ujrahonepercentrebet['onepercent']*100)/5,0)*5/100;
}
// dd($keuntungan);
//update dalam simulasibid
@@ -569,7 +580,10 @@ class SimulasiUjrahController extends Controller
->first();
$updatetempoh->jbg = $data['tempoh'];
$updatetempoh->pinjaman = $data['bakipjm'];
$updatetempoh->bakiupah = bcdiv($keuntungan,1,1);
// $updatetempoh->bakiupah = bcdiv($keuntungan,1,1);
$updatetempoh->bakiupah = $rounded_keuntungan;
$updatetempoh->ujrah = $rounded_ujrah;
$updatetempoh->onepercent = $rounded_onepercent;
$updatetempoh->update();
//insert loguser
@@ -600,7 +614,7 @@ class SimulasiUjrahController extends Controller
{
$simulasi_id = $id;
$simulasi = Simulasi::with(['cawangan', 'simulasiBid.simulasiBidMarhun', 'simkarat'])
->where('ujrah',1)
->where('tagujrah',1)
->find($id);
$data = $simulasi;
$simkarat = $simulasi->simkarat;
+3 -1
View File
@@ -38,7 +38,9 @@ class LelongBid extends Model
'status_payment',
'mora_upah',
'fasa',
'ujrah'
'tagujrah',
'ujrah',
'onepercent'
];
public function cawangan()
+1 -1
View File
@@ -20,7 +20,7 @@ class Simulasi extends Model
'cajlelong',
'fasa',
'success_import',
'ujrah'
'tagujrah'
];
public function cawangan()
@@ -14,15 +14,15 @@ class AddUjrahToSimulasisTable extends Migration
public function up()
{
Schema::table('simulasi', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
Schema::table('cawangan_simulasi', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
Schema::table('simulasibid', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
}
@@ -34,15 +34,15 @@ class AddUjrahToSimulasisTable extends Migration
public function down()
{
Schema::table('simulasi', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
Schema::table('cawangan_simulasi', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
Schema::table('simulasibid', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
}
@@ -14,15 +14,15 @@ class AddUjrahToLelongTable extends Migration
public function up()
{
Schema::table('lelong', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
Schema::table('cawangan_lelong', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
Schema::table('lelongbid', function (Blueprint $table) {
$table->integer('ujrah')->default(0);
$table->integer('tagujrah')->default(0);
});
}
@@ -34,15 +34,15 @@ class AddUjrahToLelongTable extends Migration
public function down()
{
Schema::table('lelong', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
Schema::table('cawangan_lelong', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
Schema::table('lelongbid', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('tagujrah');
});
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddOnepercentUjrahToLelongbidTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('lelongbid', function (Blueprint $table) {
$table->decimal('ujrah', 5, 2);
$table->decimal('onepercent', 5, 2);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('lelongbid', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('onepercent');
});
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddOnepercerntUjrahToSimulasibidTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('simulasibid', function (Blueprint $table) {
$table->decimal('ujrah', 5, 2);
$table->decimal('onepercent', 5, 2);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('simulasibid', function (Blueprint $table) {
$table->dropColumn('ujrah');
$table->dropColumn('onepercent');
});
}
}
+1 -23
View File
@@ -295,29 +295,7 @@
</li>
</ul>
</li>
{{-- <li class="{{ (request()->is('')) ? 'active' : '' }}">
<a href="#bukasekatanSubmenu" data-toggle="collapse" aria-expanded="false">
<div class="sidebar-menu">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
unpublished
</span>
Buka Sekatan(Tebus)
</div>
<span class="material-symbols-rounded sidebar-menu-item-expand">expand_more</span>
</div>
</a>
<ul class="list-unstyled collapse {{ (request()->is('bukasekatan/*')) ? 'show' : '' }}" id="bukasekatanSubmenu">
<li class="{{ (request()->is('bukasekatan/bukasekatantebus/*') || request()->is('bukasekatan/bukasekatantebus') ) ? 'active' : '' }}">
<a href="{{url('bukasekatan/bukasekatantebus')}}">Mohon Buka Sekatan</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('bukasekatan/*')) ? 'show' : '' }}" id="bukasekatanSubmenu">
<li class="{{ (request()->is('bukasekatan/listbukasekatantebus/*') || request()->is('bukasekatan/listbukasekatantebus') ) ? 'active' : '' }}">
<a href="{{url('bukasekatan/listbukasekatantebus')}}">Senarai Buka Sekatan</a>
</li>
</ul>
</li> --}}
<li class="{{ (request()->is('')) ? 'active' : '' }}">
<a href="#tangguhSubmenu" data-toggle="collapse" aria-expanded="false">
<div class="sidebar-menu">
@@ -50,7 +50,7 @@
@endphp</td>
<td>{{ $bid['lelong_info']->fasa }}</td>
<td class="text-center">
<a class="btn m-1 btn-info" href="{{ route('reportbycaw.laporanlelongbycawdetailpdf',['lelong_id'=>$bid['lelong_info']['id'],'kodcaw' =>$cawanganDetail->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="fas fa-download"></i></a>
<a class="btn m-1 btn-info" href="{{ route('reportbycaw.laporanlelongbycawdetailpdf',['lelong_id'=>$bid['lelong_info']['id'],'kodcaw' =>$cawanganDetail->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="Laporan Lelongan" ><i class="fas fa-download"></i></a>
</td>
</tr>
@endforeach
@@ -34,9 +34,9 @@
<input type="hidden" name="lelongid" value="{{$lelongid}}">
<input type="hidden" name="cawid" value="{{$cawid}}">
<table class="table text-center table-bordered" id="marhun" >
@if($lelonglel->ujrah == '0')
@if($lelonglel->tagujrah == '0')
<thead class="bg-primary text-white" >
@elseif($lelonglel->ujrah == '1')
@elseif($lelonglel->tagujrah == '1')
<thead class="bg-success text-white" >
@endif
<tr>
@@ -83,9 +83,9 @@
<td><span class="badge badge-pill badge-info">LELONG BELUM MULA</span></td>
<td style="white-space: nowrap;">
{{-- <a class="btn m-1 btn-warning confirmrefresh" href="{{ route('lelong.kemaskinidata',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Lelong"><i class="fas fa-sync-alt"></i></a> --}}
@if($lelong->ujrah =='1')
@if($lelong->tagujrah =='1')
<a class="btn m-1 btn-success" href="{{ route('lelong.show',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong Ujrah"><i class="far fa-edit"></i></a>
@elseif($lelong->ujrah == '0')
@elseif($lelong->tagujrah == '0')
<a class="btn m-1 btn-primary" href="{{ route('lelong.show',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
@endif
@hasrole('operasi')
@@ -84,7 +84,11 @@
<td><span class="badge badge-pill badge-info">LELONG BELUM MULA</span></td>
<td style="white-space: nowrap;">
{{-- <a class="btn m-1 btn-warning confirmrefresh" href="{{ route('lelong.kemaskinidata',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Lelong"><i class="fas fa-sync-alt"></i></a> --}}
@if($lelong->tagujrah == '0')
<a class="btn m-1 btn-primary" href="{{ route('jananotis.showlelongpc',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
@elseif($lelong->tagujrah == '1')
<a class="btn m-1 btn-success" href="{{ route('jananotis.showlelongpc',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
@endif
</td>
</tr>
@endforeach
+22 -4
View File
@@ -11,9 +11,9 @@
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
@if($lelonglel->ujrah == '0')
@if($lelonglel->tagujrah == '0')
senarai Sag : {{ $cawanganDetail->caw_name }}
@elseif($lelonglel->ujrah == '1')
@elseif($lelonglel->tagujrah == '1')
senarai Sag Ujrah: {{ $cawanganDetail->caw_name }}
@endif
</div>
@@ -67,9 +67,9 @@
<input type="hidden" name="lelongid" value="{{$lelongid}}">
<input type="hidden" name="cawid" value="{{$cawid}}">
<table class="table text-right table-bordered" id="marhun" style="width:100%">
@if($lelonglel->ujrah == '0')
@if($lelonglel->tagujrah == '0')
<thead class="bg-primary text-white">
@elseif($lelonglel->ujrah == '1')
@elseif($lelonglel->tagujrah == '1')
<thead class="bg-success text-white">
@endif
@@ -84,7 +84,13 @@
<th>Berat (gm)</th>
<th>Nilai Marhun Asal (RM)</th>
<th>Pembiayaan (RM)</th>
@if($lelonglel->tagujrah == '0')
<th>Keuntungan (RM)</th>
@elseif($lelonglel->tagujrah == '1')
<th>Keuntungan (RM)</th>
<th>1%(RM)</th>
<th>Ujrah(RM)</th>
@endif
<th>Caj Lelong (RM)</th>
<th>Harga Asas (RM)</th>
<th>Baki Lelong (RM)</th>
@@ -110,7 +116,13 @@
<td align = 'right'>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
@if($lelonglel->tagujrah == '0')
<td align = 'right'>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
@elseif($lelonglel->tagujrah == '1')
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['onepercent'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['ujrah'], 2, '.', ',') }}</td>
@endif
<td align = 'right'>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
@php
@@ -149,7 +161,13 @@
<td align = 'right'><b><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>
@if($lelonglel->tagujrah == '0')
<td align = 'right'><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
@elseif($lelonglel->tagujrah == '1')
<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>
@endif
<td align = 'right'><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
<td align = 'right'><b>@if($bakilelong > 0)
@@ -11,7 +11,11 @@
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
@if($lelonglel->tagujrah == '0')
senarai Lelongan
@elseif($lelonglel->tagujrah == '1')
senarai Lelongan Ujrah
@endif
</div>
</div>
<div class="card-body">
@@ -77,7 +81,11 @@
<input type="hidden" name="lelongid" value="{{$lelongid}}">
<input type="hidden" name="cawid" value="{{$cawid}}">
<table class="table text-right table-bordered" id="marhun" style="width:100%">
@if($lelonglel->tagujrah == '0')
<thead class="bg-primary text-white">
@elseif($lelonglel->tagujrah == '1')
<thead class="bg-success text-white">
@endif
<tr>
<th>No</th>
<th>No Rujukan</th>
+22 -8
View File
@@ -16,9 +16,9 @@
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
@endphp
@if($lelong->ujrah == '0')
@if($lelong->tagujrah == '0')
butiran lelong : {{$t_lelong}}
@elseif($lelong->ujrah == '1')
@elseif($lelong->tagujrah == '1')
butiran lelong Ujrah: {{$t_lelong}}
@endif
</div>
@@ -180,9 +180,9 @@
<button class="btn mb-5 btn-outline-success" type="submit">Muat Turun PDF</button>
<div style="overflow-x: auto;">
<table class="table text-right table-bordered" id="simulasi">
@if($lelong->ujrah == '0')
@if($lelong->tagujrah == '0')
<thead class="bg-primary text-center text-white">
@elseif($lelong->ujrah == '1')
@elseif($lelong->tagujrah == '1')
<thead class="bg-success text-center text-white">
@endif
<tr class="text-center">
@@ -192,10 +192,12 @@
<th>Berat (gm)</th>
<th>N. Marhun Asal (RM)</th>
<th>Pembiayaan (RM)</th>
@if($lelong->ujrah == '0')
@if($lelong->tagujrah == '0')
<th>Keuntungan (RM)</th>
@elseif($lelong->ujrah == '1')
<th>K.Ujrah (RM)</th>
@elseif($lelong->tagujrah == '1')
<th>Keuntungan (RM)</th>
<th>1%(RM)</th>
<th>Ujrah(RM)</th>
@endif
<th>Caj (RM)</th>
<th>Harga Asas (RM)</th>
@@ -204,8 +206,8 @@
</tr>
</thead>
<tbody>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td class="text-center">{{$index+1}}</td>
<td class="text-center" style='white-space:nowrap;'><a href=" {{ route('lelong.senaraimarhun',['lelongid'=>$lelong_id,'cawid'=>$caw['id_cawangan']]) }} " target="blank" style="color:#3490dc">{{ $caw['cawangan'] }}</a></td>
@@ -213,7 +215,13 @@
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td >{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
@if($lelong->tagujrah == '0')
<td>{{ number_format($caw['bakiupah'], 2, '.', ',') }}</td>
@elseif($lelong->tagujrah == '1')
<td>{{ number_format($caw['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['onepercent'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['ujrah'], 2, '.', ',') }}</td>
@endif
<td>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
@@ -228,7 +236,13 @@
<td><b>{{ number_format($total_berat, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_pinjaman, 2, '.', ',') }}</b></td>
@if($lelong->tagujrah == '0')
<td><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
@elseif($lelong->tagujrah == '1')
<td><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_onepercent, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_ujrah, 2, '.', ',') }}</b></td>
@endif
<td><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
<td><b>{{ number_format($total_bakilelong, 2, '.', ',') }}</b></td>
@@ -16,7 +16,11 @@
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
@endphp
@if($lelong->tagujrah == '0')
butiran lelong : {{$t_lelong}}
@elseif($lelong->tagujrah == '1')
butiran lelong Ujrah: {{$t_lelong}}
@endif
</div>
</div>
<div class="card-body">
@@ -174,7 +178,11 @@
<button class="btn mb-5 btn-outline-success" type="submit">Muat Turun PDF</button>
<div style="overflow-x: auto;">
<table class="table text-right table-bordered" id="simulasi">
@if($lelong->tagujrah == '0')
<thead class="bg-primary text-center text-white">
@elseif($lelong->tagujrah == '1')
<thead class="bg-success text-center text-white">
@endif
<tr class="text-center">
<th>No</th>
<th>Cawangan</th>
@@ -163,7 +163,13 @@ tr:nth-child(even) {
<th>Nilai Marhun Asal (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Margin (%)</th>
@if($info['tagujrah'] == '0')
<th>Keuntungan (RM)</th>
@elseif($info['tagujrah'] == '1')
<th>Keuntungan (RM)</th>
<th>1% (RM)</th>
<th>Ujrah (RM)</th>
@endif
<th>Caj Lelong (RM)</th>
<th>Harga Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
@@ -180,7 +186,13 @@ tr:nth-child(even) {
<td align="right">{{ number_format($laporan['nilaimarhun'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['pinjaman'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['margin'], 2, '.', ',')}}</td>
@if($laporan['tagujrah'] == '0')
<td align="right">{{ number_format($laporan['bakiupah'], 2, '.', ',')}}</td>
@elseif($laporan['tagujrah'] == '1')
<td align="right">{{ number_format($laporan['bakiupah'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['onepercent'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['ujrah'], 2, '.', ',')}}</td>
@endif
<td align="right">{{ number_format($laporan['cajlelong'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['hargabida'], 2, '.', ',')}}</td>
<?php
@@ -213,7 +225,13 @@ tr:nth-child(even) {
<td align="right"><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_pembiayaan, 2, '.', ',') }}</strong></td>
<td></td>
@if($laporan['tagujrah'] == '0')
<td align = 'right'><strong>{{ number_format($total_upahsimpan, 2, '.', ',') }}</strong></td>
@elseif($laporan['tagujrah'] == '1')
<td align = 'right'><strong>{{ number_format($total_upahsimpan, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_onepercent, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_ujrah, 2, '.', ',') }}</strong></td>
@endif
<td align = 'right'><strong>{{ number_format($total_cajlelong, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_hargalelong, 2,'.',',') }}</strong></td>
+19 -1
View File
@@ -158,13 +158,19 @@ tr:nth-child(even) {
<thead>
<tr>
( <th>No</th>
<th>No</th>
<th align="left">No Rujukan</th>
<th>Berat(gm)</th>
<th>Nilai Marhun Asal (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Margin (%)</th>
@if($info['tagujrah'] == '0')
<th>Keuntungan (RM)</th>
@elseif($info['tagujrah'] == '1')
<th>Keuntungan (RM)</th>
<th>1% (RM)</th>
<th>Ujrah (RM)</th>
@endif
<th>Caj Lelong (RM)</th>
<th>Harga Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
@@ -182,7 +188,13 @@ tr:nth-child(even) {
<td align="right">{{ number_format($laporan['laplelong']['nilaimarhun'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['laplelong']['pinjaman'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['margin'], 2, '.', ',')}}</td>
@if($laporan['laplelong']['tagujrah'] == '0')
<td align="right">{{ number_format($laporan['laplelong']['bakiupah'], 2, '.', ',')}}</td>
@elseif($laporan['laplelong']['tagujrah'] == '1')
<td align="right">{{ number_format($laporan['laplelong']['bakiupah'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['laplelong']['onepercent'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['laplelong']['ujrah'], 2, '.', ',')}}</td>
@endif
<td align="right">{{ number_format($laporan['laplelong']['cajlelong'], 2, '.', ',')}}</td>
<td align="right">{{ number_format($laporan['laplelong']['hargabida'], 2, '.', ',')}}</td>
@@ -215,7 +227,13 @@ tr:nth-child(even) {
<td align="right"><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_pembiayaan, 2, '.', ',') }}</strong></td>
<td></td>
@if($info['tagujrah'] == '0')
<td align = 'right'><strong>{{ number_format($total_upahsimpan, 2, '.', ',') }}</strong></td>
@elseif($info['tagujrah'] == '1')
<td align = 'right'><strong>{{ number_format($total_upahsimpan, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_onepercent, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_ujrah, 2, '.', ',') }}</strong></td>
@endif
<td align = 'right'><strong>{{ number_format($total_cajlelong, 2, '.', ',') }}</strong></td>
<td align = 'right'><strong>{{ number_format($total_hargalelong, 2,'.',',') }}</strong></td>
<td align="right"><b>@if($total_baki > 0)
@@ -157,7 +157,13 @@
<th>Berat (gm)</th>
<th>Nilai Marhun Asal (RM)</th>
<th>Pembiayaan (RM)</th>
@if($laporan['laporan']['tagujrah'] == '0')
<th>Keuntungan (RM)</th>
@elseif($laporan['laporan']['tagujrah'] == '1')
<th>Keuntungan (RM)</th>
<th>1% (RM)</th>
<th>Ujrah (RM)</th>
@endif
<th>Caj Lelong (RM)</th>
<th>Harga Asas (RM)</th>
{{-- <th>Rugi Lelong (RM)</th> --}}
@@ -178,7 +184,13 @@
<td align = 'right'>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
@if($marhun['tagujrah'] == '0')
<td align = 'right'>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
@elseif($marhun['tagujrah'] == '1')
<td align = 'right'>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['onepercent'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['ujrah'], 2, '.', ',') }}</td>
@endif
<td align = 'right'>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
@php
@@ -213,7 +225,14 @@
<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>
@if($marhun['tagujrah'] == '0')
<td align = 'right'><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
@elseif($marhun['tagujrah'] == '1')
<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>
@endif
<td align = 'right'><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
<td align = 'right'><b>@if($bakilelong > 0)