lelong by kali

This commit is contained in:
Amirah22
2022-08-09 11:10:54 +08:00
parent ba74d6ad1f
commit 4ac31cb8a9
9 changed files with 1274 additions and 1 deletions
@@ -0,0 +1,536 @@
<?php
namespace App\Http\Controllers;
use App\Events\LelongNotify;
use Illuminate\Http\Request;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
use Illuminate\Support\Facades\Auth;
use PDF;
use App\Models\User;
use App\Models\Cawangan;
use App\Models\Gadai;
use App\Models\JenisEmas;
use App\Models\JenisKarat;
use App\Models\Simulasi;
use App\Models\SimulasiBid;
use App\Models\SimulasiBidMarhun;
use App\Models\SimKarat;
use App\Models\SimKarat_temp;
use App\Models\CawanganSimulasi;
use App\Models\Lelong;
use App\Models\CawanganLelong;
use App\Models\LelongBid;
use App\Models\LelongBidder;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\LelKarat_temp;
use App\Models\Resit;
use App\Models\Customer;
use App\Models\LelongTebus;
use Carbon\Carbon;
class ReportAllController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function lapbrglelongindexall (){
$arrayinfo = [];
$lelong = Lelong::select('kali')
->groupBy('kali')
->get();
foreach($lelong as $info)
{
$detailsinfo = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('kali',$info->kali)
->get()
->toArray();
array_push($arrayinfo, ['info'=> $info, 'detailsinfo'=>$detailsinfo]);
}
return view('lelongall.laporanlelongall', compact('lelong','arrayinfo'));
}
public function senaraibrglelongall(Request $request, $kali){
$kali = $kali;
$lelong = Lelong::where('kali','=',$kali)->first();
// dd($lelong);
$cawanganlel = CawanganLelong::where('kali','=',$kali)->get();
// dd($cawanganlel);
$arraycaw = [];
$total_marhun = 0;
$total_berat = 0;
$total_hargaasas = 0;
foreach($cawanganlel as $cawlel)
{
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
$brglel = LelongBid::join('cawangan_lelong','cawangan_lelong.caw_id','=','lelongbid.caw_id')
->select('lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.hargaasas')
->where('cawangan_lelong.caw_id','=',$cawlel->caw_id)
->where('cawangan_lelong.lelong_id','=',$cawlel->lelong_id)
->get();
// dd($cawlel);
$t_lelong = Lelong::join('cawangan_lelong','cawangan_lelong.lelong_id','=','lelong.id')
->where('cawangan_lelong.lelong_id','=', $cawlel->lelong_id)
->where('cawangan_lelong.kali','=',$kali)->first();
$packet = 0;
$berat = 0;
$hargaasas = 0;
$id = $cawlel->lelong_id;
foreach($brglel as $index1=>$bid)
{
$marhun = LelongBidMarhun::where('lelongbid_id','=',$bid['id'])->get();
$berat = $berat + $bid['berat'];
$hargaasas = $hargaasas + $bid['hargaasas'];
}
array_push($arraycaw,[
'id_cawangan'=> $cawangan['id'],
'cawangan'=>$cawangan['caw_name'],
't_lelong'=>$t_lelong['tarikh_lelong'],
'bil_marhun'=>sizeof($brglel),
'berat'=>$berat,
'hargaasas'=>$hargaasas,
]);
$total_marhun = $total_marhun + sizeof($brglel);
$total_berat = $total_berat + $berat;
$total_hargaasas = $total_hargaasas + $hargaasas;
}
$pdf = PDF::loadView('pdf.listlelongall',compact('arraycaw',
'total_marhun',
'total_berat',
'total_hargaasas',
'kali'))->setPaper('a4', 'potrait');
return $pdf->download('Senarai Barang Lelong All.pdf');
}
public function lapbidaanpembidaindexall (){
$arrayinfo = [];
$lelong = Lelong::select('kali')
->groupBy('kali')
->get();
foreach($lelong as $info)
{
$detailsinfo = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('kali',$info->kali)
->get()
->toArray();
array_push($arrayinfo, ['info'=> $info, 'detailsinfo'=>$detailsinfo]);
}
return view('lelongall.laporanbidaanindexall', compact('arrayinfo','lelong'));
}
public function senarailapbidaanall (Request $request, $kali){
$kali = $kali;
$lelong = Lelong::where('kali','=',$kali)->first();
// dd($lelong);
$cawanganlel = CawanganLelong::where('kali','=',$kali)->get();
// dd($cawanganlel);
$arraycaw = [];
$total_marhun = 0;
$total_berat = 0;
$total_hargaasas = 0;
$total_hargabida = 0;
foreach($cawanganlel as $cawlel)
{
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
$brglel = LelongBid::join('cawangan_lelong','cawangan_lelong.caw_id','=','lelongbid.caw_id')
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->select('lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.hargaasas','lelongbidder.hargabida','lelongbidder.status_bidder')
->where('lelongbidder.status_bidder','=','1')
->where('cawangan_lelong.caw_id','=',$cawlel->caw_id)
->where('cawangan_lelong.lelong_id','=',$cawlel->lelong_id)
->get();
$t_lelong = Lelong::join('cawangan_lelong','cawangan_lelong.lelong_id','=','lelong.id')
->where('cawangan_lelong.lelong_id','=', $cawlel->lelong_id)
->where('cawangan_lelong.kali','=',$kali)->first();
$packet = 0;
$berat = 0;
$hargaasas = 0;
$hargabida = 0;
$id = $cawlel->lelong_id;
foreach($brglel as $index1=>$bid)
{
$marhun = LelongBidMarhun::where('lelongbid_id','=',$bid['id'])->get();
$berat = $berat + $bid['berat'];
$hargaasas = $hargaasas + $bid['hargaasas'];
$hargabida = $hargabida + $bid['hargabida'];
}
array_push($arraycaw,[
'id_cawangan'=> $cawangan['id'],
'cawangan'=>$cawangan['caw_name'],
't_lelong'=>$t_lelong['tarikh_lelong'],
'bil_marhun'=>sizeof($brglel),
'berat'=>$berat,
'hargaasas'=>$hargaasas,
'hargabida'=>$hargabida,
]);
$total_marhun = $total_marhun + sizeof($brglel);
$total_berat = $total_berat + $berat;
$total_hargaasas = $total_hargaasas + $hargaasas;
$total_hargabida = $total_hargabida + $hargabida;
}
$pdf = PDF::loadView('pdf.pdfsenarailapbidaanall',compact('arraycaw',
'total_marhun',
'total_berat',
'total_hargaasas',
'total_hargabida',
'kali'))->setPaper('a4', 'potrait');
return $pdf->download('Senarai Barang Lelong All.pdf');
}
Public function laplelongindexall (){
$arrayinfo = [];
$lelong = Lelong::select('kali')
->groupBy('kali')
->get();
foreach($lelong as $info)
{
$detailsinfo = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('kali',$info->kali)
->get()
->toArray();
array_push($arrayinfo, ['info'=> $info, 'detailsinfo'=>$detailsinfo]);
}
return view('lelongall.laplelongindexall',compact('arrayinfo','lelong'));
}
Public function laplelongallall (Request $request, $kali){
$kali = $kali;
$lelong = Lelong::where('kali','=',$kali)->first();
// dd($t_simulasi);
$cawanganlel = CawanganLelong::where('kali','=',$kali)->get();
// dd($cawangansim);
$arraycaw = [];
$total_nilaimarhun = 0;
$total_pinjaman = 0;
$total_marhun = 0;
$total_cazlelong = 0;
$total_berat = 0;
$total_rugilelong = 0;
$total_bakilelong = 0;
$total_keuntungan = 0;
$total_hargaasas = 0;
foreach($cawanganlel as $cawlel)
{
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
$databid = LelongBid::join('cawangan_lelong','cawangan_lelong.caw_id','=','lelongbid.caw_id')
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->select('lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.cajlelong','lelongbid.baki','lelongbid.nilaimarhun',
'lelongbid.pinjaman','lelongbid.hargaasas','lelongbid.cajlelong','lelongbid.bakiupah')
->where('lelongbidder.status_bidder','=','1')
->where('cawangan_lelong.caw_id','=', $cawlel->caw_id)
->where('cawangan_lelong.lelong_id','=', $cawlel->lelong_id)
->get();
$t_lelong = Lelong::join('cawangan_lelong','cawangan_lelong.lelong_id','=','lelong.id')
->where('cawangan_lelong.lelong_id','=', $cawlel->lelong_id)
->where('cawangan_lelong.kali','=',$kali)->first();
$packet = 0;
$berat = 0;
$nilai_marhun = 0;
$pinjaman =0;
$keuntungan = 0;
$hargaasas = 0;
$cajlelong = 0;
$rugilelong = 0;
$bakilelong = 0;
$id = $cawlel->lelong_id;
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'];
$keuntungan = $keuntungan + $bid['bakiupah'];
$hargaasas = $hargaasas + $bid['hargaasas'];
$cajlelong = $cajlelong + $bid['cajlelong'];
}
array_push($arraycaw,[
'id_cawangan'=> $cawangan['id'],
'cawangan'=>$cawangan['caw_name'],
't_lelong'=>$lelong['tarikh_lelong'],
't_simulasi'=>$t_lelong['tarikh_lelong'],
'bil_marhun'=>sizeof($databid),
'berat'=>$berat,
'n_marhun'=>$nilai_marhun,
'pinjaman'=>$pinjaman,
'upahsimpan'=>$keuntungan,
'bakiupah'=>$keuntungan,
'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_keuntungan = $total_keuntungan + $keuntungan;
}
$pdf = PDF::loadView('pdf.pdflaplelongall',compact('arraycaw',
'total_marhun',
'total_berat',
'total_pinjaman',
'total_hargaasas',
'total_cazlelong',
'total_rugilelong',
'total_bakilelong',
'total_keuntungan',
'total_nilaimarhun',
'kali'))
->setPaper('a4', 'potrait');
return $pdf->download('Laporan Lelong Keseluruhan.pdf');
}
Public function lelongtebus ($lelong_id, $kodcaw){
$total_berat = 0;
$total_hargaasas = 0;
$total_hargalelong = 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')
->groupBy('lelong_id')
->get();
foreach($info as $laporancaw)
{
$cawangan = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan.caw_code',$kodcaw)
->where('lelong_id',$laporancaw['lelong_id'])
->get()
->toArray();
array_push($arrayinfocaw,['laporancaw' => $laporancaw,'cawangan' => $cawangan]);
}
// dd($arrayinfocaw);
$laporantebus = LelongTebus::where('kodcaw',$kodcaw)
->get()->toArray();
// dd($laporantebus);
// foreach( $brglelpembida as $index1=>$totalbrglelpembida){
// $total_berat = $total_berat + $totalbrglelpembida['berat'];
// $total_hargaasas = $total_hargaasas + $totalbrglelpembida['hargaasas'];
// $total_hargalelong = $total_hargalelong + $totalbrglelpembida['hargabida'];
// }
$pdf = PDF::loadView('pdf.pdflelongtebus',compact('lelong_id','info','laporantebus','total_berat','total_hargaasas','total_hargalelong','arrayinfocaw'))
->setPaper('a4','potrait');
return $pdf->download('Laporan Barang Lelong Pembida.pdf');
}
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');
}
}
@@ -266,6 +266,39 @@
</li>
{{-- end laporan --}}
{{-- laporan all--}}
<li class="{{ (request()->is('reportkali/')) ? 'active' : '' }}">
<a href="#reportallSubmenu" data-toggle="collapse" aria-expanded="false" style="">Laporan by Batch</a>
<ul class="list-unstyled collapse {{ (request()->is('reportkali/*')) ? 'show' : '' }}" id="reportallSubmenu" >
<li class="{{ (request()->is('report/lapbrglelongindexall/*') || request()->is('reportkali/lapbrglelongindexall') ) ? 'active' : '' }}">
<a href="{{url('reportkali/lapbrglelongindexall')}}">Barang Lelong by Batch</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('reportkali/*')) ? 'show' : '' }}" id="reportallSubmenu" >
<li class="{{ (request()->is('reportkali/lapbidaanpembidaindexall/*') || request()->is('reportkali/lapbidaanpembidaindexall') ) ? 'active' : '' }}">
<a href="{{url('reportkali/lapbidaanpembidaindexall')}}">Senarai Lelong Pembida by Batch</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('reportkali/*')) ? 'show' : '' }}" id="reportallSubmenu" >
<li class="{{ (request()->is('reportkali/laplelongindexall/*') || request()->is('reportkali/laplelongindexall') ) ? 'active' : '' }}">
<a href="{{url('reportkali/laplelongindexall')}}">Lelong Keseluruhan by Batch</a>
</li>
</ul>
{{-- <ul class="list-unstyled collapse {{ (request()->is('reportkali/*')) ? 'show' : '' }}" id="reportallSubmenu" >
<li class="{{ (request()->is('reportkali/lapbrglelpembidaindex/*') || request()->is('reportkali/lapbrglelpembidaindex') ) ? 'active' : '' }}">
<a href="{{url('reportkali/lapbrglelpembidaindex')}}">Barang Lelon
g Pembida</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('reportkali/*')) ? 'show' : '' }}" id="reportallSubmenu" >
<li class="{{ (request()->is('reportkali/lelongtebusindex/*') || request()->is('reportkali/lelongtebusindex') ) ? 'active' : '' }}">
<a href="{{url('reportkali/lelongtebusindex')}}">Senarai Lelong Tebus</a>
</li>
</ul> --}}
</li>
{{-- end laporan all --}}
{{-- Kemaskini Notis --}}
<li class="{{ (request()->is('report/*')) ? 'active' : '' }}">
@@ -0,0 +1,83 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
<h3 class="pt-3" style="margin-left:1%;">Lelong Keseluruhan by Batch</h3>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Kali Lelong</th>
<th>Fasa</th>
<th align='left'>Cawangan</th>
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach ($arrayinfo as $info)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$info['info']['kali']}}</td>
<td align = 'center'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['fasa']}}<br>
@endforeach
</td>
<td align = 'left'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['caw_name']}}<br>
@endforeach
<td class="text-center">
<a href="{{ route('reportkali.laplelongallall',$info['info']['kali']) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong" style="margin-right:30px"><i class="fas fa-download"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
});
</script>
@endsection
@@ -0,0 +1,85 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
<h3 class="pt-3" style="margin-left:1%;">Butiran Laporan Barang Lelong </h3>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Kali Lelong</th>
{{-- <th>Tarikh Lelong</th> --}}
<th>Fasa</th>
<th align='left'>Cawangan</th>
{{-- <th>Harga Asas (RM)</th> --}}
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach ($arrayinfo as $info)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$info['info']['kali']}}</td>
<td align = 'center'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['fasa']}}<br>
@endforeach
</td>
<td align = 'left'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['caw_name']}}<br>
@endforeach
<td class="text-center">
<a href="{{ route('report.senarailapbidaanall',$info['info']['kali']) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong" style="margin-right:30px"><i class="fas fa-download"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
});
</script>
@endsection
@@ -0,0 +1,85 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
<h3 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong </h3>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Kali Lelong</th>
{{-- <th>Tarikh Lelong</th> --}}
<th>Fasa</th>
<th align='left'>Cawangan</th>
{{-- <th>Harga Asas (RM)</th> --}}
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach ($arrayinfo as $info)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$info['info']['kali']}}</td>
<td align = 'center'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['fasa']}}<br>
@endforeach
</td>
<td align = 'left'>
@foreach($info['detailsinfo'] as $info2)
{{$info2['caw_name']}}<br>
@endforeach
<td class="text-center">
<a href="{{ route('report.senaraibrglelongall',$info['info']['kali']) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong" style="margin-right:30px"><i class="fas fa-download"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
});
</script>
@endsection
+136
View File
@@ -0,0 +1,136 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr:hover {}
#sim th {
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
text-align: left;
padding: 16px;
}
th{
text-align: left;
padding: 16px;
background-color:gainsboro;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>LAPORAN BARANG LELONG KALI - {{$kali}}</b></u></td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th width="5%" align="left">No</th>
<th width="15%" align="left">Tarikh Lelong</th>
<th width="30%" align="left">Cawangan</th>
<th width="25%" align="left">Bil Marhun(Paket)</th>
<th width="25%" align="left">Berat (gm)</th>
<th width="25%" align="left">Harga Asas</th>
</tr>
</thead>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $caw['t_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $caw['cawangan'] }}</td>
<td>{{ $caw['bil_marhun'] }}</td>
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
</tr>
@endforeach
<tr>
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ $total_marhun }}</td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
</tr>
</table>
</tbody>
@@ -0,0 +1,150 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr:hover {}
#sim th {
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
text-align: left;
padding: 16px;
}
th{
text-align: left;
padding: 16px;
background-color:gainsboro;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>LAPORAN SENARAI BIDAAN PEMBIDA - {{$kali}}</b></u></td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr class="text-center">
<th>No</th>
<th>T.Lelong</th>
<th>Cawangan</th>
<th>Bil Marhun (Paket)</th>
<th>Berat (gm)</th>
<th>N. Marhun (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Harga Asas (RM)</th>
<th>Caj (RM)</th>
<th>Baki (RM)</th>
<th>Rugi (RM)</th>
</tr>
</thead>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $caw['t_simulasi'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $caw['cawangan'] }}</td>
<td>{{ $caw['bil_marhun'] }}</td>
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['upahsimpan'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
<td>({{ number_format($caw['rugilelong'], 2, '.', ',') }})</td>
</tr>
@endforeach
<tr>
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ $total_marhun }}</td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_keuntungan, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>({{ number_format($total_rugilelong, 2, '.', ',') }})</td>
</tr>
</table>
</tbody>
@@ -0,0 +1,142 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr:hover {}
#sim th {
text-align: left;
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
float: left;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
text-align: left;
padding: 16px;
}
th{
text-align: left;
padding: 16px;
background-color:gainsboro;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>LAPORAN SENARAI BIDAAN PEMBIDA - {{$kali}}</b></u></td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th width="5%" align="left">No</th>
<th width="15%" align="left">Tarikh Lelong</th>
<th width="30%" align="left">Cawangan</th>
<th width="15%" align="left">Bil Marhun(Paket)</th>
<th width="15%" align="left">Berat (gm)</th>
<th width="25%" align="left">Harga Asas</th>
<th width="20%" align="left">Harga Bida</th>
</tr>
</thead>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $caw['t_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $caw['cawangan'] }}</td>
<td>{{ $caw['bil_marhun'] }}</td>
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargabida'], 2, '.', ',') }}</td>
</tr>
@endforeach
<tr>
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ $total_marhun }}</td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargabida, 2, '.', ',') }}</td>
</tr>
</table>
</tbody>
+24 -1
View File
@@ -368,11 +368,34 @@ Route::get('/lelongtebus/{lelong_id}/{kodcaw}',['as'=>'report.lelongtebus','uses
Route::get('/simulasireport/{simulasi_id}/{cawid}',['as'=>'report.simulasireport','uses'=>'ReportController@simulasireport']);
});
//Report by KALI
Route::group(['middleware' => ['permission:reportkali'],'prefix'=>'reportkali'], function () {
Route::get('/lapbrglelongindexall',['as'=>'reportkali.lapbrglelongindexall','uses'=>'ReportAllController@lapbrglelongindexall']);
Route::get('/senaraibrglelongall/{kali}',['as'=>'reportkali.senaraibrglelongall','uses'=>'ReportAllController@senaraibrglelongall']);
Route::get('/lapbidaanpembidaindexall', ['as'=>'reportkali.lapbidaanpembidaindexall','uses'=>'ReportAllController@lapbidaanpembidaindexall']);
Route::get('/senarailapbidaanall/{kali}',['as' =>'reportkali.senarailapbidaanall','uses'=>'ReportAllController@senarailapbidaanall']);
Route::get('/laplelongindexall',['as' =>'reportkali.laplelongindexall','uses'=>'ReportAllController@laplelongindexall']);
Route::get('/laplelongallall/{kali}',['as' =>'reportkali.laplelongallall','uses'=>'ReportAllController@laplelongallall']);
Route::get('/lelongtebusindex',['as'=>'reportkali.lelongtebusindex','uses'=>'ReportAllController@lelongtebusindex']);
Route::get('/lelongtebus/{lelong_id}/{kodcaw}',['as'=>'reportkali.lelongtebus','uses'=>'ReportAllController@lelongtebus']);
});
//Report by cawangan
Route::group(['middleware' => ['permission:report'],'prefix'=>'reportcaw'], function () {