diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php index 9a19c9d..cdca363 100644 --- a/app/Http/Controllers/GadaianController.php +++ b/app/Http/Controllers/GadaianController.php @@ -34,7 +34,6 @@ class GadaianController extends Controller $gadai_transaction = Http::get(config('api.url') . '/api/gadai/'. $auth_user['cawangan'] . '/' . $current->toDateString())->json(); if($gadai_transaction){ $new_sirig = $gadai_transaction['sirig'] + 1; - }else{ $new_sirig = 1; } @@ -54,7 +53,7 @@ class GadaianController extends Controller $cawangan_info = Http::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')); + return view('gadaian.index',compact('customer_info','limit_pinjaman_semasa','cawangan_info','norujukan','api_url','current')); } public function edit(Request $request,$norujukan){ diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 299ac46..ece5305 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -469,12 +469,12 @@ class KhazanahController extends Controller $rekodb50 = $denominasilist[0]['bd50']; $rekodb100 = $denominasilist[0]['bd100']; //wang Syilling Initialize - $rekodsen1 = $denominasilist[0]['txtSen1']; $rekodsen5 = $denominasilist[0]['txtSen5']; $rekodsen10 = $denominasilist[0]['txtSen10']; - $rekodsen20 = $denominasilist[0]['txtSen20']; $rekodsen50 = $denominasilist[0]['txtSen50']; + $rekodsen1 = $denominasilist[0]['txtsen1']; $rekodsen5 = $denominasilist[0]['txtsen5']; $rekodsen10 = $denominasilist[0]['txtsen10']; + $rekodsen20 = $denominasilist[0]['txtsen20']; $rekodsen50 = $denominasilist[0]['txtsen50']; //Wang Ringgit Initialize - $rekodring1 = $denominasilist[0]['txtRing1']; $rekodring5 = $denominasilist[0]['txtRing5']; $rekodring10 = $denominasilist[0]['txtRing10']; - $rekodring20 = $denominasilist[0]['txtRing20']; $rekodring50 = $denominasilist[0]['txtRing50']; $rekodring100 = $denominasilist[0]['txtRing100']; + $rekodring1 = $denominasilist[0]['txtring1']; $rekodring5 = $denominasilist[0]['txtring5']; $rekodring10 = $denominasilist[0]['txtring10']; + $rekodring20 = $denominasilist[0]['txtring20']; $rekodring50 = $denominasilist[0]['txtring50']; $rekodring100 = $denominasilist[0]['txtring100']; //Tolok Rekod $rekodb1 += intval($request->ambilanb1); @@ -542,7 +542,7 @@ class KhazanahController extends Controller $auth_user = Auth::user(); $api_url = config('api.url'); $peti_besi_terkini=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json(); - $baki_akhir=$peti_besi_terkini[0]["BakiAkhir"]; + $baki_akhir=$peti_besi_terkini[0]["bakiakhir"]; $amount = $request->amt; @@ -597,8 +597,8 @@ class KhazanahController extends Controller - $bakiAwal=$getTunai2[0]['BakiAwal']; - $keluar=$getTunai2[0]['Keluar']; + $bakiAwal=$getTunai2[0]['bakiawal']; + $keluar=$getTunai2[0]['keluar']; @@ -683,16 +683,16 @@ class KhazanahController extends Controller $auth_user = Auth::user(); $api_url = config('api.url'); $peti_besi_terkini=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json(); - $baki_akhir=$peti_besi_terkini[0]["BakiAkhir"]; + $baki_akhir=$peti_besi_terkini[0]["bakiakhir"]; $teller=$request->teller; $getTunai=Http::get(config('api.url').'/api/GetCurrentTunai/'.$auth_user['cawangan'].'/'.$teller)->json(); - $bakiAkhir=$getTunai[0]['Baki']; - $keluarT=$getTunai[0]['Keluar']; - $masukT=$getTunai[0]['Masuk']; - $tambahT=$getTunai[0]['Tambah']; - $kurangT=$getTunai[0]['Kurang']; - $bakiAwalT=$getTunai[0]['BakiAwal']; + $bakiAkhir=$getTunai[0]['baki']; + $keluarT=$getTunai[0]['keluar']; + $masukT=$getTunai[0]['masuk']; + $tambahT=$getTunai[0]['tambah']; + $kurangT=$getTunai[0]['kurang']; + $bakiAwalT=$getTunai[0]['bakiawal']; $tambah=$request->tambah; @@ -748,8 +748,8 @@ class KhazanahController extends Controller $latestVault=Http::get(config('api.url').'/api/currentVault/'.$auth_user['cawangan'])->json(); - $masukV=$latestVault[0]['Masuk']; - $keluarV=$latestVault[0]['Keluar']; + $masukV=$latestVault[0]['masuk']; + $keluarV=$latestVault[0]['keluar']; $pendahuluanV=$latestVault[0]['pendahuluan']; $serahanV=$latestVault[0]['serahan']; diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php new file mode 100644 index 0000000..8a8dd52 --- /dev/null +++ b/app/Http/Controllers/LelongController.php @@ -0,0 +1,17 @@ +json(); + return view('khazanah.lelong',compact('cawangan_info','api_url')); + } +} diff --git a/resources/views/aliran_tunai/index.blade.php b/resources/views/aliran_tunai/index.blade.php index 0e8a225..b3eca6c 100644 --- a/resources/views/aliran_tunai/index.blade.php +++ b/resources/views/aliran_tunai/index.blade.php @@ -10,7 +10,7 @@
-

