diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php index 4774fdcb..dbab3e96 100644 --- a/app/Http/Controllers/LelongController.php +++ b/app/Http/Controllers/LelongController.php @@ -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'); + + } + diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index cde144c3..4b92228d 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -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'); + + + + + } + + diff --git a/app/Http/Controllers/SimulasiController.php b/app/Http/Controllers/SimulasiController.php index e2da04d8..795eb117 100644 --- a/app/Http/Controllers/SimulasiController.php +++ b/app/Http/Controllers/SimulasiController.php @@ -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'); diff --git a/resources/views/lelong/showlelong.blade.php b/resources/views/lelong/showlelong.blade.php index 27adde2b..76125260 100644 --- a/resources/views/lelong/showlelong.blade.php +++ b/resources/views/lelong/showlelong.blade.php @@ -19,8 +19,11 @@

{{ $message }}

@endif -
- + + @csrf + + +
@@ -122,7 +125,6 @@
- {{-- {{dd($lelkarat)}}; --}} @@ -375,7 +377,7 @@ "searching":false, "info": false, "lengthChange": false, - "pageLength": 15, + "pageLength": 9999, dom: 'Bfrtip', buttons: [ // 'copy', 'excel', 'pdf' diff --git a/resources/views/pdf/lelreport.blade.php b/resources/views/pdf/lelreport.blade.php new file mode 100644 index 00000000..bcf1d77e --- /dev/null +++ b/resources/views/pdf/lelreport.blade.php @@ -0,0 +1,207 @@ + + + + + + +
+ +

Laporan Lelong Cawangan:
@foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}
@endforeach

+
+

PERMODALAN KELANTAN BERHAD

+ + +
+ +
+ + + +
+ + + + + + +
Bilangan Lelong: {{$total_marhun}}Nilai Marhun Keseluruhan: RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}Pembiayaan Keseluruhan: RM{{ number_format($total_pinjaman, 2, '.', ',') }} Keuntungan Keseluruhan:RM{{ number_format($total_bakiupah, 2, '.', ',') }}
+ + + + + + + + + + + +
Rugi Lelong Keseluruhan: RM{{ number_format($total_rugilelong, 2, '.', ',') }}Baki Lelong Keseluruhan: RM{{ number_format($total_bakilelong, 2, '.', ',') }}Caj Lelong Keseluruhan: RM{{ number_format($total_cazlelong, 2, '.', ',') }}Tempoh: {{ $data['jbg']}}Tarikh Lelong :@php + $myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] ); + $datez = $myDateTime->format('d-m-Y'); + echo($datez); + @endphp +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + @foreach ($arraycaw as $index=>$caw) + + + + + + + + + + + + + + @endforeach + + + + + + + + + + + + + + + + +

SIMULASI KESELURUHAN

NoCawanganBil Marhun (Paket)Berat (gm)Nilai Marhun (RM)Pinjaman (RM)Keuntungan (RM)Harga Asas (RM)Caj Lelong (RM)Baki Lelong (RM)Rugi Lelong (RM)
{{$index+1}}{{ $caw['cawangan'] }}{{ $caw['bil_marhun'] }}{{ number_format($caw['berat'], 2, '.', ',') }}{{ number_format($caw['n_marhun'], 2, '.', ',') }}{{ number_format($caw['pinjaman'], 2, '.', ',') }}{{ number_format($caw['upahsimpan'], 2, '.', ',') }}{{ number_format($caw['hargaasas'], 2, '.', ',') }}{{ number_format($caw['cajlelong'], 2, '.', ',') }}{{ number_format($caw['bakilelong'], 2, '.', ',') }}({{ number_format($caw['rugilelong'], 2, '.', ',') }})
JUMLAH KESELURUHAN{{ $total_marhun }}{{ number_format($total_berat, 2, '.', ',') }}{{ number_format($total_nilaimarhun, 2, '.', ',') }}{{ number_format($total_pinjaman, 2, '.', ',') }}{{ number_format($total_bakiupah, 2, '.', ',') }}{{ number_format($total_hargaasas, 2, '.', ',') }}{{ number_format($total_cazlelong, 2, '.', ',') }}{{ number_format($total_bakilelong, 2, '.', ',') }}({{ number_format($total_rugilelong, 2, '.', ',') }})
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

JUMLAH BERAT MENGIKUT MUTU (KESELURUHAN)

MUTU  24Kgb24K23K22K21K20K18K14K9K
BERAT(gm){{$total24Kgb}}{{$total24K}}{{$total23k}}{{$total22K}}{{$total21K}}{{$total20K}}{{$total18Kp}}{{$total14K}}{{$total9K}}
+ + + + + diff --git a/resources/views/pdf/pdfsimulasireport.blade.php b/resources/views/pdf/pdfsimulasireport.blade.php new file mode 100644 index 00000000..fb816b67 --- /dev/null +++ b/resources/views/pdf/pdfsimulasireport.blade.php @@ -0,0 +1,186 @@ + + + + + + + + + + +@foreach($datacaw as $data) + + +@endforeach + +

PERMODALAN KELANTAN BERHAD

