diff --git a/app/Http/Controllers/Mobile/LelongMobileController.php b/app/Http/Controllers/Mobile/LelongMobileController.php index 351f24b9..0b23095b 100644 --- a/app/Http/Controllers/Mobile/LelongMobileController.php +++ b/app/Http/Controllers/Mobile/LelongMobileController.php @@ -184,41 +184,45 @@ class LelongMobileController extends Controller return response()->json($lelongbidder); } - public function bidRecordByCawangan($userId, Request $request) + public function bidRecordByCawangan($userId) { - $groupCawangan = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id') - ->join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id') - ->where('user_id', '=', $userId) - ->where('lelong_id', $request->lelongId) - ->select('caw_id', 'caw_name') - ->groupBy('caw_id') - ->get()->toArray(); + $currentdate = Carbon::now(); + $currentdate = $currentdate->toDateString(); + $lelong = Lelong::where('tarikh_lelong', '=', $currentdate)->select('id')->first(); - foreach ($groupCawangan as $index => $cawangan) { - - $lelongBidder = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id') - ->where('user_id', $userId) - ->where('caw_id', $cawangan) - ->where('lelong_id', $request->lelongId) + if ($lelong) { + $groupCawangan = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id') + ->join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id') + ->where('user_id', '=', $userId) + ->where('lelong_id', $lelong->id) + ->select('caw_id', 'caw_name') + ->groupBy('caw_id') ->get()->toArray(); - $total_hargabida = 0; - $total_berat = 0; - foreach ($lelongBidder as $index1 => $data) { - $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->get(); - $lelongBidder[$index1]['filemarhun'] = $fileMarhun; + foreach ($groupCawangan as $index => $cawangan) { - $total_hargabida += $data['hargabida']; - $total_berat += $data['berat']; - $marhun = LelongBidMarhun::where('lelongbid_id', '=', $data['id'])->get()->toArray(); - $lelongBidder[$index1]['lelongbidmarhun'] = $marhun; + $lelongBidder = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id') + ->where('user_id', $userId) + ->where('caw_id', $cawangan) + ->where('lelong_id', $lelong->id) + ->get()->toArray(); + + $total_hargabida = 0; + $total_berat = 0; + foreach ($lelongBidder as $index1 => $data) { + $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->get(); + $lelongBidder[$index1]['filemarhun'] = $fileMarhun; + + $total_hargabida += $data['hargabida']; + $total_berat += $data['berat']; + $marhun = LelongBidMarhun::where('lelongbid_id', '=', $data['id'])->get()->toArray(); + $lelongBidder[$index1]['lelongbidmarhun'] = $marhun; + } + $groupCawangan[$index]['total_berat'] = number_format((float)$total_berat, 2, '.', ''); + $groupCawangan[$index]['total_bidaan'] = number_format((float)$total_hargabida, 2, '.', ''); + $groupCawangan[$index]['lelongbid'] = $lelongBidder; } - $groupCawangan[$index]['total_berat'] = number_format((float)$total_berat, 2, '.', ''); - $groupCawangan[$index]['total_bidaan'] = number_format((float)$total_hargabida, 2, '.', ''); - $groupCawangan[$index]['lelongbid'] = $lelongBidder; - } - if ($groupCawangan) { return response()->json([ 'success' => true, 'lelongbidder' => $groupCawangan diff --git a/config/database.php b/config/database.php index 4d0f0e9d..606cacd1 100644 --- a/config/database.php +++ b/config/database.php @@ -62,13 +62,13 @@ return [ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], 'modes' => [ - //'ONLY_FULL_GROUP_BY', // Disable this to allow grouping by one column - 'STRICT_TRANS_TABLES', - 'NO_ZERO_IN_DATE', - 'NO_ZERO_DATE', - 'ERROR_FOR_DIVISION_BY_ZERO', - 'NO_AUTO_CREATE_USER', - 'NO_ENGINE_SUBSTITUTION' + // //'ONLY_FULL_GROUP_BY', // Disable this to allow grouping by one column + // 'STRICT_TRANS_TABLES', + // 'NO_ZERO_IN_DATE', + // 'NO_ZERO_DATE', + // 'ERROR_FOR_DIVISION_BY_ZERO', + // 'NO_AUTO_CREATE_USER', + // 'NO_ENGINE_SUBSTITUTION' ], ], diff --git a/resources/views/pembida/detailsbidaan.blade.php b/resources/views/pembida/detailsbidaan.blade.php index 82fc6576..9543c232 100644 --- a/resources/views/pembida/detailsbidaan.blade.php +++ b/resources/views/pembida/detailsbidaan.blade.php @@ -3,11 +3,17 @@ @section('content')
-
- -
+
+
+
+ + + +
+ senarai SAG Menang +
+
+
@if ($message = Session::get('failed'))

{{ $message }}

@@ -25,7 +31,7 @@
-->
- +
diff --git a/resources/views/pembida/detailsbidaanbelumbayar.blade.php b/resources/views/pembida/detailsbidaanbelumbayar.blade.php index aee00bbb..72998e27 100644 --- a/resources/views/pembida/detailsbidaanbelumbayar.blade.php +++ b/resources/views/pembida/detailsbidaanbelumbayar.blade.php @@ -3,11 +3,17 @@ @section('content')
-
- -
+
+
+
+ + + +
+ senarai Sag Untuk Isytihar Tak Laku +
+
+
@if ($message = Session::get('failed'))

{{ $message }}

@@ -20,10 +26,10 @@
-
Bil
+
- + @@ -37,7 +43,7 @@ @foreach($infos as $index=> $inf) - + @@ -67,6 +73,7 @@ + - + @endsection diff --git a/resources/views/pembida/pembayaranbidaan.blade.php b/resources/views/pembida/pembayaranbidaan.blade.php index 4eeeef8f..283533a7 100644 --- a/resources/views/pembida/pembayaranbidaan.blade.php +++ b/resources/views/pembida/pembayaranbidaan.blade.php @@ -4,25 +4,31 @@
-
-
+
+
+
+ + + +
+ Senarai Pembayaran Bidaan +
+
+
@if ($message = Session::get('success'))

{{ $message }}

@endif -

Senarai Pembayaran Bidaan

{{ $getkodcaw['caw_name'] }}

-
+ {{--
@if($listwinner != NULL) Export Data Lelong @endif
-
-
Bil No Rujukan Pembida
{{ $loop->iteration }} {{ $inf['norujukan'] }} {{ $inf['nama_bidder'] }}
+ --}} +
@@ -62,7 +68,7 @@ @endif @endforeach diff --git a/resources/views/pembida/senlelbelumbayarbidaan.blade.php b/resources/views/pembida/senlelbelumbayarbidaan.blade.php index 63f0497c..c6d10758 100644 --- a/resources/views/pembida/senlelbelumbayarbidaan.blade.php +++ b/resources/views/pembida/senlelbelumbayarbidaan.blade.php @@ -4,14 +4,21 @@
-
+
+
+
+
+ Bidaan Belum Bayar +
+
+
@if ($message = Session::get('success'))

{{ $message }}

@endif -
Bil - +
+
@@ -32,7 +39,7 @@ echo($t_lelong); @endphp diff --git a/resources/views/pembida/senlelpembayaranbidaan.blade.php b/resources/views/pembida/senlelpembayaranbidaan.blade.php index cd4496aa..cfeb28b2 100644 --- a/resources/views/pembida/senlelpembayaranbidaan.blade.php +++ b/resources/views/pembida/senlelpembayaranbidaan.blade.php @@ -4,13 +4,20 @@
-
+
+
+
+
+ Senarai Pembayaran Bidaan +
+
+
@if ($message = Session::get('success'))

{{ $message }}

@endif -
No - + {{ $lel['caw_name']}}
+
@@ -36,7 +43,7 @@ @endphp
No @foreach($lel['detailsinfo'] as $details) - + {{ $details['caw_name']}}
@endforeach