RM {{ number_format($alirantunai['BakiAwal'],2) }}

+

RM {{ number_format($alirantunai['bakiawal'],2) }}

Baki Awal Tunai

@@ -22,7 +22,7 @@
-

RM {{ number_format($alirantunai['Masuk'],2) }}

+

RM {{ number_format($alirantunai['masuk'],2) }}

Tunai Diterima

@@ -34,7 +34,7 @@
-

RM {{ number_format($alirantunai['Keluar'],2) }}

+

RM {{ number_format($alirantunai['keluar'],2) }}

Tunai Dikeluar

@@ -48,7 +48,7 @@
-

RM {{ number_format($alirantunai['Baki'],2) }}

+

RM {{ number_format($alirantunai['baki'],2) }}

Baki Akhir Tunai

@@ -59,7 +59,7 @@
-

RM {{ number_format($alirantunai['Tambah'],2) }}

+

RM {{ number_format($alirantunai['tambah'],2) }}

23

Gadaian

@@ -71,7 +71,7 @@
-

RM {{ number_format($alirantunai['Kurang'],2) }}

+

RM {{ number_format($alirantunai['kurang'],2) }}

18

Penebusan

diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 55afada..c3b9423 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -13,7 +13,6 @@
@csrf -
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index aee5974..18b62dc 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -288,8 +288,6 @@ Tarikh Matang Margin Kos Keuntungan - Hapus Gadai - @@ -309,8 +307,6 @@ Tarikh Matang Margin Kos Keuntungan - Hapus Gadai - @@ -328,8 +324,6 @@ Tarikh Matang Margin Kos Keuntungan - Hapus Gadai - @@ -602,7 +596,7 @@ $.ajax({ method:'put', - url:'http://localhost:8000/api/gadai/hapus/' + kodcaw + '/' + hapusid, + url:api_url + '/api/gadai/hapus/' + kodcaw + '/' + hapusid, success:function(data) { console.log(data); @@ -656,7 +650,7 @@ if (result.isConfirmed) { $.ajax({ method:'put', - url:'http://localhost:8000/api/tebus/hapus/' + kodcaw + '/' + hapusid, + url:api_url+'/api/tebus/hapus/' + kodcaw + '/' + hapusid, success:function(data) { if(data != "Bukan-Tebus") diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 082a8e1..0060224 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -1,6 +1,11 @@ @extends('layouts.app') @section('content') +@php + $gadai_session = Http::get($api_url . '/api/check/sag',['kodcaw'=>$cawangan_info['kodcaw'],'norujukan'=>$norujukan,'nokp'=>$customer_info['kpbaru']])->json(); +@endphp + +@if($gadai_session != null)
@@ -14,7 +19,7 @@ No Rujukan
- +
@@ -224,6 +229,28 @@
+@else + @php + $gadai_transaction = Http::get($api_url . '/api/gadai/'. $cawangan_info['kodcaw'] . '/' . $current->toDateString())->json(); + if($gadai_transaction){ + $new_sirig = $gadai_transaction['sirig'] + 1; + }else{ + $new_sirig = 1; + } + $curent_year = substr($current->year,2,2); + $curent_month = sprintf("%02d", $current->month); + $current_day = sprintf("%02d", $current->day); + $new_transaction = sprintf("%04d",$new_sirig); + $norujukan_baru = strtoupper($cawangan_info['kodcaw']) . $curent_year . $curent_month . $current_day . '-' .$new_transaction; + $gadai_baru = Http::post($api_url .'/api/gadai/'.$cawangan_info['kodcaw'],[ + 'norujukan' => $norujukan_baru, + 'nopelanggan' => $customer_info['nopelanggan'], + 'nokp' => $customer_info['kpbaru'], + 'sirig' => $new_sirig + ]); + header("Refresh:0"); + @endphp +@endif +@endsection \ No newline at end of file diff --git a/resources/views/khazanah/pendahuluan.blade.php b/resources/views/khazanah/pendahuluan.blade.php index 46c3ef8..453be37 100644 --- a/resources/views/khazanah/pendahuluan.blade.php +++ b/resources/views/khazanah/pendahuluan.blade.php @@ -138,7 +138,7 @@ function gettable(datala) tablependahuluan.row.add([ counter, - arr['KodLaluan'], + arr['kodlaluan'], arr['kodcaw'], 'RM ' + arr['modal'], 'RM ' + arr['serahan'], diff --git a/resources/views/khazanah/pendahuluanserah.blade.php b/resources/views/khazanah/pendahuluanserah.blade.php index 00e2a0d..90fa7b4 100644 --- a/resources/views/khazanah/pendahuluanserah.blade.php +++ b/resources/views/khazanah/pendahuluanserah.blade.php @@ -136,51 +136,51 @@ RM0.01 - + RM1 - + RM0.05 - + RM5 - + RM0.10 - + RM10 - + RM0.20 - + RM20 - + RM0.50 - + RM50 - + @@ -190,7 +190,7 @@ RM100 - + @@ -213,11 +213,11 @@ - + - + diff --git a/resources/views/khazanah/serahan.blade.php b/resources/views/khazanah/serahan.blade.php index 9935a8c..7211365 100644 --- a/resources/views/khazanah/serahan.blade.php +++ b/resources/views/khazanah/serahan.blade.php @@ -138,7 +138,7 @@ function gettable(datala) tableserahan.row.add([ counter, - arr['KodLaluan'], + arr['kodlaluan'], arr['kodcaw'], 'RM ' + arr['modal'], 'RM ' + arr['serahan'], diff --git a/resources/views/operasi/kelulusan.blade.php b/resources/views/operasi/kelulusan.blade.php index 260bcd2..3e68f28 100644 --- a/resources/views/operasi/kelulusan.blade.php +++ b/resources/views/operasi/kelulusan.blade.php @@ -34,11 +34,11 @@ @foreach($kelulusan as $index=>$k) - - + + - - + + @endforeach diff --git a/resources/views/print/laporan_batalsuratgadai.blade.php b/resources/views/print/laporan_batalsuratgadai.blade.php index 3e36959..9f8be02 100644 --- a/resources/views/print/laporan_batalsuratgadai.blade.php +++ b/resources/views/print/laporan_batalsuratgadai.blade.php @@ -210,8 +210,8 @@ @foreach($batalgadai as $index=>$item) - - + + diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php index 75fb2bc..7a6107e 100644 --- a/resources/views/print/laporan_penebusan.blade.php +++ b/resources/views/print/laporan_penebusan.blade.php @@ -245,7 +245,7 @@ - + diff --git a/resources/views/print/sag.blade.php b/resources/views/print/sag.blade.php index 44d7cd1..65f714a 100644 --- a/resources/views/print/sag.blade.php +++ b/resources/views/print/sag.blade.php @@ -402,8 +402,9 @@
Total Keseluruhan (RM)
Baki Akhir Sistem (RM)
Lebihan/Kekurangan (RM)
{{ $k['NORUJUKAN'] }}{{ $k['TARIKH'] }}{{ $k['norujukan'] }}{{ $k['tarikh'] }} {{ $cawangan_info['details_caw'] }}{{ $k['KOMEN'] }}{{ $k['komen'] }}
{{ $counter }}{{$item['noRujukan']}}{{$item['namaTeller']}}{{$item['norujukan']}}{{$item['namateller']}} {{$item['tarikh']}} {{$item['masa']}} {{$item['jbg']}} {{$item['pinjaman']}}{{$item['UpahAsal']}}{{$item['upahasal']}} {{$item['upahpercuma']}} {{$item['upahdibayar']}} {{$item['nilaimarhun']}} @php - $daerah = Http::get($api_url . '/api/daerah/'.$customer_detail['koddaerah'])->json(); - $negeri = Http::get($api_url . '/api/negeri/'.$customer_detail['kodnegeri'])->json(); + $poskod = Http::get($api_url . '/api/poskod/'.$customer_detail['poskod'])->json(); + $daerah = Http::get($api_url . '/api/daerah/'.$poskod['koddaerah'])->json(); + $negeri = Http::get($api_url . '/api/negeri/'.$poskod['kodnegeri'])->json(); echo ($customer_detail['poskod']. ', ' .$daerah['namadaerah'].', '.$negeri['negeri']); @endphp @@ -807,8 +808,9 @@ @php - $daerah = Http::get($api_url . '/api/daerah/'.$customer_detail['koddaerah'])->json(); - $negeri = Http::get($api_url . '/api/negeri/'.$customer_detail['kodnegeri'])->json(); + $poskod = Http::get($api_url . '/api/poskod/'.$customer_detail['poskod'])->json(); + $daerah = Http::get($api_url . '/api/daerah/'.$poskod['koddaerah'])->json(); + $negeri = Http::get($api_url . '/api/negeri/'.$poskod['kodnegeri'])->json(); echo ($customer_detail['poskod']. ', ' .$daerah['namadaerah'].', '.$negeri['negeri']); @endphp diff --git a/routes/web.php b/routes/web.php index 6d13ab8..d0ab510 100644 --- a/routes/web.php +++ b/routes/web.php @@ -104,6 +104,7 @@ Route::get('/khazanah/pelanggan',['as'=>'khazanah.pelanggan','uses'=>'KhazanahCo Route::get('/khazanah/customer_info',['as'=>'khazanah.customer_info','uses'=>'KhazanahController@info'])->middleware('auth','khazanah'); Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian']); +Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']); //Added Yang Baru Route::post('/barcodescannedtebus',['as'=>'barcodetebus.scanned','uses'=>'KhazanahController@barcodescannedtebus'])->middleware('auth','khazanah');