LAPORAN SIMULASI CAWANGAN: {{$data['caw_name']}}
+ + {{-- + +
+ + + @foreach ($info as $info) + + + + + @endforeach + @foreach ($arrayinfocaw as $laporancaw) + @foreach ($laporancaw['cawangan'] as $details) + +
ID Lelong: {{$lelong_id}}Tarikh Lelong: @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $info->tarikh_lelong ); + $t_lelong = $myDateTime->format('d-m-Y'); + echo($t_lelong); + @endphpFasa: {{$info->fasa}} Cawangan : {{$details['caw_name']}} + @endforeach + @endforeach + +
--}} + +
+ + + + + + + + + + + + + + + + + + + + + @foreach ($arraymarhun as $index=> $marhun) + + + + + + + + + + + + + + + + + + + @endforeach + + + + {{-- + + + + + + --}} + + + +
NoNo RujukanNama PelangganTempohBerat (gm)Nilai Marhun (RM)Harga Asas (RM)Pembiayaan (RM)Keuntungan (RM)Caj Lelong (%)Rugi Lelong (RM)Baki Lelong (RM)
{{$loop->iteration}}{{ $marhun['norujukan']}}{{ $marhun['nama']}}{{ number_format($marhun['tempoh'], 2, '.', ',') }}{{ number_format($marhun['berat'], 2, '.', ',') }}{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}{{ number_format($marhun['hargaasas'], 2, '.', ',') }}{{ number_format($marhun['pinjaman'], 2, '.', ',') }}{{ number_format($marhun['bakiupah'], 2, '.', ',') }}{{ number_format($marhun['cajlelong'], 2, '.', ',') }}{{number_format($rugi, 2, '.', ',')}}{{number_format($baki, 2, '.', ',')}}
Jumlah Keseluruhan{{ number_format($total_berat, 2, '.', ',') }}{{ number_format($total_hargaasas, 2, '.', ',') }}{{ number_format($total_hargalelong, 2, '.', ',') }}
+ + + + + + + + + diff --git a/resources/views/pdf/simrpt2.blade.php b/resources/views/pdf/simrpt2.blade.php index 4d47e54a..cb9808b0 100644 --- a/resources/views/pdf/simrpt2.blade.php +++ b/resources/views/pdf/simrpt2.blade.php @@ -71,7 +71,7 @@ tr:nth-child(even) { -

Laporan Simulasi Cawangan: @foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}, @endforeach

+

Laporan Simulasi Cawangan:
@foreach ($arraycaw as $index=>$caw){{$caw['cawangan']}}
@endforeach


PERMODALAN KELANTAN BERHAD

@@ -87,7 +87,7 @@ tr:nth-child(even) { - +
Bilangan Lelong: {{$total_marhun}} Nilai Marhun Keseluruhan: RM{{ number_format($total_nilaimarhun, 2, '.', ',') }} Pembiayaan Keseluruhan: RM{{ number_format($total_pinjaman, 2, '.', ',') }} Keuntungan Keseluruhan:RM{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}Keuntungan Keseluruhan:RM{{ number_format($total_bakiupah, 2, '.', ',') }}
@@ -97,7 +97,6 @@ tr:nth-child(even) { Rugi Lelong Keseluruhan: RM{{ number_format($total_rugilelong, 2, '.', ',') }} Baki Lelong Keseluruhan: RM{{ number_format($total_bakilelong, 2, '.', ',') }} Caj Lelong Keseluruhan: RM{{ number_format($total_cazlelong, 2, '.', ',') }} - @foreach ($data as $data) Tempoh: {{ $data['jbg']}} Tarikh Lelong :@php $myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] ); @@ -105,7 +104,6 @@ tr:nth-child(even) { echo($datez); @endphp - @endforeach @@ -157,7 +155,7 @@ tr:nth-child(even) { {{ number_format($total_berat, 2, '.', ',') }} {{ number_format($total_nilaimarhun, 2, '.', ',') }} {{ number_format($total_pinjaman, 2, '.', ',') }} - {{ number_format($total_upahkeuntungan2, 2, '.', ',') }} + {{ number_format($total_bakiupah, 2, '.', ',') }} {{ number_format($total_hargaasas, 2, '.', ',') }} {{ number_format($total_cazlelong, 2, '.', ',') }} {{ number_format($total_bakilelong, 2, '.', ',') }} diff --git a/resources/views/simulasi/senaraimarhunlel.blade.php b/resources/views/simulasi/senaraimarhunlel.blade.php index 614ae4a0..9546bf2b 100644 --- a/resources/views/simulasi/senaraimarhunlel.blade.php +++ b/resources/views/simulasi/senaraimarhunlel.blade.php @@ -13,6 +13,7 @@
@endif diff --git a/resources/views/simulasi/showsimulasi.blade.php b/resources/views/simulasi/showsimulasi.blade.php index f5720d78..fd168fba 100644 --- a/resources/views/simulasi/showsimulasi.blade.php +++ b/resources/views/simulasi/showsimulasi.blade.php @@ -358,11 +358,11 @@ buttons: [ { - className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export', - titleAttr: 'Download to PDF', - text: '', - 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: 'PDF', + action: function ( e, dt, node, config ) { + $("#exportform").submit(); } } ] diff --git a/routes/web.php b/routes/web.php index d1922185..5a9374b5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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 + });