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')
+