Merge branch 'amirah' into 'main'

Amirah

See merge request online-sistem1/lelong!4
This commit is contained in:
Nur Izzati Zulkifli
2022-04-13 03:06:45 +00:00
22 changed files with 1338 additions and 305 deletions
+268 -16
View File
@@ -248,6 +248,7 @@ class LelongController extends Controller
$lelong->cajlelong = $simulasi->cajlelong;
$lelong->save();
foreach($simkarat as $simulasikarat)
{
$lelkarat = new LelKarat;
@@ -422,7 +423,7 @@ class LelongController extends Controller
{
$karat->karat = $karat->karat;
$karat->keterangan = $karat->keterangan;
$karat->harga = $request->harga[$index];
// $karat->harga = $request->harga[$index];
$karat->harga2 = $request->harga2[$index];
$karat->save();
}
@@ -608,6 +609,15 @@ class LelongController extends Controller
public function lelongtaklaku($lelong_id){
$total_pinjaman = 0;
$total_berat = 0;
$total_nmarhun = 0;
$total_hargaasas = 0;
$total_upahsimpan = 0;
$total_cajlelong = 0;
$total_bakirugi = 0;
$lelongtaklaku = LelongBid::join('cawangan', 'lelongbid.kodcaw', '=', 'cawangan.caw_code')
->where('status_jual', 0)
->where('lelongbid.lelong_id', $lelong_id)
@@ -638,8 +648,88 @@ class LelongController extends Controller
$lelongtaklaku[$index1]['suratlelongtaklaku'] = sizeof($suratlelongtaklaku);
}
$total_pinjaman = $total_pinjaman + ($lelongtaklaku->sum('pinjaman'));
$total_berat = $total_berat + ($lelongtaklaku->sum('berat'));
$total_nmarhun = $total_nmarhun + ($lelongtaklaku->sum('nilaimarhun'));
$total_hargaasas = $total_hargaasas + ($lelongtaklaku->sum('hargaasas'));
$total_upahsimpan = $total_upahsimpan + ($lelongtaklaku->sum('upahsimpan'));
$total_cajlelong = $total_cajlelong + ($lelongtaklaku->sum('cajlelong'));
$total_bakirugi = $total_bakirugi + ($lelongtaklaku->sum('baki'));
return view('lelong.lelongtaklaku',compact('lelongtaklaku'));
return view('lelong.lelongtaklaku',compact('lelongtaklaku','lelong_id','total_pinjaman',
'total_berat','total_nmarhun','total_hargaasas','total_upahsimpan','total_upahsimpan','total_cajlelong','total_bakirugi'));
}
public function pdflelongtaklaku (Request $request){
$lelong_id = $request->lelongid;
$total_pinjaman = 0;
$total_berat = 0;
$total_nmarhun = 0;
$total_hargaasas = 0;
$total_upahsimpan = 0;
$total_cajlelong = 0;
$total_bakirugi = 0;
$infolelong = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->get();
$lelongtaklaku = LelongBid::join('cawangan', 'lelongbid.kodcaw', '=', 'cawangan.caw_code')
->where('status_jual', 0)
->where('lelongbid.lelong_id', $lelong_id)
->whereNull('t_jual')
->select(
'lelongbid.norujukan',
'lelongbid.t_lelong',
'lelongbid.kodcaw',
'cawangan.caw_name',
'lelongbid.pinjaman',
'lelongbid.berat',
'lelongbid.nilaimarhun',
'lelongbid.hargaasas',
'lelongbid.upahsimpan',
'lelongbid.cajlelong',
'lelongbid.baki',
'lelongbid.status_jual',
)
->get();
foreach($lelongtaklaku as $index1=>$suratlelongtaklaku){
$suratlelongtaklaku = LelongBid::join('lelong', 'lelongbid.lelong_id', '=', 'lelong.id')
->where('lelongbid.lelong_id', $lelong_id)
->where('status_jual', '=', 1)
->whereNull('t_jual')
->get();
$lelongtaklaku[$index1]['suratlelongtaklaku'] = sizeof($suratlelongtaklaku);
}
$total_pinjaman = $total_pinjaman + ($lelongtaklaku->sum('pinjaman'));
$total_berat = $total_berat + ($lelongtaklaku->sum('berat'));
$total_nmarhun = $total_nmarhun + ($lelongtaklaku->sum('nilaimarhun'));
$total_hargaasas = $total_hargaasas + ($lelongtaklaku->sum('hargaasas'));
$total_upahsimpan = $total_upahsimpan + ($lelongtaklaku->sum('upahsimpan'));
$total_cajlelong = $total_cajlelong + ($lelongtaklaku->sum('cajlelong'));
$total_bakirugi = $total_bakirugi + ($lelongtaklaku->sum('baki'));
// dd($total_pinjaman);
$pdf = PDF::loadView('pdf.pdflelongtaklaku',compact('lelongtaklaku','lelong_id','infolelong','total_pinjaman',
'total_berat','total_nmarhun','total_hargaasas','total_upahsimpan','total_upahsimpan','total_cajlelong','total_bakirugi'))
->setPaper('a4', 'landscape');
return $pdf->download('Senarai Lelong Tak Laku.pdf');
}
public function senaraipemenang($lelong_id){
@@ -718,7 +808,7 @@ class LelongController extends Controller
}
public function laporansenarailelong(Request $request){
public function lapbrglelongindex (Request $request){
// $user = Auth::user();
@@ -732,18 +822,34 @@ class LelongController extends Controller
public function senaraibrglelong($lelong_id){
$lelong_id = $lelong_id;
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
->where('lelongbid.lelong_id', $lelong_id)
->get()->toArray();
$keuntungan=0;
$total_hargaasas = 0;
$total_upahkeuntungan = 0;
$total_nmarhun = 0;
$total_pinjaman = 0;
foreach($brglelong as $index1=>$upah)
{
$keuntungan = $upah['bakipjm'] - ($upah['bakihargajualan'] - ($upah['upah12'] - $upah['ansakhir'])-(($upah['tempoh']-$upah['tempohbayar'])*$upah['kadarupah']/100*$upah['bakipjm']) );
$brglelong[$index1]['keuntungan'] = $keuntungan;
$total_hargaasas = $total_hargaasas + $upah['hargaasas'];
$total_upahkeuntungan = $total_upahkeuntungan + $keuntungan;
$total_nmarhun = $total_nmarhun + $upah['nilaimarhun'];
$total_pinjaman = $total_pinjaman + $upah['pinjaman'];
}
return view('lelong.senaraibrglelong',compact('brglelong','lelong_id'));
return view('lelong.senaraibrglelong',compact('brglelong','lelong_id','keuntungan','total_hargaasas','total_upahkeuntungan','total_nmarhun','total_pinjaman'));
}
@@ -751,24 +857,170 @@ class LelongController extends Controller
$lelong_id = $request->lelongid;
// $nilai_marhun = 0;
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->where('lelong.id', $lelong_id)
->get();
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
->where('lelongbid.lelong_id', $lelong_id)
->get()->toArray();
->get();
$pdf = PDF::loadView('pdf.listlelong',compact('brglelong'))
->setPaper('a4', 'potrait');
return $pdf->download('Senarai Lelong.pdf');
$keuntungan=0;
$totharga_asas=0;
$totkeuntungan=0;
$totnilai_marhun=0;
$tot_pinjaman=0;
foreach($brglelong as $index1=>$upah)
{
$keuntungan = $upah['bakipjm'] - ($upah['bakihargajualan'] - ($upah['upah12'] - $upah['ansakhir']) - (($upah['tempoh']-$upah['tempohbayar'])*$upah['kadarupah']/100*$upah['bakipjm']) );
$brglelong[$index1]['keuntungan'] = $keuntungan;
}
$totharga_asas = $totharga_asas + ($upah->sum('hargaasas'));
$totkeuntungan = $totkeuntungan + ($brglelong->sum('keuntungan'));
$totnilai_marhun = $totnilai_marhun + ($upah->sum('nilaimarhun'));
$tot_pinjaman = $tot_pinjaman + ($upah->sum('pinjaman'));
$pdf = PDF::loadView('pdf.listlelong',compact('brglelong','totharga_asas','totkeuntungan','totnilai_marhun','tot_pinjaman','lelong_id','lelongid'))
->setPaper('a4', 'potrait');
return $pdf->download('Senarai Lelong.pdf');
}
public function lapbidaanpembidaindex (Request $request){
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->get();
return view('lelong.laporanbidaanindex',compact('lelongid'));
}
public function senarailapbidaan ($lelong_id){
$arraydetails = [];
$laporanpembida= LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->select('lelongbid_id','norujukan','hargaasas')
->where('lelongbid.lelong_id','=',$lelong_id)
->groupBy('lelongbid_id')
->get()
->toArray();
foreach($laporanpembida as $laporan)
{
$details = LelongBidder::where('lelongbid_id',$laporan['lelongbid_id'])
->orderBy('hargabida','desc')
->orderBy('masa_bidaan','asc')
->get()
->toArray();
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
}
return view('lelong.senarailapbidaan', compact('arraydetails','lelong_id'));
}
Public function pdfsenarailapbidaan (Request $request){
$lelong_id = $request->lelongid;
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->get();
$arraydetails = [];
$laporanpembida= LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->select('lelongbid_id','norujukan','hargaasas')
->where('lelongbid.lelong_id','=',$lelong_id)
->groupBy('lelongbid_id')
->get()
->toArray();
foreach($laporanpembida as $laporan)
{
$details = LelongBidder::where('lelongbid_id',$laporan['lelongbid_id'])
->orderBy('hargabida','desc')
->orderBy('masa_bidaan','asc')
->get()
->toArray();
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
}
$pdf = PDF::loadView('pdf.pdfsenarailapbidaan',compact('arraydetails','lelong_id','lelongid'))
->setPaper('a4', 'potrait');
return $pdf->download('Senarai Nama Bidaan Pembida.pdf');
}
Public function laplelongindex (Request $request){
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->get();
return view('lelong.laplelongindex',compact('lelongid'));
}
Public function laplelong ($lelong_id){
$total_nmarhun = 0;
$total_pembiayaan = 0;
$total_upahsimpan = 0;
$total_cajlelong = 0;
$total_hargalelong = 0;
$total_bakirugi = 0;
$total_hargaasas = 0;
$laporanlelong= LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->where('lelongbid.lelong_id','=',$lelong_id)
->where('lelongbidder.status_bidder','=','1')
->select('lelongbid.norujukan','lelongbid.nilaimarhun','lelongbid.pinjaman','lelongbid.upahsimpan',
'lelongbid.cajlelong','lelongbidder.hargabida','lelongbid.baki','lelongbid.hargaasas','lelongbidder.nama_bidder')
->get()->toArray();
foreach($laporanlelong as $index1=>$laplelong)
{
$total_nmarhun = $total_nmarhun + $laplelong['nilaimarhun'];
$total_pembiayaan = $total_pembiayaan + $laplelong['pinjaman'];
$total_upahsimpan = $total_upahsimpan + $laplelong['upahsimpan'];
$total_cajlelong = $total_cajlelong + $laplelong['cajlelong'];
$total_hargalelong = $total_hargalelong $laplelong['hargabida'];
$total_bakirugi = $total_bakirugi + $laplelong['baki'];
$total_hargaasas = $total_hargaasas + $laplelong['hargaasas'];
}
return view('lelong.laplelong', compact('laporanlelong','lelong_id','total_nmarhun'));
}
}
+9 -8
View File
@@ -57,20 +57,20 @@ class NotisController extends Controller
$lelong_id = $lelong_id;
$payment = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
$senarai = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
->where('lelongbid.lelong_id', $lelong_id)
->get()->toArray();
$bayaran=0;
foreach($payment as $index1=>$pay)
foreach($senarai as $index1=>$notis)
{
$bayaran = $pay['hargajualan'] - $pay['bakihargajualan'];
$bayaran = $notis['hargajualan'] - $notis['bakihargajualan'];
}
$payment[$index1]['payment'] = $payment;
$payment[$index1]['bayaran_keuntungan'] = $bayaran;
$senarai[$index1]['payment'] = $senarai;
$senarai[$index1]['bayaran_keuntungan'] = $bayaran;
return view('jananotis.senarainotis',compact('payment','lelong_id','bayaran'));
return view('jananotis.senarainotis',compact('senarai','lelong_id','bayaran'));
}
@@ -87,7 +87,7 @@ class NotisController extends Controller
$current = new Carbon();
$tarikh_cetak = $current->toDateString();
$payment = Gadai::join('lelongbid','gadai.norujukan','=','lelongbid.norujukan')
$payment = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
->join('customer','gadai.nokp','=','customer.kpbaru')
->where('lelongbid.lelong_id', $lelong_id)
->get()->toArray();
@@ -136,11 +136,12 @@ class NotisController extends Controller
if($request->type == 'excel')
{
return view('excel.listnotis_excel',compact('payment','caw','lelong_id','bayaran'));
}
else
{
$pdf = PDF::loadView('pdf.listnotis',compact('payment','caw','lelong_id','bayaran'))
->setPaper('a4', 'landscape');
->setPaper('a4', 'potrait');
return $pdf->download('Senarai Notis.pdf');
}
+3 -4
View File
@@ -91,7 +91,7 @@ class SimulasiController extends Controller
$simkarat->simulasi_id = $simulasi->id;
$simkarat->karat = $item->karat;
$simkarat->keterangan = $item->keterangan;
$simkarat->harga = ($hargaasas + ($item->dariharga916))/2.72; //gram
$simkarat->harga = ($hargaasas + ($item->dariharga916)); //gram
$simkarat->harga2 = $hargaasas + ($item->dariharga916); //rial
$simkarat->save();
}
@@ -486,7 +486,7 @@ class SimulasiController extends Controller
{
$karat->karat = $karat->karat;
$karat->keterangan = $karat->keterangan;
$karat->harga = $request->harga[$index];
// $karat->harga = $request->harga[$index];
$karat->harga2 = $request->harga2[$index];
$karat->save();
}
@@ -666,7 +666,6 @@ class SimulasiController extends Controller
]);
$total_marhun = $total_marhun + sizeof($databid);
$total_berat = $total_berat + $berat;
$total_nmarhun = $total_nmarhun + $nilai_marhun;
@@ -676,7 +675,7 @@ class SimulasiController extends Controller
$total_cazlelong = $total_cazlelong + $cajlelong;
$total_rugilelong = $total_rugilelong + $rugilelong;
$total_bakilelong = $total_bakilelong + $bakilelong;
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "lelong",
"name": "lelong2",
"lockfileVersion": 2,
"requires": true,
"packages": {
@@ -94,11 +94,12 @@
<script>
$(document).ready(function () {
// window.print();
// window.onfocus=function(){ window.close();}
var table2excel = new Table2Excel();
table2excel.export(document.querySelectorAll("#customers"),'senarai_notis');
setTimeout(function(){ window.close() }, 1000);
});
</script>
+20 -8
View File
@@ -94,10 +94,7 @@
<li class="{{ (request()->is('lelong/senarailelong/*') || request()->is('lelong/senarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/senarailelong')}}">Senarai Lelong</a>
</li>
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
</li>
</ul>
</ul>
</li>
@endhasrole
@hasrole('operasi')
@@ -124,10 +121,7 @@
<li class="{{ (request()->is('lelong/senarailelongtaklaku/*') || request()->is('lelong/senarailelongtaklaku') ) ? 'active' : '' }}">
<a href="{{url('lelong/senarailelongtaklaku')}}">Senarai Lelong Tak Laku</a>
</li>
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
</li>
</ul>
</ul>
</li>
<li class="{{ (request()->is('Pengesahan/*')) ? 'active' : '' }}">
<a href="#pengesahanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Kelulusan</a>
@@ -156,6 +150,24 @@
</li>
</ul>
</li>
<li class="{{ (request()->is('Laporan/*')) ? 'active' : '' }}">
<a href="#laporanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Laporan</a>
<ul class="list-unstyled collapse {{ (request()->is('lelong/*')) ? 'show' : '' }}" id="laporanSubmenu" >
<li class="{{ (request()->is('lelong/lapbrglelongindex/*') || request()->is('lelong/lapbrglelongindex') ) ? 'active' : '' }}">
<a href="{{url('lelong/lapbrglelongindex')}}">Laporan Barang Lelong</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('lelong/*')) ? 'show' : '' }}" id="laporanSubmenu" >
<li class="{{ (request()->is('lelong/lapbidaanpembidaindex/*') || request()->is('lelong/lapbidaanpembidaindex') ) ? 'active' : '' }}">
<a href="{{url('lelong/lapbidaanpembidaindex')}}">Laporan Nama Pembida</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('lelong/*')) ? 'show' : '' }}" id="laporanSubmenu" >
<li class="{{ (request()->is('lelong/laplelongindex/*') || request()->is('lelong/laplelongindex') ) ? 'active' : '' }}">
<a href="{{url('lelong/laplelongindex')}}">Laporan Lelong Keseluruhan</a>
</li>
</ul>
</li>
@endhasrole
@hasrole('account')
{{-- <li class="{{ (request()->is('home')) ? 'active' : '' }}">
@@ -30,15 +30,15 @@
</tr>
</thead>
<tbody>
@foreach($payment as $pay)
@foreach($senarai as $notis)
<tr>
<td> {{ $loop->iteration }} </td>
<td>{{ $pay['norujukan']}}</td>
<td>{{ $pay['jbg']}}</td>
<td>{{ $pay['nokp']}}</td>
<td>{{ $pay['pinjaman']}}</td>
<td>{{ $pay['bakiupah']}}</td>
<td>{{ $bayaran}}</td>
<td>{{ $notis['norujukan']}}</td>
<td>{{ $notis['jbg']}}</td>
<td>{{ $notis['nokp']}}</td>
<td>{{ $notis['pinjaman']}}</td>
<td>{{ $notis['bakiupah']}}</td>
<td>{{ $bayaran}}</td>
@endforeach
</tbody>
@@ -55,6 +55,7 @@
"columnDefs": [
{
"targets": 0,
"target": '_blank',
"orderable": false
},
{
@@ -71,18 +72,20 @@
buttons: [
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
target: "_blank",
titleAttr: 'Export to Excel',
text: '<i class="fas fa-download"></i>',
text: '<h8><b>EXCEL</b></h8>',
action: function ( e, dt, node, config ) {
$('#typedonwload').val('excel');
$("#exportpdf").submit();
// window.open("_blank");
}
},
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Export to PDF',
text: '<i class="fas fa-download"></i>',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$('#typedonwload').val('pdf');
$("#exportpdf").submit();
+117
View File
@@ -0,0 +1,117 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="{{route('lelong.pdfsenarailapbidaan')}}" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<input type="hidden" name="lelongid" value="{{$lelong_id}}">
<table class="table table-striped table-xl text-center" id="notis" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>No Rujukan</th>
<th>Nilai Marhun</th>
<th>Pembiayaan</th>
<th>Upah Simpan</th>
<th>Caj Lelong</th>
<th>Harga Lelong</th>
<th>Baki Rugi</th>
<th>Harga Asas</th>
<th>Nama Pembeli</th>
</tr>
</thead>
<tbody>
@foreach ($laporanlelong as $laporan)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $laporan['norujukan']}}</td>
<td>{{ $laporan['nilaimarhun']}}</td>
<td>{{ $laporan['pinjaman']}}</td>
<td>{{ $laporan['upahsimpan']}}</td>
<td>{{ $laporan['cajlelong']}}</td>
<td>{{ $laporan['hargabida']}}</td>
<td>{{ $laporan['baki']}}</td>
<td>{{ $laporan['hargaasas']}}</td>
<td>{{ $laporan['nama_bidder']}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="2" align="left"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
{{-- <td>{{ number_format($total_upahkeuntungan, 2, '.', ',') }}</td>
<td></td>
<td>{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td> --}}
<td></td>
</tr>
</tfoot>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.laplelongindex') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
</div>
<script>
var tablelelongbid= $('#notis').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
@@ -0,0 +1,73 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@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><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
<th>Lelong ID</th>
<th>Cawangan</th>
<th>Tarikh Lelong</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $bid->id }}"></td>
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->caw_name}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td class="text-center">
<a href="{{ route('lelong.laplelong',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong Keseluruhan" ><i class="far fa-edit"></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,73 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@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><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
<th>Lelong ID</th>
<th>Cawangan</th>
<th>Tarikh Lelong</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $bid->id }}"></td>
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->caw_name}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td class="text-center">
<a href="{{ route('lelong.senarailapbidaan',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="far fa-edit"></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
@@ -31,7 +31,6 @@
<td>{{ $bid->caw_name}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td class="text-center">
{{-- <a href="{{ route('jananotis.jananotis',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Barang Lelong " style="margin-right:40px" ><i class="fas fa-download"></i></a> --}}
<a href="{{ route('lelong.senaraibrglelong',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Barang Lelong" ><i class="far fa-edit"></i></a>
</td>
</tr>
+140 -130
View File
@@ -1,145 +1,155 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@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 text-center" id="lelongtaklaku" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Tarikh Lelong</th>
<th>No Rujukan</th>
<th>Nama Cawangan</th>
<th>Bilangan</th>
<th>Pinjaman (RM)</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Upah Simpan (RM)</th>
<th>Caj Lelong (RM)</th>
<th>Rugi Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
<th>Status Lelong (RM)</th>
<th>Status Laporan Lelong (RM)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($lelongtaklaku as $leltaklaku)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $leltaklaku->t_lelong }}</td>
<td>{{ $leltaklaku->norujukan }}</td>
<td>{{ $leltaklaku->caw_name }}</td>
<td> {{ $leltaklaku['suratlelongtaklaku'] }} </td>
<td>{{ $leltaklaku->pinjaman }}</td>
<td>{{ $leltaklaku->berat }}</td>
<td>{{ $leltaklaku->nilaimarhun }}</td>
<td>{{ $leltaklaku->hargaasas }}</td>
<td>{{ $leltaklaku->upahsimpan }}</td>
<td>{{ $leltaklaku->cajlelong }}</td>
<?php
$rugi = '';
$baki = '';
if(strpos($leltaklaku->baki, '-') !== false)
{
$rugi = $leltaklaku->baki;
}
else {
$baki = $leltaklaku->baki;
}
?>
<td>{{$rugi}}</td>
<td>{{$baki}}</td>
@if($leltaklaku->status_jual == 0)
<td style = "color:red" ><b>TIDAK LAKU</b> </td>
@endif
<td class="text-center">
<a href=" # " target = "blank" data-toggle="tooltip" data-placement="top" title="Muat Turun Laporan" ><i class="fas fa-download"></i></a>
</td>
<td>
<input type="checkbox" aria-label="Checkbox for following text input" >
</td>
</tr>
@endforeach
</tbody>
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="{{route('lelong.pdflelongtaklaku')}}" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<input type="hidden" name="lelongid" value="{{$lelong_id}}">
<table class="table table-striped table-xl text-center" id="notis" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Tarikh Lelong</th>
<th>No Rujukan</th>
<th>Nama Cawangan</th>
<th>Bilangan</th>
<th>Pinjaman (RM)</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Upah Simpan (RM)</th>
<th>Caj Lelong (RM)</th>
<th>Rugi Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
<th>Status Lelong (RM)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($lelongtaklaku as $leltaklaku)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $leltaklaku->t_lelong }}</td>
<td>{{ $leltaklaku->norujukan }}</td>
<td>{{ $leltaklaku->caw_name }}</td>
<td> {{ $leltaklaku['suratlelongtaklaku'] }} </td>
<td>{{ $leltaklaku->pinjaman }}</td>
<td>{{ $leltaklaku->berat }}</td>
<td>{{ $leltaklaku->nilaimarhun }}</td>
<td>{{ $leltaklaku->hargaasas }}</td>
<td>{{ $leltaklaku->upahsimpan }}</td>
<td>{{ $leltaklaku->cajlelong }}</td>
<?php
$rugi = '';
$baki = '';
if(strpos($leltaklaku->baki, '-') !== false)
{
$rugi = $leltaklaku->baki;
}
else {
$baki = $leltaklaku->baki;
}
?>
<td>{{$rugi}}</td>
<td>{{$baki}}</td>
@if($leltaklaku->status_jual == 0)
<td style = "color:red" ><b>TIDAK LAKU</b> </td>
@endif
<td>
<input type="checkbox" aria-label="Checkbox for following text input" >
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="5" align="left"><b><strong>JUMLAH KESELURUHAN</strong></b></td>
<td><strong>{{ number_format($total_pinjaman, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_berat, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_upahsimpan, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_cajlelong, 2, '.', ',') }}</strong></td>
<?php
$total_rugi = 0;
$total_baki = 0;
if(strpos($leltaklaku->total_bakirugi, '-') !== false)
{
$total_baki = $total_bakirugi;
}
else {
$total_rugi = $total_bakirugi;
}
?>
<td><strong>{{number_format($total_rugi, 2, '.', ',')}}</strong></td>
<td><strong>{{number_format($total_baki, 2, '.', ',')}}</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
</form>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.senarailelongtaklaku') }}" class="btn btn-primary">Kembali</a>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.senarailelongtaklaku') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
</div>
<script>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablelelongtaklaku = $('#lelongtaklaku').DataTable({
"columnDefs": [
var tablelelongbid= $('#notis').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
"info": false,
"lengthChange": false,
"pageLength": 999999999,
dom: 'Bfrtip',
buttons: [
{
"targets": 0,
"orderable": false
},
{
"targets": 14,
"orderable": false
},
{
"targets": 15,
"orderable": false
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to CSV',
// text: '<i class="fas fa-download"></i>',
// action: function ( e, dt, node, config ) {
// $("#exportform").submit();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
@@ -21,7 +21,7 @@
<th>No</th>
<th>No Rujukan</th>
<th>Harga Asas</th>
<th>Upah</th>
<th>Upah Keuntungan</th>
<th>JBG</th>
<th>Nilai Marhun Asal</th>
<th>Pinjaman</th>
@@ -32,26 +32,33 @@
<tbody>
@foreach($brglelong as $brg)
<tr>
<td> {{ $loop->iteration }} </td>
<td>{{ $brg['norujukan']}}</td>
<td>{{$brg['hargaasas']}}</td>
<td>{{$brg['upahsimpan']}}</td>
<td>{{ $brg['jbg']}}</td>
<td>{{ $brg['nilaimarhun']}}</td>
<td>{{ $brg['pinjaman']}}</td>
<td>{{ $brg['marhun']}}</td>
<td width="5%" align="center">{{ $loop->iteration }} </td>
<td width="14%" align="center">{{ $brg['norujukan']}}</td>
<td width="12%" align="center">{{$brg['hargaasas']}}</td>
<td width="12%" align="center">{{ $brg['keuntungan'] }}</td>
<td width="9%" align="center">{{ $brg['jbg']}}</td>
<td width="13%" align="center">{{ $brg['nilaimarhun']}}</td>
<td width="13%" align="center">{{ $brg['pinjaman']}}</td>
<td width="17%" align="center">{{ $brg['marhun']}}</td>
@endforeach
</tbody>
<tfoot>
<tr>
{{-- <td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ number_format($tot_hargaasas, 2, '.', ',') }}</td> --}}
<td colspan="2" align="left"><b><strong>JUMLAH KESELURUHAN</strong></b></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_upahkeuntungan, 2, '.', ',') }}</strong></td>
<td></td>
<td><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_pinjaman, 2, '.', ',') }}</strong></td>
<td></td>
</tr>
</tfoot>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.laporansenarailelong') }}" class="btn btn-primary">Kembali</a>
<a href="{{ route('lelong.lapbrglelongindex') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
@@ -72,15 +79,15 @@
"info": false,
"lengthChange": false,
"pageLength": 15,
"pageLength": 999999999,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<i class="fas fa-download"></i>',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
@@ -0,0 +1,106 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="{{route('lelong.pdfsenarailapbidaan')}}" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<input type="hidden" name="lelongid" value="{{$lelong_id}}">
<table class="table table-striped table-xl text-center" id="notis" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>No Rujukan</th>
<th>Harga Asas</th>
<th>Nama Pembida</th>
<th>Harga Bidaan(RM)</th>
<th>Masa Bidaan</th>
</tr>
</thead>
<tbody>
@foreach ($arraydetails as $laporan)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $laporan['laporan']['norujukan']}}</td>
<td>{{ $laporan['laporan']['hargaasas']}}</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['nama_bidder']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['hargabida']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['masa_bidaan']}}</span><br>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.lapbidaanpembidaindex') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
</div>
<script>
var tablelelongbid= $('#notis').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
+31 -31
View File
@@ -172,7 +172,7 @@
<th>Karat</th>
<th>Keterangan</th>
<th>Harga</th>
<th>Harga</th>
{{-- <th>Harga</th> --}}
</tr>
</thead>
<tbody class="text-center">
@@ -181,7 +181,7 @@
<td>{{$karat->karat}}</td>
<td>{{$karat->keterangan}}</td>
<td class="input">{{$karat->harga2}}</td>
<td class="input">{{$karat->harga}}</td>
{{-- <td class="input">{{$karat->harga}}</td> --}}
</tr>
@endforeach
</tbody>
@@ -243,14 +243,14 @@
$("td.input").each(function(index) {
// console.log(index)
var la = $(this).html();
if(index%2 ==0 ) //even-0-2-4
{
// if(index%2 ==0 ) //even-0-2-4
// {
$(this).html("<input type='text' name='harga2[]' id=harga2"+index+" value="+la+" />");
}
else //odd-1-3-5-7
{
$(this).html("<input type='text' name='harga[]' id=harga"+index+" value="+la+" />");
}
// }
// else //odd-1-3-5-7
// {
// $(this).html("<input type='text' name='harga[]' id=harga"+index+" value="+la+" />");
// }
})
$("#hideform").show();
@@ -274,35 +274,35 @@
let jeniskarat = $(e).data('jeniskarat');
let maxcolumn = 2;
// let maxcolumn = 2;
let count = 0;
let indexarray = 0;
$("td.input").each(function(index) {
if(hargaasasbaru)
{
$('#btnsimpan').prop('disabled', false)
if(index%2 == 0)
{
let harga1 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
// if(index%2 == 0)
// {
let harga1 = parseFloat(hargaasasbaru);
let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = harga1 + (harga2);
count++;
$('#harga2'+index).val(newhargaasas.toFixed(2));
}
else
{
let harga1 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = (harga1 + (harga2))/2.72;;
count++;
$('#harga'+index).val(newhargaasas.toFixed(2));
}
// }
// else
// {
// let harga1 = parseFloat(hargaasasbaru);
// let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
// let newhargaasas = (harga1 + (harga2))/2.72;;
// count++;
// $('#harga'+index).val(newhargaasas.toFixed(2));
// }
if(count == maxcolumn)
{
count = 0;
// if(count == maxcolumn)
// {
// count = 0;
indexarray++;
}
// }
}
else
{
@@ -312,11 +312,11 @@
{
$('#harga2'+index).val(dummy.toFixed(2));
}
else
{
// else
// {
$('#harga'+index).val(dummy.toFixed(2));
}
// $('#harga'+index).val(dummy.toFixed(2));
// }
}
})
+5 -2
View File
@@ -66,8 +66,11 @@
</p>
<p>
No Rujukan: {{$notis['norujukan']}} <br>
Kepada:{{ $notis['nama'] }}<br> {{ strtoupper($notis['alamat1']) }} {!! ($notis['alamat2'] === null || $notis['alamat2'] === '') ? '' : '<br>' . strtoupper($notis['alamat2']) !!} <br> {{ ' ' . $notis['poskod'] . ' ' . strtoupper($notis['koddaerah']) . ' ' . strtoupper($notis['kodnegeri'])}}</td>
<br>
Kepada:{{ $notis['nama'] }}<br> {{ strtoupper($notis['alamat1']) }} {!! ($notis['alamat2'] === null || $notis['alamat2'] === '') ? '' : '<br>'
. strtoupper($notis['alamat2']) !!} <br> {{ ' ' . $notis['poskod'] . ' ' . strtoupper($notis['koddaerah']) . ' ' . strtoupper($notis['kodnegeri'])}}</td>
</p>
<p>
No Telefon: {{$notis['telefon']}} <br>
No K/P: {{$notis['kpbaru']}}
</p>
+26 -16
View File
@@ -80,7 +80,19 @@ tr:nth-child(even) {
</tr>
</table>
<br><br>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($lelongid as $tarikh)
<td>Tarikh Lelong: {{ $tarikh->tarikh_lelong }}</td>
</tr>
@endforeach
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
@@ -105,29 +117,27 @@ tr:nth-child(even) {
<td> {{ $loop->iteration }} </td>
<td>{{ $brg['norujukan'] }}</td>
<td>{{ ($brg['norujukan']) }}</td>
<td>{{ number_format($brg['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($brg['upahsimpan'], 2, '.', ',') }}</td>
<td>{{ number_format($brg['keuntungan'], 2, '.', ',') }}</td>
<td>{{ $brg['jbg'] }}</td>
<td>{{ number_format($brg['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($brg['pinjaman'], 2, '.', ',') }}</td>
<td>{{ ($brg['marhun']) }}</td>
@endforeach
<tr>
<td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ number_format($totharga_asas, 2, '.', ',') }}</td>
<td>{{ number_format($totkeuntungan, 2, '.', ',') }}</td>
<td></td>
<td>{{ number_format($totnilai_marhun, 2, '.', ',') }}</td>
<td>{{ number_format($tot_pinjaman, 2, '.', ',') }}</td>
<td></td>
{{-- <tr>
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
<td></td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_upah, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td></td> --}}
</tr>
+20 -8
View File
@@ -85,14 +85,14 @@ tr:nth-child(even) {
<thead>
<tr>
<th width="2%" align="left">No</th>
<th width="12%" align="left">No Rujukan </th>
<th width="15%" align="left">No Rujukan </th>
<th width="10%" align="left">Jenis Marhun</th>
<th width="10%" align="left">Karat</th>
<th width="10%" align="left">Berat(gm)</th>
<th width="12%" align="left">Harga(RM)</th>
<th width="14%" align="left">Nilai Marhun(RM)</th>
<th width="12%" align="left">Nilai Marhun(RM)</th>
<th width="14%" align="left">Harga Asas(RM)</th>
<th width="16%" align="left">Nota</th>
<th width="13%" align="left">Nota</th>
</tr>
</thead>
@@ -128,14 +128,12 @@ tr:nth-child(even) {
</tr>
<tr>
<td colspan="4" align="left"><strong>Jumlah</strong></td>
<td colspan="4" align="left"></td>
<td>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td></td>
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td></td>
{{-- <td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td> --}}
</tr>
@endforeach
@foreach ($arraycaw as $index=>$caw)
@@ -147,8 +145,6 @@ tr:nth-child(even) {
<td><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td></td>
{{-- <td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td> --}}
</tr>
@endforeach
</table>
@@ -159,3 +155,19 @@ tr:nth-child(even) {
</tbody>
@foreach ($laporanpembida as $laporan)
<tr>
<td>{{ $loop->iteration }} </td>
<td>{{ $laporan['norujukan'] }}</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['nilaimarhun'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['nama_bidder'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['hargabida'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['masa_bidaan'] }}<br>
@endforeach</td>
@@ -0,0 +1,194 @@
<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 LELONG TAK LAKU</b></u></td>
</tr>
</table>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($infolelong as $info)
<td>Cawangan:{{ $info->caw_name}}</td>
<td>Tarikh Lelong:{{ $info->tarikh_lelong}}</td>
@endforeach
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th width="3%" align="left">No</th>
<th width="15%" align="left">No Rujukan</th>
<th width="8%" align="left">Bilangan</th>
<th width="12%" align="left">Pinjaman(RM)</th>
<th width="8%" align="left">Berat(gm)</th>
<th width="12%" align="left">Nilai Marhun(RM)</th>
<th width="12%" align="left">Harga Asas(RM)</th>
<th width="12%" align="left">Upah Simpan(RM)</th>
<th width="12%" align="left">Caj Lelong(RM)</th>
<th width="12%" align="left">Rugi Lelong(RM)</th>
<th width="12%" align="left">Baki Lelong(RM)</th>
>
</tr>
</thead>
@foreach ($lelongtaklaku as $leltaklaku)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $leltaklaku->norujukan }}</td>
<td> {{ $leltaklaku['suratlelongtaklaku'] }} </td>
<td>{{ $leltaklaku->pinjaman }}</td>
<td>{{ $leltaklaku->berat }}</td>
<td>{{ $leltaklaku->nilaimarhun }}</td>
<td>{{ $leltaklaku->hargaasas }}</td>
<td>{{ $leltaklaku->upahsimpan }}</td>
<td>{{ $leltaklaku->cajlelong }}</td>
<?php
$rugi = '';
$baki = '';
if(strpos($leltaklaku->baki, '-') !== false)
{
$rugi = $leltaklaku->baki;
}
else {
$baki = $leltaklaku->baki;
}
?>
<td>{{$rugi}}</td>
<td>{{$baki}}</td>
<td></td>
<td></td>
</tr>
@endforeach
<tr>
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
<td><strong>{{ number_format($total_pinjaman, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_berat, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_upahsimpan, 2,'.',',') }}</strong></td>
<td><strong>{{ number_format($total_cajlelong, 2,'.',',') }}</strong></td>
<?php
$total_rugi = 0;
$total_baki = 0;
if(strpos($leltaklaku->total_bakirugi, '-') !== false)
{
$total_baki = $total_bakirugi;
}
else {
$total_rugi = $total_bakirugi;
}
?>
<td><strong>{{number_format($total_rugi, 2, '.', ',')}}</strong></td>
<td><strong>{{number_format($total_baki, 2, '.', ',')}}</strong></td>
</tr>
</table>
</tbody>
@@ -0,0 +1,153 @@
<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</b></u></td>
</tr>
</table>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($lelongid as $info)
<td>Cawangan:{{ $info->caw_name}}</td>
<td>Tarikh Lelong:{{ $info->tarikh_lelong}}</td>
@endforeach
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th width="5%" align="left">No</th>
<th width="12%" align="left">No Rujukan</th>
<th width="12%" align="left">Harga Asas(RM)</th>
<th width="12%" align="left">Nama Pembida</th>
<th width="15%" align="left">Harga Bidaan(RM)</th>
<th width="12%" align="left">Masa Bidaan</th>
</tr>
</thead>
@foreach ($arraydetails as $laporan)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $laporan['laporan']['norujukan']}}</td>
<td>{{ $laporan['laporan']['hargaasas']}}</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['nama_bidder']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['hargabida']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['masa_bidaan']}}</span><br>
@endforeach
</td>
</tr>
@endforeach
</table>
</tbody>
+33 -34
View File
@@ -168,7 +168,6 @@
<th>Karat</th>
<th>Keterangan</th>
<th>Harga</th>
<th>Harga</th>
</tr>
</thead>
<tbody class="text-center">
@@ -177,7 +176,7 @@
<td>{{$karat->karat}}</td>
<td>{{$karat->keterangan}}</td>
<td class="input">{{$karat->harga2}}</td>
<td class="input">{{$karat->harga}}</td>
{{-- <td class="input"></td> --}}
</tr>
@endforeach
</tbody>
@@ -234,14 +233,14 @@
$("td.input").each(function(index) {
// console.log(index)
var la = $(this).html();
if(index%2 ==0 ) //even-0-2-4
{
// if(index%2 ==0 ) //even-0-2-4
// {
$(this).html("<input type='text' name='harga2[]' id=harga2"+index+" value="+la+" />");
}
else //odd-1-3-5-7
{
$(this).html("<input type='text' name='harga[]' id=harga"+index+" value="+la+" />");
}
// }
// else //odd-1-3-5-7
// {
// $(this).html("<input type='text' name='harga2[]' id=harga2"+index+" value="+la+" />");
// }
})
$("#hideform").show();
@@ -264,49 +263,49 @@
let jeniskarat = $(e).data('jeniskarat');
let maxcolumn = 2;
// let maxcolumn = 2;
let count = 0;
let indexarray = 0;
$("td.input").each(function(index) {
if(hargaasasbaru)
{
$('#btnsimpan').prop('disabled', false)
if(index%2 == 0)
{
let harga1 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
// if(index%2 == 0)
// {
let harga1 = parseFloat(hargaasasbaru);
let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = harga1 + (harga2);
count++;
$('#harga2'+index).val(newhargaasas.toFixed(2));
}
else
{
let harga1 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = (harga1 + (harga2))/2.72;;
count++;
$('#harga'+index).val(newhargaasas.toFixed(2));
}
// }
// else
// {
// let harga1 = parseFloat(hargaasasbaru);
// let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
// let newhargaasas = (harga1 + (harga2));;
// count++;
// $('#harga2'+index).val(newhargaasas.toFixed(2));
// }
if(count == maxcolumn)
{
count = 0;
// if(count == maxcolumn)
// {
// count = 0;
indexarray++;
}
// }
}
else
{
$('#btnsimpan').prop('disabled', true)
let dummy =0;
if(index%2 == 0)
{
// if(index%2 == 0)
// {
$('#harga2'+index).val(dummy.toFixed(2));
}
else
{
// }
// else
// {
$('#harga'+index).val(dummy.toFixed(2));
}
// $('#harga'+index).val(dummy.toFixed(2));
// }
}
})
+26 -17
View File
@@ -90,26 +90,33 @@ Route::group(['middleware','prefix'=>'payment'], function () {
Route::group(['prefix'=>'lelong'], function () {
Route::group(['middleware' => ['permission:pendaftaranbatch']], function () {
Route::get('/create/{id}',['as'=>'lelong.create','uses'=>'LelongController@create']);
Route::get('/senarailelong',['as'=>'lelong.senarailelong','uses'=>'LelongController@index']);
Route::get('/senaraipemenang/{lelong_id}',['as'=>'lelong.senaraipemenang','uses'=>'LelongController@senaraipemenang']);
Route::get('/senaraisagpemenang/{user_id}/{lelong_id}',['as'=>'lelong.senaraisagpemenang','uses'=>'LelongController@senaraisagpemenang']);
Route::get('/senarailelongtaklaku',['as'=>'lelong.senarailelongtaklaku','uses'=>'LelongController@senarailelongtaklaku']);
Route::get('/lelongtaklaku/{lelong_id}',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
Route::get('/janapemenang/{id}', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
Route::get('/laporansenarailelong',['as'=>'lelong.laporansenarailelong','uses'=>'LelongController@laporansenarailelong']);
Route::get('/senaraibrglelong/{lelong_id}',['as'=>'lelong.senaraibrglelong','uses'=>'LelongController@senaraibrglelong']);
Route::post('/pdfsenarailelong',['as'=>'lelong.pdfsenarailelong','uses'=>'LelongController@pdfsenarailelong']);
Route::get('/create/{id}',['as'=>'lelong.create','uses'=>'LelongController@create']);
Route::get('/senarailelong',['as'=>'lelong.senarailelong','uses'=>'LelongController@index']);
Route::get('/senaraipemenang/{lelong_id}',['as'=>'lelong.senaraipemenang','uses'=>'LelongController@senaraipemenang']);
Route::get('/senaraisagpemenang/{user_id}/{lelong_id}',['as'=>'lelong.senaraisagpemenang','uses'=>'LelongController@senaraisagpemenang']);
Route::get('/senarailelongtaklaku',['as'=>'lelong.senarailelongtaklaku','uses'=>'LelongController@senarailelongtaklaku']);
Route::get('/lelongtaklaku/{lelong_id}',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
Route::post('/pdflelongtaklaku',['as'=>'lelong.pdflelongtaklaku','uses'=>'LelongController@pdflelongtaklaku']);
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
Route::get('/janapemenang/{id}', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
Route::get('/lapbrglelongindex',['as'=>'lelong.lapbrglelongindex','uses'=>'LelongController@lapbrglelongindex']);
Route::get('/senaraibrglelong/{lelong_id}',['as'=>'lelong.senaraibrglelong','uses'=>'LelongController@senaraibrglelong']);
Route::post('/pdfsenarailelong',['as'=>'lelong.pdfsenarailelong','uses'=>'LelongController@pdfsenarailelong']);
Route::get('/lapbidaanpembidaindex', ['as'=>'lelong.lapbidaanpembidaindex','uses'=>'LelongController@lapbidaanpembidaindex']);
Route::get('/senarailapbidaan/{lelong_id}',['as' =>'lelong.senarailapbidaan','uses'=>'LelongController@senarailapbidaan']);
Route::post('/pdfsenarailapbidaan',['as' =>'lelong.pdfsenarailapbidaan','uses'=>'LelongController@pdfsenarailapbidaan']);
Route::get('/laplelongindex',['as' =>'lelong.laplelongindex','uses'=>'LelongController@laplelongindex']);
Route::get('/laplelong/{lelong_id}',['as' =>'lelong.laplelong','uses'=>'LelongController@laplelong']);
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
});
@@ -228,3 +235,5 @@ Route::group(['middleware' => ['permission:jananotis'],'prefix'=>'jananotis'], f
});