diff --git a/app/Http/Controllers/CustomersController.php b/app/Http/Controllers/CustomersController.php
index 7b8f14c..a3c4aac 100644
--- a/app/Http/Controllers/CustomersController.php
+++ b/app/Http/Controllers/CustomersController.php
@@ -40,7 +40,8 @@ class CustomersController extends Controller
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
$blacklist_search = false;
- return view('customers.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype'));
+
+ return view('customers.' . $cawangan_info['version'] . '.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype'));
}
public function info(Request $request){
@@ -58,7 +59,10 @@ class CustomersController extends Controller
$request->session()->forget('page_reload');
$request->session()->forget('norujukan');
- return view('customers.info',compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi'));
+
+ $customer_page = ($cawangan_info['version'] == 'v1') ? 'customers.v1.info' : 'customers.v2.info';
+
+ return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi'));
}
public function search(Request $request){
diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php
index f2981e6..5bc53c5 100644
--- a/app/Http/Controllers/GadaianController.php
+++ b/app/Http/Controllers/GadaianController.php
@@ -92,7 +92,7 @@ class GadaianController extends Controller
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- return view('gadaian.index',compact('customer_info','limit_pinjaman_semasa','cawangan_info','norujukan','api_url','current'));
+ return view('gadaian.' . $cawangan_info['version'] . '.index',compact('customer_info','limit_pinjaman_semasa','cawangan_info','norujukan','api_url','current'));
}
public function edit(Request $request,$norujukan){
@@ -344,7 +344,13 @@ class GadaianController extends Controller
$pembayaran_segera = "https://spare.arrahn.com.my/pembayaransegera";
// return view('print.sag',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera','auth_username','mutu'));
- return view('print.sag_ujrah',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera','auth_username','mutu'));
+
+ if($gadai_detail['tagbaru'] == 1)
+ {
+ return view('print.sag_ujrah',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera','auth_username','mutu'));
+ }else{
+ return view('print.sag',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera','auth_username','mutu'));
+ }
}
public function resit($id)
@@ -393,6 +399,8 @@ class GadaianController extends Controller
// if(sizeof($customers_info) != 0)
// $customers_info = $customers_info[0];
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+
$wakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $transaction['nowakil'])->json();
if(sizeof($wakil) != 0)
@@ -401,7 +409,8 @@ class GadaianController extends Controller
if($gadai['tagbaru'] == 1) {
return view('print.resitansuran_ujrah',compact('transaction','gadai','customers_info','wakil'));
} else {
- return view('print.resittebus',compact('transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
+ return view('print.resitansuran',compact('transaction','gadai','customers_info','wakil'));
+ // return view('print.resittebus',compact('transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
}
}
diff --git a/app/Http/Controllers/PenebusanController.php b/app/Http/Controllers/PenebusanController.php
index 48ce374..bd5fca0 100644
--- a/app/Http/Controllers/PenebusanController.php
+++ b/app/Http/Controllers/PenebusanController.php
@@ -41,7 +41,7 @@ class PenebusanController extends Controller
$nilaihargasemasa = $this->tukaranhargaemas($norujukan);
- return view('penebusan.index',compact('cawangan_info','api_url','gadai','marhun','nama','nilaihargasemasa'));
+ return view('penebusan.' . $cawangan_info['version'] . '.index',compact('cawangan_info','api_url','gadai','marhun','nama','nilaihargasemasa'));
}
public function tebuspenuh(Request $request)
@@ -429,7 +429,7 @@ class PenebusanController extends Controller
'marhun' => $request->marhun,
'jenisbayarantebus' => $request->jenisbayarantebus,
'teller' => $request->teller,
- 'jeniskeuntungan' => 'asal',
+ 'jeniskeuntungan' => $request->jeniskeuntungan,
'totalbayaran' => $request->totalbayaran,
"bayaranpelanggan" => $request->bayaran,
"bakipelanggan" => $request->bakipelanggan,
@@ -502,7 +502,8 @@ class PenebusanController extends Controller
'pembiayaan' => $request->pinjaman,
'nilaimarhun' => $total_nilai_marhun,
'kadarujrah' => $request->kadarkeuntungan,
- 'margin' => ($margin_pinjaman*100)
+ 'margin' => ($margin_pinjaman*100),
+ 'kodcaw' => Auth::user()->cawangan
])->json();
$keuntungan_sebln = $onepercent['keuntungan'];
diff --git a/resources/views/customers/v1/index.blade.php b/resources/views/customers/v1/index.blade.php
new file mode 100644
index 0000000..8189e5b
--- /dev/null
+++ b/resources/views/customers/v1/index.blade.php
@@ -0,0 +1,1285 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
masukkan nombor kad pengenalan
+
+
+ @if($search == true && $blacklist_search == false)
+
+
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+@push('additional_scripts')
+
+
+
+
+@endpush
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/customers/v1/info.blade.php b/resources/views/customers/v1/info.blade.php
new file mode 100644
index 0000000..39c7d22
--- /dev/null
+++ b/resources/views/customers/v1/info.blade.php
@@ -0,0 +1,2484 @@
+@extends('layouts.app')
+
+
+
+@section('content')
+@include('modal.historytebus')
+@include('modal.wakil')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Tarikh Gadai |
+ Tarikh Matang |
+ Baki Harga Jualan |
+ Baki Pembiayaan |
+ Margin |
+ Tempoh |
+ Keuntungan |
+ Lelong |
+
+
+
+
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Tarikh Gadai |
+ Tarikh Matang |
+ Pembiayaan |
+ Margin |
+ Tempoh |
+ Lelong |
+
+
+
+
+
+
+ {{-- Sudah Tebus --}}
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Tarikh Tebus |
+ Baki Pembiayaan |
+ Margin |
+ Tempoh |
+
+
+
+
+
+
+
+ | Bil |
+ No Rujukan |
+ Tarikh Lelong |
+ Tarikh Tuntut |
+ Pembiayaan |
+ Harga Jual |
+ Jum Tuntut/Bayar |
+ Keuntungan |
+ Caj Lelong |
+ Status Tuntutan |
+ Cetak |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{-- --}}
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/customers/index.blade.php b/resources/views/customers/v2/index.blade.php
similarity index 100%
rename from resources/views/customers/index.blade.php
rename to resources/views/customers/v2/index.blade.php
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/v2/info.blade.php
similarity index 99%
rename from resources/views/customers/info.blade.php
rename to resources/views/customers/v2/info.blade.php
index a4ca07a..a8ff3f0 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/v2/info.blade.php
@@ -792,7 +792,10 @@
let jeniskeuntungan = (gadai_detail['tagbaru'] == 1) ? 'onepercent' : 'asal';
$.ajax({
method:'get',
- url:api_url + '/api/upahtawarruq/'+ gadai_detail['kodcaw'] +'/' + gadai_detail['norujukan'] + '/' + jeniskeuntungan,
+ url:api_url + '/api/upahtawarruq/'+ gadai_detail['kodcaw'] +'/' + gadai_detail['norujukan'],
+ data: {
+ 'jeniskeuntungan' : jeniskeuntungan
+ },
success:function(upahsemasa){
if(jenistebus == "belum_tebus"){
var urlroute = '{{ route("penebusan", ":id") }}';
@@ -858,7 +861,6 @@
let table_norujukan = gadai_detail["norujukan"];
let radio_action = "onclick=checkCanChangeGadaianDetail(" + "'" + table_norujukan + "'" + ")";
-
tablegadai.row.add([
'',
'' + gadai_detail['norujukan'] + '',
@@ -868,7 +870,7 @@
'RM '+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
gadai_detail['tempoh'],
- 'RM '+ upahsemasa,
+ 'RM '+ upahsemasa['pendapatan'],
'' + taglel + '
',
]).draw();
}
diff --git a/resources/views/gadaian/v1/edit.blade.php b/resources/views/gadaian/v1/edit.blade.php
new file mode 100644
index 0000000..bb81ab8
--- /dev/null
+++ b/resources/views/gadaian/v1/edit.blade.php
@@ -0,0 +1,1106 @@
+@extends('layouts.app')
+
+
+
+@section('content')
+@include('modal.editmarhun')
+
+
+
+
gadaian
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Recno |
+ Marhun |
+ Nilai Marhun |
+ Karat |
+ Berat |
+ Nota |
+ Harga |
+ Action |
+
+
+
+ Jumlah |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/gadaian/v1/index.blade.php b/resources/views/gadaian/v1/index.blade.php
new file mode 100644
index 0000000..814a7dc
--- /dev/null
+++ b/resources/views/gadaian/v1/index.blade.php
@@ -0,0 +1,1188 @@
+@extends('layouts.app')
+@section('content')
+@include('modal.editmarhun')
+
+
+@php
+ if($customer_info['kpbaru'] != null){
+ $noic = $customer_info['kpbaru'];
+ }else{
+ $noic = $customer_info['kplama'];
+ }
+ $gadai_session = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/check/sag',['kodcaw'=>$cawangan_info['kodcaw'],'norujukan'=>$norujukan,'nokp'=>$noic])->json();
+ $outstanding_semasa = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/customers/'. $noic .'/outstandingsemasa/'.$cawangan_info['kodcaw'])->json();
+@endphp
+
+@if($gadai_session != null)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Bil |
+ Recno |
+ Marhun |
+ Nilai Marhun |
+ Karat |
+ Berat |
+ Nota |
+ Harga |
+ Tindakan |
+
+
+
+ Jumlah |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+@else
+ @php
+ header("Refresh:0");
+ @endphp
+@endif
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/v2/edit.blade.php
similarity index 99%
rename from resources/views/gadaian/edit.blade.php
rename to resources/views/gadaian/v2/edit.blade.php
index 209de72..91305b4 100644
--- a/resources/views/gadaian/edit.blade.php
+++ b/resources/views/gadaian/v2/edit.blade.php
@@ -460,6 +460,7 @@
'pembiayaan' : parseFloat($('#pinjaman').val()),
'kadarujrah' : kadarupah,
'margin' : perpinjam,
+ 'kodcaw' : "{{ $cawangan_info['kodcaw'] }}"
},
success:function(data){
array_keuntungan = data;
@@ -637,6 +638,7 @@
'pembiayaan' : parseFloat($('#pinjaman').val()),
'kadarujrah' : kadarupah,
'margin' : perpinjam,
+ 'kodcaw' : "{{ $cawangan_info['kodcaw'] }}"
},
success:function(data){
array_keuntungan = data;
diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/v2/index.blade.php
similarity index 99%
rename from resources/views/gadaian/index.blade.php
rename to resources/views/gadaian/v2/index.blade.php
index 4901b21..4d3daa6 100644
--- a/resources/views/gadaian/index.blade.php
+++ b/resources/views/gadaian/v2/index.blade.php
@@ -109,14 +109,14 @@
-