From 4c1ebd751be554af4ed46bbee36e311e1516c5e2 Mon Sep 17 00:00:00 2001 From: ISMAIL MASSERAN Date: Thu, 22 Oct 2026 13:02:33 +0800 Subject: [PATCH] DONE: add komoditi page for khazanah, update certs to include all three certs into one file --- app/Http/Controllers/KomuditiController.php | 23 ++- .../homepage/khazanah/bsas_komoditi.blade.php | 168 ++++++++++++++++++ .../views/homepage/khazanah/home.blade.php | 4 + resources/views/print/bsas_ecert.blade.php | 1 - routes/web.php | 2 + 5 files changed, 190 insertions(+), 8 deletions(-) create mode 100644 resources/views/homepage/khazanah/bsas_komoditi.blade.php diff --git a/app/Http/Controllers/KomuditiController.php b/app/Http/Controllers/KomuditiController.php index c77afed0..7fa44aa0 100644 --- a/app/Http/Controllers/KomuditiController.php +++ b/app/Http/Controllers/KomuditiController.php @@ -56,6 +56,19 @@ class KomuditiController extends Controller return redirect()->route('komuditi'); } + /** + * Khazanah branch list of BSAS commodity orders. + */ + public function khazanahBsas() + { + $auth_user = Auth::user(); + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')]) + ->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan']) + ->json(); + + return view('homepage.khazanah.bsas_komoditi', compact('cawangan_info')); + } + /** * Dummy BSAS eCert layout preview (bid, OTC, STB, then one commodity schedule). */ @@ -193,9 +206,8 @@ class KomuditiController extends Controller [$time, $date] = $this->splitBsasDateTime((string) ($ecert['PURCHASETIMEDATE'] ?? '')); return $this->certificatePage( - 'Certificate of Bid', + 'Certificate of Purchase', 'This is to certify that the following bid transaction has been executed
through the Bursa Suq Al-Sila\' in accordance with the
Rules of Bursa Suq Al-Sila\'.', - 'Generated for Ar-Rahn / Koperasi Permodalan Kelantan Berhad · BSAS Bid Certificate', $ecert, $orderMeta, array_merge([ @@ -212,9 +224,8 @@ class KomuditiController extends Controller [$time, $date] = $this->splitBsasDateTime((string) ($ecert['REPORTINGTIMEDATE'] ?? '')); $page = $this->certificatePage( - 'Certificate of Purchase', + 'Certificate of Murabahah', 'This is to certify that the following transaction has been executed
through the Bursa Suq Al-Sila\' in accordance with the
Rules of Bursa Suq Al-Sila\'.', - 'Generated for Ar-Rahn / Koperasi Permodalan Kelantan Berhad · BSAS OTC Certificate', $ecert, $orderMeta, array_merge([ @@ -240,7 +251,6 @@ class KomuditiController extends Controller return $this->certificatePage( 'Certificate of Sale', 'This is to certify that the following sale transaction has been executed
through the Bursa Suq Al-Sila\' in accordance with the
Rules of Bursa Suq Al-Sila\'.', - 'Generated for Ar-Rahn / Koperasi Permodalan Kelantan Berhad · BSAS STB Certificate', $ecert, $orderMeta, array_merge([ @@ -251,12 +261,11 @@ class KomuditiController extends Controller ); } - protected function certificatePage(string $title, string $statement, string $footerNote, array $ecert, array $orderMeta, array $rows): array + protected function certificatePage(string $title, string $statement, array $ecert, array $orderMeta, array $rows): array { return [ 'title' => $title, 'statement' => $statement, - 'footer_note' => $footerNote, 'ecert_no' => $ecert['ECERTNO'] ?? ($orderMeta['e_cert_no'] ?? '-'), 'currency' => $ecert['CURRENCY'] ?? 'MYR', 'rows' => $rows, diff --git a/resources/views/homepage/khazanah/bsas_komoditi.blade.php b/resources/views/homepage/khazanah/bsas_komoditi.blade.php new file mode 100644 index 00000000..86da062c --- /dev/null +++ b/resources/views/homepage/khazanah/bsas_komoditi.blade.php @@ -0,0 +1,168 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ +
{{ __('Rekod Komoditi BSAS') }}
+
+
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+
+
+
+
+ +@endsection diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php index 43745fbe..ffb6b8c4 100644 --- a/resources/views/homepage/khazanah/home.blade.php +++ b/resources/views/homepage/khazanah/home.blade.php @@ -282,6 +282,10 @@ Surat Wakil +
+ Komoditi BSAS +
diff --git a/resources/views/print/bsas_ecert.blade.php b/resources/views/print/bsas_ecert.blade.php index 7837c97c..8c3311fc 100644 --- a/resources/views/print/bsas_ecert.blade.php +++ b/resources/views/print/bsas_ecert.blade.php @@ -297,7 +297,6 @@ diff --git a/routes/web.php b/routes/web.php index 5fe3c294..e01cab8b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -253,6 +253,8 @@ Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganC Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']); Route::get('/khazanah/harga_emas',['as'=>'khazanah.harga_emas','uses'=>'HargaEmasController@index'])->middleware('auth','khazanah'); +Route::get('/khazanah/komoditi/bsas',['as'=>'khazanah.bsas','uses'=>'KomuditiController@khazanahBsas'])->middleware('auth','khazanah'); +Route::get('/khazanah/komoditi/bsas/ecert/{uuid}',['as'=>'khazanah.bsas.ecert','uses'=>'KomuditiController@showBsasEcert'])->middleware('auth','khazanah'); //Request Teller Batal Route Route::get('/requestbatal',['as'=>'request.pembatalan','uses'=>'KhazanahController@RequestPembatalan'])->middleware('auth','khazanah');