+
+
+
@@ -449,38 +524,40 @@ hr.new5 {
+
*Paparan terbaik resit menggunakan paparan web.
-
-
- | .................................................... |
- |
- .................................................... |
- |
- .................................................... |
- |
- .................................................... |
-
-
+{{--
+
+ | .................................................... |
+ |
+ .................................................... |
+ |
+ .................................................... |
+ |
+ .................................................... |
+
+
-| DiSemak |
- |
- Cagaran Di Keluarkan |
- |
- Cagaran Diterima |
- |
- Ar-Rahn {{ Auth::user()->name }} |
+ DiSemak |
+ |
+ Cagaran Di Keluarkan |
+ |
+ Cagaran Diterima |
+ |
+ Ar-Rahn {{ Auth::user()->name }} |
-
-
-
-
+
+
+
+
+
@@ -489,40 +566,74 @@ hr.new5 {
-
-| Salinan Pejabat |
-
-
-| RESIT BAYARAN |
+
+ | Salinan Pejabat |
+
+
+ | RESIT BAYARAN |
-
+
-
-| Marhun | : {{ $gadai['marhun'] }} | | | | No SAG | : {{ $gadai['norujukan'] }} |
- |
-
-| Nama | : {{ $customers_info['nama'] }} | | | | Tarikh Bayar | : @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/Y'); echo $date; @endphp |
- |
+
+ | Marhun |
+ : {{ $gadai['marhun'] }} |
+
+
+ | |
+ |
+ No SAG |
+ : {{ $gadai['norujukan'] }} |
+ |
+
+ | Nama |
+ : {{ $customers_info['nama'] }} |
+
+
+ | |
+ |
+ Tarikh Bayar |
+ : @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/Y'); echo $date; @endphp |
+ |
-
-| No K/P | : @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp | | | | Tempoh Simpan | : {{ $gadai['tempoh'] }} |
- |
+
+ | No K/P |
+ : @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp |
+
+
+ | |
+ |
+ Tempoh Simpan |
+ : {{ $gadai['tempoh'] }} |
+ |
-
-| Nama Wakil | : @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp | | | | | |
- |
+
+ | Nama Wakil |
+ : @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp |
+
+
+ | |
+ |
+ |
+ |
+ |
-
-| No K/P Wakil | : @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp | | | | | |
-
+
+ | No K/P Wakil |
+ : @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp |
+
+ | |
+ |
+ |
+ |
+
@@ -558,26 +669,26 @@ hr.new5 {
-
- | .................................................... |
- |
+
| .................................................... |
- |
+ |
.................................................... |
- |
+ |
.................................................... |
-
-
+ |
+ .................................................... |
+
+
-| DiSemak |
- |
+ DiSemak |
+ |
Cagaran Di Keluarkan |
- |
+ |
Cagaran Diterima |
- |
+ |
Ar-Rahn {{ Auth::user()->name }} |
-
+
-
\ No newline at end of file
+
--}}
\ No newline at end of file
diff --git a/resources/views/resit/resittebusautotawarruq.blade.php b/resources/views/resit/resittebusautotawarruq.blade.php
index 03dce05..052b373 100644
--- a/resources/views/resit/resittebusautotawarruq.blade.php
+++ b/resources/views/resit/resittebusautotawarruq.blade.php
@@ -425,7 +425,7 @@ hr.new5 {
-
+{{--
@@ -562,4 +562,4 @@ hr.new5 {
-
\ No newline at end of file
+
--}}
\ No newline at end of file
diff --git a/resources/views/resit/resittebussebelum.blade.php b/resources/views/resit/resittebussebelum.blade.php
index 451287e..955f8b3 100644
--- a/resources/views/resit/resittebussebelum.blade.php
+++ b/resources/views/resit/resittebussebelum.blade.php
@@ -447,7 +447,7 @@ hr.new5 {
-
+{{--
@@ -570,4 +570,4 @@ hr.new5 {
-
+
--}}
diff --git a/resources/views/resit/resittebusseparuh.blade.php b/resources/views/resit/resittebusseparuh.blade.php
index bbfa8fb..61800b9 100644
--- a/resources/views/resit/resittebusseparuh.blade.php
+++ b/resources/views/resit/resittebusseparuh.blade.php
@@ -452,7 +452,7 @@ hr.new5 {
-
+{{--
@@ -587,4 +587,4 @@ hr.new5 {
-
\ No newline at end of file
+
--}}
\ No newline at end of file
diff --git a/resources/views/resit/resittebusseparuhbelum.blade.php b/resources/views/resit/resittebusseparuhbelum.blade.php
index 827ba3b..aba4a61 100644
--- a/resources/views/resit/resittebusseparuhbelum.blade.php
+++ b/resources/views/resit/resittebusseparuhbelum.blade.php
@@ -436,7 +436,7 @@ hr.new5 {
-
+{{--
@@ -562,4 +562,4 @@ hr.new5 {
-
\ No newline at end of file
+
--}}
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 3a3ded7..53b001c 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -33,7 +33,22 @@ Route::get('/firsttime', function () {
return view('/includes/login/firsttime');
});
Route::get('/portalhome', function () {
- return view('/includes/home');
+
+ $harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
+
+ $hargaemasterdahulu = array();
+
+ foreach($harga_emas as $index=>$harga)
+ {
+ $hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
+
+ $percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
+
+ array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
+
+ }
+
+ return view('includes.home',compact('hargaemasterdahulu'));
});
Route::get('/portalprofile', function () {
return view('/includes/profile');
@@ -57,7 +72,22 @@ Route::get('/bayarsag', function () {
Route::get('/', function () {
// return view('dashboard');
- return view('includes.home');
+
+ $harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
+
+ $hargaemasterdahulu = array();
+
+ foreach($harga_emas as $index=>$harga)
+ {
+ $hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
+
+ $percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
+
+ array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
+
+ }
+
+ return view('includes.home',compact('hargaemasterdahulu'));
})->middleware(['auth','verified']);
// Route::get('/home', 'HomeController@index');