<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
// $router->get('/', function () use ($router) {
//     return $router->app->version();
// });
// $router->get('/key', function() {
//     return \Illuminate\Support\Str::random(32);
// });

use App\Http\Controllers\TransactionOnlineTrailController;
use App\Http\Controllers\Reports\RingkasanHarianController;
use App\Transaction;

$router->get('/health', function () {
    return response()->json(['status' => 'ok']);
});

$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($router) {
    $router->get('logs', 'LogViewerController@index');
});

// $router->get('_/phpinfo', function () {
//         ob_start();
//         phpinfo();
//         $response = ob_get_contents();
//         ob_get_clean();
//         return $response;
//     });

$router->group(['prefix'=>'api'], function () use ($router){

    $router->group([
        'prefix' => 'payable-ujrah-branches',
    ], function($router){
        $router->get('/', 'PayableUjrahBranchController@index');
        $router->post('/', 'PayableUjrahBranchController@create');
        $router->post('/sync-status', 'PayableUjrahBranchController@syncStatus');
    });

    //Customer API
    $router->get('customers',['uses'=>'CustomerController@showAllCustomers']);
    $router->get('customers/cawangan/{kodcaw}',['uses'=>'CustomerController@showAllCustomersByCawangan']);
    $router->get('customers/{ic}',['uses'=>'CustomerController@showOneCustomerByIC']);
    $router->get('customers/{ic}/gadai/{status}',['uses'=>'CustomerController@showOneCustomerGadai']);
    $router->get('customers/{ic}/gadai/{status}/{kodcaw}',['uses'=>'CustomerController@showOneCustomerGadaiByCawangan']);
    $router->post('customers/create/{kodcaw}',['uses'=>'CustomerController@createCustomer']);
    $router->delete('customers/{kodcaw}/{nokp}', ['uses' => 'CustomerController@delete']);
    $router->put('customers/update/{nokp}', ['uses' => 'CustomerController@customerUpdate']);
    $router->put('customers/update/kaunter/{nokp}/{kodcaw}', ['uses' => 'CustomerController@customerUpdateKaunter']);
    $router->put('customers/update/khazanah/{nokp}', ['uses' => 'CustomerController@customerUpdateKhazanah']);
    $router->get('customers/laporan/{kodcaw}/{tarikh}',['uses'=>'CustomerController@getLaporanCustomers']);
    $router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
    $router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']); //blh refer sini izazi
    $router->get('admin/customers/nokp/search',['uses'=>'CustomerController@showOneCustomerByICAdmin']);
    $router->get('customer/blacklist',['uses'=>'CustomerController@blacklistCustomer']);
    $router->get('customer/anggota',['uses'=>'CustomerController@anggotaKoperasi']);
    $router->get('customer/eachcawangan/{ic}',['uses'=>'CustomerController@showCustomerByEachCawangan']);
    $router->put('customers/{noic}/assign-anggota', ['uses' => 'CustomerController@assignAnggota']);
    $router->post('/customers/update-tag-pdpa', ['uses' => 'CustomerController@updateTagPdpa']);

    //arcc
    $router->get('customer/searchbyname',['uses'=>'CustomerController@searchByName']);
    $router->get('customer/searchbygadai/{kodcaw}/{norujukan}',['uses'=>'CustomerController@AdminsearchGadai']);
    // Route::get('/api/customers/searchbyname', [CustomerController::class, 'searchByName']);
    // $router->put('customers/update/{nokp}', ['uses' => 'CallCenterController@customerUpdate']); //kena tengok api ni
    // $router->put('customers/update/kaunter/{nokp}/{kodcaw}', ['uses' => 'CallCenterController@customerUpdateKaunter']);
    $router->put('callcenter/customers/update/{nokp}', ['uses' => 'CallCenterController@customerUpdate']); //kena tengok api ni
    $router->put('callcenter/customers/update/kaunter/{nokp}/{kodcaw}', ['uses' => 'CallCenterController@customerUpdateKaunter']);
    

    //Change Password
    $router->post('changepassword/{kodcaw}/{id}',['uses'=>'CustomerController@changepassword']);

    //tukar cawangan
    $router->post('/tukarcawangan/{kodcaw}', ['uses'=>'CustomerController@TukarCawangan']);

    //pengesahan kakitangan
    $router->post('/kakitangan/{kodcaw}', ['uses' => 'CustomerController@kakitangan']);

    //tukar taraf
    $router->get('tukartaraf/{kodcaw}/{role}',['uses'=>'CustomerController@TukarTaraf']);

    //Gadai API
    $router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
    $router->get('gadai/{noic}',['uses'=>'GadaiController@showOneGadai']);
    $router->get('gadai/cawangan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@showOneGadaiByCawanganOnly']);
    $router->get('gadai/norujukan/{norujukan}',['uses'=>'GadaiController@showOneGadaiByNorujukan']);
    $router->get('gadai/norujukankodcaw/{kodcaw}/{norujukan}',['uses'=>'GadaiController@showOneGadaiByNorujukanKodcaw']);
    $router->get('gadai/norujukan/{kodcaw}/{norujukan}',['uses'=>'GadaiController@showOneGadaibyRujukanAndCawangan']); // refer sini utk pass gadai  
    $router->post('gadai/{kodcaw}',['uses'=>'GadaiController@create']);
    $router->post('gadaiold/{kodcaw}',['uses'=>'GadaiController@createold']);
    $router->get('gadai/{cawangan_code}/{date}',['uses'=>'GadaiController@gadaiTransactionByCawanganAndDay']);
    $router->put('gadai/norujukan/{norujukan}',['uses'=>'GadaiController@updateOneGadaiByNorujukan']);
    $router->put('gadai/{kodcaw}/norujukan/{norujukan}',['uses'=>'GadaiController@updateGadaiMarhunOnline']);
    $router->put('gadaikaunter/{kodcaw}/norujukan/{norujukan}',['uses'=>'GadaiController@updateGadaiMarhunKaunter']);
    $router->put('gadai/norujukan/{kodcaw}/{norujukan}',['uses'=>'GadaiController@daftarGadaiMarhun']);
    $router->put('gadai/norujukan/komuditi/{kodcaw}/{norujukan}',['uses'=>'GadaiController@pembelianKomuditi']);
    $router->put('gadai/norujukan/cetak/{kodcaw}/{norujukan}',['uses'=>'GadaiController@cetakSAG']);
    $router->put('gadai/norujukan/serah/{kodcaw}/{norujukan}',['uses'=>'GadaiController@serahMarhun']);
    $router->get('batalgadai/laporan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@getLaporanBatalGadai']);
    $router->get('gadai/laporan/ringkasan/{kodcaw}',['uses'=>'GadaiController@gadaiRingkasanTerkumpul']);
    $router->get('gadai/laporan/ringkasanharian/{kodcaw}',['uses'=>'GadaiController@gadaiRingkasanHarian']);
    $router->get('gadaitebus/listharini/{kodcaw}',['uses'=>'GadaiController@GadaiTebusList']);
    $router->get('gadaitebus/listharini/{kodcaw}/teller',['uses'=>'GadaiController@GadaiTebusListTeller']);
    $router->get('gadai/list/rekod/old',['uses'=>'GadaiController@rekodGadaian']);
    $router->get('gadai/online/search/detail',['uses'=>'GadaiController@searchGadaiOnline']);

    $router->get('check/serah/gadai',['uses'=>'GadaiController@checkSerahGadaian']);
    $router->get('check/serah/tebus',['uses'=>'TebusController@checkSerahTebus']);
    $router->get('check/serah/lelong',['uses'=>'LelongController@checkSerahLelong']);
    $router->get('check/taglelong',['uses'=>'LelongController@checkTagLelong']);

    $router->get('gadai/serah_marhun/khazanah/{kodcaw}',['uses'=>'GadaiController@serahMarhunKhazanah']);
    $router->get('gadai/serah_marhun/khazanah/petibesi/{kodcaw}',['uses'=>'GadaiController@serahPetiBesi']);

    $router->put('gadai/serah_marhun/khazanah/{kodcaw}/{norujukan}',['uses'=>'GadaiController@barcodeScan']);

    $router->delete('gadai/batal/{kodcaw}/{norujukan}',['uses'=>'GadaiController@batalGadai']);

    $router->get('gadaiansemasa/{kodcaw}',['uses'=>'GadaiController@getGadaianSemasa']);
    $router->get('gadaiansemasa/belum_serah/{kodcaw}',['uses'=>'GadaiController@getGadaianBelumSerah']);
    $router->get('gadai/laporan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@getLaporanGadai']);
    $router->get('gadailaporanRange/{kodcaw}',['uses'=>'GadaiController@getLaporanGadaiRange']);
    $router->get('gadailaporanRangeDate/{kodcaw}',['uses'=>'GadaiController@getLaporanGadaiRangeDate']);


    $router->get('gadai/customers/{ic}/outstandingsemasa/{kodcaw}',['uses'=>'GadaiController@outstandingSemasaCustomer']);
    $router->put('gadai/updatehistory/{kodcaw}/{norujukan}',['uses'=>'GadaiController@updateHistoryGadai']);

    $router->get('senarai/lelong/{kodcaw}',['uses'=>'GadaiController@senaraiLelong']);

    $router->get('check/sag',['uses'=>'GadaiController@checkNorujukan']);

    $router->get('updatejbgsemasa',['uses'=>'GadaiController@updateJBGsemasa']);
    $router->get('updatejbglelong',['uses'=>'LelongController@updateJBGLelong']);
    $router->get('search/lelong',['uses'=>'LelongController@searchBlockLelong']);
    $router->get('hapus/gadai/null',['uses'=>'GadaiController@hapusGadaiNull']);

    ///Log session
    $router->post('logsession/{kodcaw}',['uses'=>'LogController@logSession']);
    $router->get('checknokp/{kodcaw}/{nokp}/{tarikh}',['uses'=>'LogController@checkNokpSession']);
    $router->post('logoutsession/{kodcaw}',['uses'=>'LogController@logoutSession']);

    //Tebus API
    $router->get('tebustawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusTawarruq']);
    $router->get('upahtawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@upahTawarruq']);
    $router->get('upahrebettawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@upahRebetTawarruq']);
    $router->get('tebusseparuhtawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusSeparuhTawarruq']);
    $router->get('tebusseparuhbukantawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusSeparuhNotTawarruq']);
    $router->get('tebusbukantawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusNotTawarruq']);
    $router->get('upahbukantawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@upahNotTawarruq']);
    $router->get('tebus/laporan/{kodcaw}/{tarikh}',['uses'=>'TebusController@getLaporanTebus']);
    $router->get('tebus/laporanjenistawarruq/{kodcaw}',['uses'=>'TebusController@getLaporanTebusPengasingan']);
    $router->get('upahtawarruqbytarikh',['uses'=>'TebusController@upahTawarruqByTarikh']);
    $router->get('upahtawarruqujrah/{kodcaw}/{norujukan}/{jeniskeuntungan}',['uses'=>'TebusController@kiraupahTawarruq']);

    //Tebus Ujrah (Laporan Range Date)
    $router->get('tebusujrah/laporan/{kodcaw}',['uses'=>'TebusController@getLaporanTebusUjrah']);
    $router->get('tebus/laporanjenistawarruqujrah/{kodcaw}',['uses'=>'TebusController@getLaporanTebusPengasinganUjrah']);

    //Ansuran Ujrah (Laporan Range Date)
    $router->get('ansuranujrah/laporan/{kodcaw}',['uses'=>'GadaiController@getLaporanAnsuranUjrah']);




    $router->get('moratorium/details',['uses'=>'TebusController@getMoratorium']);

    //Maintenance API TEBUS
    // $router->get('rebet/{kodcaw}/{norujukan}',['uses' => 'TebusController@rebet']);
    $router->put('updatetebus/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusUpdate']);
    $router->get('tebus/norujukan/{kodcaw}/{norujukan}',['uses'=>'TebusController@showOneTebusbyRujukanAndCawangan']);
    $router->put('updateautotawarruq/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusUpdateAutoTawarruq']);
    $router->get('listpenebusanhistory/{kodcaw}',['uses'=>'TebusController@listhistorypenebusan']);
    $router->put('updatetambahpinjaman/{kodcaw}/{norujukan}',['uses'=>'TebusController@tebusUpdateTambahPinjaman']);
    //API FARIS
    $router->put('tebus/serah_marhun_teller/{kodcaw}/{norujukan}',['uses'=>'GadaiController@barcodescanTebus']);
    // $router->get('tebus_serahan/{kodcaw}',['uses'=>'TebusController@SerahMarhunTeller']);

    //Lelong API
    $router->get('lelong',['uses'=>'LelongController@showAllLelongs']);
    $router->get('lelong/cawangan/{kodcaw}',['uses'=>'LelongController@showAllLelongByCawangan']);
    $router->get('lelong/cawangan/{kodcaw}/{norujukan}',['uses'=>'LelongController@showLelongByNoRujukan']);
    $router->post('lelong',['uses'=>'LelongController@create']);
    $router->delete('lelong/{id}', ['uses' => 'LelongController@delete']);
    $router->put('lelong/{id}', ['uses' => 'LelongController@update']);
    $router->get('bakilelong/{noic}/{jenislelong}',['uses'=>'LelongController@showBakiLelong']);
    $router->get('bakilelong/cawangan/{kodcaw}/{noic}/{jenislelong}',['uses'=>'LelongController@showBakiLelongEachCawangan']);
    $router->get('bilangandilelong/{noic}',['uses'=>'LelongController@BilAkanDilelong']);
    $router->get('lelong/laporan/{kodcaw}/{tarikh}',['uses'=>'LelongController@getLaporanLelong']);
    $router->get('lelong/harini/{kodcaw}',['uses'=>'LelongController@LelonganHarini']);

    $router->get('keluar/lelong',['uses'=>'LelongController@keluarLelong']);

    $router->get('lelong/bakilelongbyteller/{kodcaw}',['uses' => 'LelongController@getBakiLelongByTeller']);



    //Marhun API
    $router->get('marhun',['uses'=>'MarhunController@showAllMarhuns']);
    $router->get('marhun/{norujukan}',['uses'=>'MarhunController@showOneMarhun']);
    $router->post('marhun/{kodcaw}',['uses'=>'MarhunController@create']);
    $router->put('marhun/{id}', ['uses' => 'MarhunController@update']);
    $router->get('marhun/laporan/{kodcaw}/{tarikh}',['uses'=>'MarhunController@getLaporanMarhunHarian']);
    $router->get('marhunterkumpul/laporan/{kodcaw}/{tarikh}',['uses'=>'MarhunController@getLaporanMarhunTerkumpul']);
    $router->get('marhun/mutu/sag',['uses'=>'MarhunController@getMutuMarhun']);
    $router->get('marhun/nilai/terkini',['uses'=>'MarhunController@getNilaiMarhunLatest']);
    //new added 230624
    $router->get('marhun/gadai/{kodcaw}/{norujukan}',['uses'=>'MarhunController@getMarhunCaw']);


    $router->get('jemas',['uses'=>'MarhunController@getAllJemas']);
    $router->get('jemas/nama_marhun',['uses'=>'MarhunController@getMarhunName']);


    //Harga Emas API
    $router->get('harga_emas',['uses'=>'HargaEmasController@showAllHargaEmas']);
    $router->get('harga_emas/{karat}',['uses'=>'HargaEmasController@getOneHargaEmas']);
    $router->put('harga_emas',['uses'=>'HargaEmasController@update']);
    $router->put('harga_emas/update',['uses'=>'HargaEmasController@updatehargaemas']);
    $router->post('harga_emas/create',['uses'=>'HargaEmasController@createhargaemas']);
    $router->put('harga_emas/delete/{id}', ['uses' => 'HargaEmasController@deletehargaemas']);
    $router->get('harga_emas/rekod/sandaran',['uses'=>'HargaEmasController@rekodEmasSandaran']);
    $router->get('harga_emas/laporan/sandaran',['uses'=>'HargaEmasController@laporanhargaemas']);



    //Cawangan API
    $router->get('cawangan',['uses'=>'CawanganController@showAllCawangans']);
    $router->get('cawangan/{code_cawangan}',['uses'=>'CawanganController@showOneCawangan']);
    $router->get('cawangan/detail/{kodcaw}',['uses'=>'CawanganDetailController@getCawanganDetail']);

    //Poskod API
    $router->post('poskod',['uses'=>'PoskodController@store']);
    $router->put('poskod/{poskod}/update',['uses'=>'PoskodController@update']);
    $router->get('poskod',['uses'=>'PoskodController@showAllPoskod']);
    $router->get('poskod/{poskod}',['uses'=>'PoskodController@showOnePoskod']);

    //Negeri API
    $router->get('negeri/{kodnegeri}',['uses'=>'NegeriController@showOneNegeri']);
    $router->get('negeri/',['uses'=>'NegeriController@NegeriListAll']);

    //Daerah API
    $router->get('daerah',['uses'=>'DaerahController@index']);
    $router->get('daerah/{koddaerah}',['uses'=>'DaerahController@showOneDaerah']);
    $router->get('daerahkodnegeri/{kodnegeri}',['uses'=>'DaerahController@showOneNegeri']);

    //Bank API
    $router->get('bank',['uses'=>'BankController@showAllBank']);

    //Transaction API
    $router->post('transaction/duit_masuk',['uses'=>'TransactionController@duitMasuk']);
    $router->post('transaction/duit_keluar',['uses'=>'TransactionController@duitKeluar']);
    $router->get('transaction',['uses'=>'TransactionController@showAllTransaction']);
    $router->get('transaction/{norujukan}',['uses'=>'TransactionController@getTransactionByRujukan']);
    $router->get('transaction/one/{norujukan}',['uses'=>'TransactionController@getTransactionByRujukanOne']);
    $router->get('transaction/id/{id}',['uses'=>'TransactionController@getTransactionByid']);
    $router->get('transaction/norujukan/{norujukan}',['uses'=>'TransactionController@getTransactionByRujukanAll']);
    $router->get('transaction/norujukan/total/ansuran',['uses'=>'TransactionController@getTotalBayaranAnsuran']);


    $router->get('maxpinjaman',['uses'=>'MaxPinjamanController@getAllMaxPinjaman']);
    $router->get('maxmutuemas',['uses'=>'MaxPinjamanController@getAllMaxMutuEmas']);
    $router->get('maxmutuemas/specific',['uses'=>'MaxPinjamanController@getSpecificMaxMutuEmas']);
    $router->post('maxmutuemas/update',['uses'=>'MaxPinjamanController@updateMaxMutuEmas']);

    $router->get('transaksi_keuntungan/{norujukan}',['uses'=>'TransaksiKeuntunganController@getTransaksiKeuntunganByRujukan']);
    $router->get('transaksi_keuntungan_latest/{norujukan}',['uses'=>'TransaksiKeuntunganController@getTransaksiKeuntunganByRujukanLatest']);
    $router->post('transaksi_keuntungan',['uses'=>'TransaksiKeuntunganController@createTransaksiKeuntungan']);


    $router->get('latest_transaksi_untung/{norujukan}',['uses'=>'TransaksiKeuntunganController@getLatestTransaksi_Untung']);
    $router->get('jumlah_bayaran_pendahuluan/{norujukan}',['uses'=>'TransaksiKeuntunganController@GetjumlahBayaranPendahuluan']);


    //OTP API
    $router->post('otp/generateotp/{nokp}',['uses'=>'OtpController@createOtp']);
    $router->get('otp/{nokp}',['uses'=>'OtpController@getOtp']);
    $router->get('otp/used/{nokp}',['uses'=>'OtpController@getOtpUsed']);
    $router->get('otp/check/{otp_token}',['uses'=>'OtpController@checkToken']);
    $router->put('otp/update_otp',['uses'=>'OtpController@usedOTP']);

    //Online Transaction
    $router->get('online/transaction',['uses'=>'TransactionOnlineController@getLatestNosiri']);
    $router->post('online/transaction',['uses'=>'TransactionOnlineController@create']);
    $router->put('online/transaction',['uses'=>'TransactionOnlineController@updateStatus']);
    $router->get('transaction/online/express',['uses'=>'TransactionOnlineController@getTransactionOnline']);
    $router->get('transaction/online/update',['uses'=>'TransactionOnlineController@updateTransactionOnline']);
    $router->get('transaction/online/login',['uses'=>'TransactionOnlineController@getTransactionOnlineLogin']);
    $router->get('transaction/online/unsuccessful',['uses'=>'TransactionOnlineController@getListUnsuccessful']);
    $router->put('transaction/online/unsuccesfull/update',['uses'=>'TransactionOnlineController@updateUnsuccessfulTransaction']);
    $router->put('transaction/online/tagportal',['uses'=>'TransactionOnlineController@updateTagPortal']);
    $router->get('transaction/online/query',['uses'=>'TransactionOnlineController@getListTransactionOnlineQuery']);
    $router->get('transaction/online/trail',['uses'=>'TransactionOnlineTrailController@index']);
    $router->get('transaction/online/log',['uses'=>'TransactionOnlineLogController@index']);
    $router->get('transaction/online/log/{bill_id}',['uses'=>'TransactionOnlineLogController@show']);
    $router->post('transaction/online/log',['uses'=>'TransactionOnlineLogController@create']);

    //ANSURAN UPAH API
    $router->get('ansuran/laporan/{kodcaw}',['uses'=>'GadaiController@getLaporanAnsuran']);
    $router->get('ansuransummary/{kodcaw}',['uses'=>'GadaiController@getAnsuranSummary']);
    $router->get('ansuransummaryrange/{kodcaw}',['uses'=>'GadaiController@getAnsuranSummaryRange']);
    $router->get('ansuran/{kodcaw}/{norujukan}',['uses'=>'TebusController@getAdvansur']);
    $router->get('AnsuranByTarikh/{kodcaw}',['uses'=>'TebusController@SenaraiAdvansur']);
    $router->get('AnsuranByRangeTarikh/{kodcaw}',['uses'=>'TebusController@SenaraiAdvansurRangeDate']);
    $router->get('ansuranupah/{kodcaw}',['uses'=>'TebusController@getAdvansurByKodlaluan']);
    $router->get('advansurharini/{kodcaw}',['uses'=>'TebusController@advansurharini']);
    $router->get('advansurdetails/{kodcaw}',['uses'=>'TebusController@advansurdetails']);
    $router->get('advansurdetailsrange/{kodcaw}',['uses'=>'TebusController@advansurdetailsRange']);
    $router->post('ansuran/create/{kodcaw}',['uses'=>'TebusController@createAdvansur']);
    $router->get('advansur/{kodcaw}/{norujukan}',['uses'=>'TebusController@getAdvansurUpah']);
    $router->get('upahlamatoday/{kodcaw}/{norujukan}',['uses'=>'TebusController@getUpahLamaToday']);
    $router->post('removeupahlamatoday/{kodcaw}/{norujukan}',['uses'=>'TebusController@removeUpahLamaToday']);

    //POLIS API
    $router->get('polis/get/',['uses'=>'PolisController@getPolis']);
    $router->put('polis/put/',['uses'=>'PolisController@PolischangeTebus']);
    $router->post('polis/create/',['uses'=>'PolisController@createPolis']);
    $router->put('polis/edit/',['uses'=>'PolisController@editPolis']);
    $router->put('polis/agh/',['uses'=>'PolisController@ulangcetakPolis']);


    //LAPORAN API
    $router->get('kawalanstok/laporan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@getLaporanKawalanStok']);
    $router->get('stokaudit/aktif/{kodcaw}',['uses'=>'GadaiController@LaporanAuditAktif']);

    $router->get('stokaudit/takaktif/{kodcaw}',['uses'=>'GadaiController@LaporanAuditTakAktif']);
    $router->get('stokaudit/takaktifcombine/{kodcaw}',['uses'=>'GadaiController@LaporanAuditTakAktifCombine']);

    $router->get('lelongan/laporan/{kodcaw}/{tarikh}',['uses'=>'LelongController@getLaporanLelongan']);
    $router->get('gadai/aging/test/{kodcaw}/{tarikh}/{num}',['uses'=>'GadaiController@carian_AgingBulanan']);
    $router->get('gadai/aging/lebih12bulan/{kodcaw}/{tarikh}', ['uses'=>'GadaiController@carian_agingLebih12_Bulan']);
    $router->get('gadai/JumlahagingBulanan/test/{kodcaw}/{tarikh}',['uses'=>'GadaiController@carian_Seluruh_AgingBulanan']);

    //LELONG API
    $router->get('senaraibatch/aktif/{kodcaw}/{fasa}',['uses'=>'LelongController@getSenaraiLelongAktif']);
    $router->get('senaraibatch/laporan/{kodcaw}/{fasa}',['uses'=>'LelongController@getSenaraiBatchNoAktif']);
    $router->get('details/notislelong/{kodcaw}',['uses'=>'LelongController@DetailsNotisLelong']);
    $router->get('senaraituntutbaki/aktif_batch/{kodcaw}/',['uses'=>'LelongController@getSenaraiBatchNoTuntutBaki']);
    $router->get('senaraituntutbaki/laporan/{kodcaw}',['uses'=>'LelongController@getSenaraiTuntutBaki']);


    //API BARU
    $router->get('Dashboard_all/{kodcaw}',['uses'=>'GadaiController@dashboardall']);
    $router->get('VaultController/{kodcaw}',['uses'=>'VaultController@list']);
    $router->get('VaultController/all/{kodcaw}',['uses'=>'VaultController@listall']);
    $router->get('countGT/{kodcaw}',['uses'=>'TunaiController@countgadaidantebus']);
    $router->post('daftarVault/{kodcaw}',['uses'=>'VaultController@create']);
    $router->put('UpdateVault/{kodcaw}', ['uses'=>'VaultController@updateVault']);
    $router->put('UpdateVault/Panjar/{kodcaw}', ['uses'=>'VaultController@updateVaultPanjar']);
    $router->put('UpdateVault/DeletePanjar/{kodcaw}', ['uses'=>'VaultController@updateVaultDeletePanjar']);
    $router->put('UpdateVaultPendahuluanSerahan/{kodcaw}', ['uses'=>'VaultController@updateVaultPendahuluanSerahan']);
    $router->get('TunaiController/{kodcaw}',['uses'=>'TunaiController@listTunai']);
    $router->post('tunai/daftarTunai/{kodcaw}',['uses'=> 'TunaiController@DaftarTunai']);
    $router->put('updateTunai/{kodcaw}',['uses'=>'TunaiController@UpdateTunai']);
    $router->put('updateTunaiGT/{kodcaw}',['uses'=>'TunaiController@UpdateTunaiGadaianTebus']);
    $router->get('getLatestBaki/{kodcaw}',['uses'=>'TunaiController@sumBakiTunai']);
    $router->post('add/addTunai/{kodcaw}',['uses'=> 'TunaiController@create']);
    $router->get('listSerahMarhunController/{kodcaw}',['uses'=>'TebusController@listPenebusanBaru']);
    $router->get('SenaraiPenebusanKhazanah/{kodcaw}',['uses'=>'TebusController@listSerahKhazanah']);
    $router->get('GetCurrentTunai/{kodcaw}',['uses' =>'TunaiController@getCurrentTunai']);
    $router->get('getPastTunai/{kodcaw}',['uses' =>'TunaiController@getTunaiPast']);
    $router->get('GetLatestTunai/{kodcaw}',['uses' =>'TunaiController@getLatestTunai']);
    $router->get('getAddTunai/{kodcaw}/',['uses' =>'TunaiController@getAddTunai']);
    $router->get('getAddTunaiDate/{kodcaw}/',['uses' =>'TunaiController@getAddTunaiDate']);
    $router->get('getAddTunai/{kodcaw}/kodlaluan/',['uses' =>'TunaiController@getAddTunaibyKodlaluan']);
    $router->get('getAddTunaiLatest/{kodcaw}',['uses' =>'TunaiController@getAddTunaibyKodlaluanLatest']);
    $router->put('gadai/hapus/{kodcaw}/{norujukan}', ['uses' => 'GadaiController@GadaiHapus']);
    $router->put('tebus/hapus/{kodcaw}/{norujukan}', ['uses' => 'GadaiController@TebusHapus']);
    $router->put('gadai/edit/marhun/{kodcaw}/{norujukan}/', ['uses' => 'MarhunController@deletemarhun']);
    $router->put('gadai/ubah/marhun/{kodcaw}/{norujukan}/', ['uses' => 'MarhunController@editmarhun']);
    $router->post('gldetail/{kodcaw}',['uses'=> 'VaultController@creategldetailonline']);
    $router->post('gldetailkaunter/{kodcaw}',['uses'=> 'VaultController@creategldetail']);
    $router->get('listgldetail/{kodcaw}',['uses'=> 'VaultController@listgldetail']);
    $router->get('laporanpetibesi/{kodcaw}/{tarikh}',['uses'=> 'VaultController@laporanPetiBesi']);
    $router->get('GetTunaiSemalam/{kodcaw}',['uses' =>'TunaiController@getTunaiSemalam']);
    $router->get('laporanpetibesirange/{kodcaw}',['uses'=> 'VaultController@laporanPetiBesiRange']);
    $router->get('laporanAuditTrail',['uses'=> 'LaporanController@LaporanAuditTrail']);

    //Get Tunai By tarikh for Laporan Aliran Tunai Teller
    $router->get('getTunaiByTarikh', ['uses' => 'TunaiController@getTunaiByTarikh']);

    //API PANJAR KHAZANAH
    $router->get('SenaraiPanjar/{kodcaw}',['uses'=>'PanjarController@list']);
    $router->get('SenaraiPanjar/list/{kodcaw}',['uses'=>'PanjarController@listpanjar']);
    $router->get('SenaraiPanjar/listeach/{kodcaw}',['uses'=>'PanjarController@listeachpanjar']);
    $router->get('SenaraiPanjar/{kodcaw}/{mula}/{akhir}',['uses'=>'PanjarController@listmulaakhir']);
    // $router->put('UpdateKelulusan/{kodcaw}/{norujukan}',['uses'=>'PanjarController@update']);
    $router->post('CreatePanjar/{kodcaw}',['uses'=>'PanjarController@create']);
    $router->post('DeletePanjar/{kodcaw}',['uses'=>'PanjarController@delete']);

    //API PAMPASAN GUNA PANJAR
    $router->post('pampasan/initiatePampasan',['uses'=>'PampasanController@initiatePampasan']);
    $router->post('pampasan/terimaPampasan',['uses'=>'PampasanController@terimaPampasan']);
    $router->put('pampasan/updateStatusPampasan', ['uses' => 'PampasanController@updateStatusPampasan']);
    $router->get('pampasan', ['uses' => 'PampasanController@getPampasan']);


    //API KELULUSAN
    $router->get('SenaraiKelulusan/{kodcaw}',['uses'=>'KelulusanController@list']);
    $router->get('RekodDahLepas/{kodcaw}',['uses'=>'KelulusanController@rekodlepas']);
    $router->get('SenaraiDahLulus/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@listdahlulus']);
    $router->get('ListLatestLulus/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@listlatestlulus']);
    $router->put('UpdateKelulusan/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@update']);
    $router->put('UpdateKelulusanAnggota/{kodcaw}',['uses'=>'KelulusanController@updateAnggota']);
    $router->put('UpdateKelulusanKomen/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@updatekomen']);

    $router->post('CreateKelulusan/{kodcaw}/{norujukan}/roles/{roles}',['uses'=>'KelulusanController@create']);
    $router->post('CreateKelulusanAnggota/{kodcaw}/roles/{roles}',['uses'=>'KelulusanController@createKelulusanAnggota']);
    $router->post('CreateLulus/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@kepohonancreate']);
    $router->get('GetLulus/{kodcaw}/',['uses'=>'KelulusanController@kepohonangetteller']);
    $router->put('UpdateKelulusan/kepohonan/{kodcaw}/{norujukan}',['uses'=>'KelulusanController@updatekepohonankhazanah']);
    $router->get('GetLulusAll/{kodcaw}/',['uses'=>'KelulusanController@listkepohonan']);
    $router->get('ListOperasi/',['uses'=>'KelulusanController@listoperasi']);
    $router->get('ListOperasiKelulusan/',['uses'=>'KelulusanController@listoperasikelulusan']);
    $router->get('list/approval/anggota',['uses'=>'KelulusanController@listKelulusanAnggota']);
    



    //API REQUEST TELLER
    $router->post('requestTeller/{kodcaw}',['uses' => 'TunaiController@createRequestTeller']);
    $router->get('requestTeller/get/{kodcaw}',['uses' => 'TunaiController@getRequestTeller']);
    $router->get('requestTeller/getlaporan/{kodcaw}',['uses' => 'TunaiController@getRequestTellerLaporanSerahan']);
    $router->get('requestTeller/getrekod/{kodcaw}',['uses' => 'TunaiController@getRequestTellerByRecno']);
    $router->get('requestTeller/getlaporanberkala/{kodcaw}',['uses' => 'TunaiController@getRequestTellerLaporanSerahanBerkala']);
    $router->get('requestTeller/get/{kodcaw}/date',['uses' => 'TunaiController@getRequestTellerByDate']);
    $router->put('requestTeller/update/{kodcaw}',['uses' => 'TunaiController@updateRequestTeller']);
    $router->put('requestTeller/updatedeno/{kodcaw}',['uses' => 'TunaiController@updateRequestTellerDeno']);
    $router->put('requestTeller/batal/{kodcaw}',['uses' => 'TunaiController@batalRequestTeller']);
    $router->get('requestTeller/checkproses',['uses'=>'TunaiController@CheckProsesReqTeller']);

    //API DENO PANJAR & DENO PEND-SERAHAN
    $router->post('requestdenopanjar/{kodcaw}',['uses' => 'PanjarController@createDenoPanjar']);
    $router->get('getdenopanjar/{kodcaw}',['uses' => 'PanjarController@getDenoPanjar']);
    $router->post('requestdenopanjar/update/{kodcaw}',['uses' => 'PanjarController@updateDenoPanjar']);
    $router->post('requestdenopanjar/batal/{kodcaw}',['uses' => 'PanjarController@batalDenoPanjar']);

    $router->post('requestdenopendser/{kodcaw}',['uses' => 'PendahuluanSerahanController@createDenoPendSer']);
    $router->get('getdenopendser/{kodcaw}',['uses' => 'PendahuluanSerahanController@getDenoPendSer']);
    $router->post('requestdenopendser/update/{kodcaw}',['uses' => 'PendahuluanSerahanController@updateDenoPendSer']);
    $router->get('SenaraiPendSer/listeach/{kodcaw}',['uses'=>'PendahuluanSerahanController@listeachpendser']);
    $router->post('DeletePendSer/{kodcaw}',['uses'=>'PendahuluanSerahanController@delete']);
    $router->get('SenaraiPendSer/range/{kodcaw}',['uses'=>'PendahuluanSerahanController@listpendahuluanserahan']);

    // $router->put('UpdateVault/PendahuluanSerahan/{kodcaw}', ['uses'=>'VaultController@updateVaultPanjar']);
    $router->put('UpdateVault/PendahuluanSerahan/{kodcaw}', ['uses'=>'VaultController@updateVaultDeletePendahuluanSerahan']);
    // $router->post('requestdenopendser/batal/{kodcaw}',['uses' => 'PendahuluanSerahanController@batalDenoPanjar']);



    //API WAKIL
    $router->get('getwakil/{kodcaw}',['uses' => 'TebusController@AllWakil']);
    $router->get('firstwakil/{kodcaw}',['uses' => 'TebusController@FirstWakil']);
    $router->get('getwakil/{kodcaw}/{icno}',['uses' => 'TebusController@getWakil']);
    $router->get('getwakil/{kodcaw}/code/{nowakil}',['uses' => 'TebusController@getWakilbycode']);
    $router->get('getsuratwakil/{kodcaw}/{norujukan}',['uses' => 'TebusController@getSuratWakil']);
    $router->put('ubahwakil/{kodcaw}',['uses'=>'TebusController@UbahWakil']);
    $router->post('createwakil/{kodcaw}/{icno}',['uses' => 'TebusController@createWakil']);
    $router->get('getwakil/{kodcaw}/status/{status}',['uses' => 'TebusController@getWakilbyStatus']);
    $router->get('lookupwakil',['uses' => 'TebusController@LookupWakil']);

    //API SURAT WAKIL
    $router->get('checksurat/{kodcaw}/{norujukan}',['uses'=>'WakilController@showSuratWakilByNorujukan']);
    $router->get('wakil/{kodcaw}/{t_cetak}',['uses'=>'WakilController@showsuratwakil']);
    $router->post('wakil/{kodcaw}',['uses'=>'WakilController@createSuratWakil']);
    $router->get('nosiri/wakil/{kodcaw}/{norujukan}',['uses'=>'WakilController@noSiriWakil']);
    $router->put('updatewakil/{kodcaw}/{norujukan}',['uses'=>'WakilController@updateWakil']);




    //API ALASAN
    $router->get('lookupalasan',['uses' => 'PolisController@LookupAlasan']);
    $router->get('polis/laporan',['uses' => 'PolisController@LaporanPolis']);

    //laporanlelong adminportal
    $router->get('laporan/lelong',['uses' => 'LelongController@LaporanLelong']);
    $router->get('lookupbatchlel/{kodcaw}',['uses' => 'LelongController@LookupBatchLel']);
    //barangkes
    $router->get('palsu/laporan', ['uses' => 'BarangkesController@LaporanBarangKes']);
    $router->get('barangkes', ['uses' => 'BarangkesController@index']); // 
    $router->post('barangkes/store', ['uses' => 'BarangkesController@store']); 

    // $router->post('/barangkes/{id}', ['uses' => 'BarangkesController@show']); 
    $router->put('barangkes/update/{recno}', ['uses' => 'BarangkesController@update']);



    //update tagterima Tebus
    $router->put('updatetagterima/{kodcaw}/{norujukan}',['uses'=>'TebusController@tagterimaupdate']);

    //pekerjaan
    $router->get('pekerjaan',['uses'=>'PekerjaanController@showAllPekerjaan']);

    //Tujuan Gadai
    $router->get('tujuangadai',['uses'=>'TujuanGadaiController@showAllTujuanGadai']);

    //DENOMINASI
    $router->get('DenominasiController/{kodcaw}',['uses'=>'DenominasiController@listdenominasi']);
    $router->put('DenominasiUpdate/{kodcaw}',['uses'=>'DenominasiController@updatedenominasi']);
    $router->post('DenominasiCreate/{kodcaw}',['uses'=>'DenominasiController@createdenominasi']);
    $router->get('DenominasiLaporan/{kodcaw}',['uses'=>'DenominasiController@listtarikhdenominasi']);

    //Tuntut Baki
    $router->get('TuntutBaki/{kodcaw}',['uses'=>'LelongController@showTuntutBaki']);
    $router->get('TuntutBakiRangeDate/{kodcaw}',['uses'=>'LelongController@showTuntutBakiRangeDate']);
    $router->get('TuntutBaki/{kodcaw}/teller',['uses'=>'LelongController@showTuntutBakiTeller']);
    $router->get('TuntutBaki/resit/{kodcaw}/{norujukan}',['uses'=>'LelongController@resitLelong']);
    $router->post('Tuntutbakisimpan/{kodcaw}',['uses'=>'LelongController@simpantuntutbaki']);
    $router->put('tuntutbakiupdate/{kodcaw}/{norujukan}',['uses'=>'LelongController@updatetagtbaki']);
    $router->get('TuntutBakiTarikh/{kodcaw}',['uses'=>'LelongController@showTuntutBakiTarikh']);
    $router->get('BelumTuntutBakiRangeDate/{kodcaw}',['uses'=>'LelongController@showBelumTuntutBakiRangeDate']);

    //API KOD PRODUK
    $router->get('getProduct/{kodcaw}',['uses'=>'ProductController@getProduct']); //add 2021-02-11

    //API GLCODE
    $router->get('getGlCode/{kodcaw}',['uses'=>'GLCodeController@GetGlcode']); //add 2021-02-11
    $router->get('getGlCode/{kodcaw}/acttype/{acttype}',['uses'=>'GLCodeController@GetGlcodeByActType']); //add 2021-02-11

    //API IMBANGDUGA_LAMA
    $router->get('imbangduga_lama/{kodcaw}', ['uses' =>'ImbangDugaLamaController@GetImbangDuga_Lama']);

    //API GLDETAILS
    $router->get('jumlahTerkumpulBayaranUpah/{kodcaw}', ['uses'=>'TebusController@JumUpahDibayar_keseluruhan']);
    $router->get('gldetailkira_pendahuluan_2013/data/{kodcaw}',['uses'=>'GlDetailsController@sum_gldetails']);
    $router->get('gldetailkira_pendahuluan_2014/data/{kodcaw}',['uses'=>'GlDetailsController@sum_advance_2014']);
    $router->get('gldetailkira_pendahuluanJMC_2015/data/{kodcaw}', ['uses' =>'GlDetailsController@sumJMC_2015']);
    $router->get('gldetailkira_pendahuluanJMC_2014/data/{kodcaw}', ['uses' =>'GlDetailsController@sumJMC_2014']);
    $router->get('gldetailKira_SerahanHQ/data/{kodcaw}', ['uses'=>'GlDetailsController@JumlahSerahanHQ']);
    $router->get('paparanImbangduga/data/{kodcaw}/{tarikh}',['uses'=>'GlDetailsController@data_imbangduga']);

    //API GLEJER
    $router->get('getGlejer/{kodcaw}',['uses'=>'GlejerController@getGlejer']);
    $router->get('getLejerMonthYear/{kodcaw}',['uses'=>'GlejerController@carianBulananTahun_glejer']);
    $router->get('getLejerYear/{kodcaw}',['uses'=>'GlejerController@carianTahun_glejer']);
    $router->get('getSemalam_Glejer/{kodcaw}',['uses' =>'GlejerController@getSemalam_Glejer']);
    $router->post('daftarGlejer/{kodcaw}',['uses'=>'GlejerController@Create_Glejer']);
    $router->put('kemasKiniGlejer/{kodcaw}',['uses'=>'GlejerController@Kemaskini_Glejer']);
    $router->get('glejer/getdata/{tarikh1}/{tarikh2}/{kodcaw}',['uses'=>'GlejerController@Getglejer_Data']);
    $router->get('glejer/sumDebit/{tarikh1}/{tarikh2}/{kodcaw}',['uses'=>'GlejerController@SumDebit_Glejer']);
    $router->get('glejer/sumKredit/{tarikh1}/{tarikh2}/{kodcaw}',['uses'=>'GlejerController@SumKredit_Glejer']);

    //TUNAI GADAITEBUS
    $router->get('getTunaiGadTeb/{kodcaw}',['uses'=>'TunaiGadTebController@getCurrentTunaiGadTeb']);
    $router->post('daftarTunaiGadteb/{kodcaw}',['uses'=>'TunaiGadTebController@createTunaiGadTeb']);
    $router->put('updateTunaiGadteb/{kodcaw}',['uses'=>'TunaiGadTebController@UpdateTunaiGadTeb']);
    $router->put('updateBakiEOD_Vault/{kodcaw}',['uses'=>'VaultController@update_onlyBakiEod']);

    $router->get('transaction_spesifik/{norujukan}',['uses'=>'TransactionController@getTransactionByRujukan_specific']);
    $router->get('transaction_spesifik_tarikh/{norujukan}',['uses'=>'TransactionController@getTransactionByRujukan_specific_tarikh']);
    $router->get('jumlahBayaranOnlineAll/data/{kodcaw}',['uses'=>'TransactionController@JumlahBayaranOnline_Keseluruhan']);


    //NAMA PENGGUNA TAMBAH KODLALUAN
    $router->get('get/pengguna/{kodcaw}',['uses'=>'TransactionController@GetPengguna']);

    //NAMA SETIAP TELLER DALAM TUNAI
    $router->get('get/tellerwork/{kodcaw}',['uses'=>'TunaiController@GetTellerWork']);

    //IMBANG DUGA//

    //Dua-Dua Table
    $router->get('CalculationPendahuluanSerahan/{kodcaw}',['uses'=>'VaultController@CalculationPendahuluanSerahan']);
    $router->get('KeuntunganArRahn/{kodcaw}',['uses'=>'GadaiController@CalculationKeuntungan']);
    $router->get('RebetCalculation/{kodcaw}',['uses'=>'TebusController@RebetCalculation']);

    //-- Harta Semasa --//
    $router->get('PinjamanDiberi/{kodcaw}',['uses'=>'GadaiController@CalculationPinjamanDiberi']);
    $router->get('PembiayaanDiberiTawarruq/{kodcaw}',['uses'=>'GadaiController@CalculationPembiayaanTawarruq']);
    $router->get('BayaranPendahuluan/{kodcaw}',['uses'=>'GadaiController@CalculationBayaranPendahuluan']);

    $router->get('TunaiDiTangan/{kodcaw}',['uses'=>'VaultController@TunaiDiTangan']);
    $router->get('PenghutangKakitangan/{kodcaw}',['uses'=>'TebusController@PenghutangKakitangan']);

    //-- Tanggungan Semasa --//
    $router->get('CalculationPanjar/{kodcaw}',['uses'=>'PanjarController@calculationpanjar']);
    $router->get('BakiLelongCalculation/{kodcaw}',['uses'=>'LelongController@BakiLelongCalculation']);
    $router->get('WTD/{kodcaw}',['uses'=>'LelongController@calculationwtd']);
    $router->get('SerahBaki/{kodcaw}',['uses'=>'LelongController@calculationserahbaki']);
    $router->get('cajlelong/{kodcaw}',['uses'=>'LelongController@cajlelongcalculation']);
    $router->get('KeuntunganSebenar/{kodcaw}',['uses'=>'TebusController@calculationKeuntunganSebenar']);
    $router->get('UntungRugiTerkumpul/{kodcaw}',['uses'=>'TebusController@calculationUntungRugiTerkumpul']);
    $router->get('cajperkhidmatanterkumpul/{kodcaw}',['uses'=>'LelongController@cajperkhidmatancalculation']);
    $router->get('CalculationHapusKira/{kodcaw}',['uses'=>'LaporanController@CalcHapusKira']);
    $router->get('Xtra/{kodcaw}',['uses'=>'LaporanController@CalcXtra']);
    $router->get('KeuntunganPenggadai/{kodcaw}',['uses'=>'TebusController@calculationKeuntunganPenggadai']);


    //LEJER AM//

    //Dua-Dua Table
    $router->get('PendahuluanSerahanLejer/{kodcaw}',['uses'=>'VaultController@CalculationPendahuluanSerahanLejer']);
    $router->get('KeuntunganArRahnLejer/{kodcaw}',['uses'=>'GadaiController@CalculationKeuntunganLejer']);
    $router->get('RebetCalculationLejer/{kodcaw}',['uses'=>'TebusController@RebetCalculationLejer']);
    $router->get('cajlelongLejer/{kodcaw}',['uses'=>'LelongController@cajlelongcalculationLejer']);

    // //-- Harta Semasa --//
    $router->get('PinjamanDiberiLejer/{kodcaw}',['uses'=>'GadaiController@CalculationPinjamanDiberiLejer']);
    $router->get('PembiayaanDiberiTawarruqLejer/{kodcaw}',['uses'=>'GadaiController@CalculationPembiayaanTawarruqLejer']);
    $router->get('BayaranPendahuluanLejer/{kodcaw}',['uses'=>'GadaiController@CalculationBayaranPendahuluanLejer']);

    $router->get('TunaiDiTanganLejer/{kodcaw}',['uses'=>'VaultController@TunaiDiTanganLejer']);

    // //-- Tanggungan Semasa --//
    $router->get('CalculationPanjarLejer/{kodcaw}',['uses'=>'PanjarController@calculationpanjarLejer']);
    $router->get('BakiLelongCalculationLejer/{kodcaw}',['uses'=>'LelongController@BakiLelongCalculationLejer']);
    $router->get('KeuntunganSebenarLejer/{kodcaw}',['uses'=>'TebusController@calculationKeuntunganSebenarLejer']);
    $router->get('WTDLejer/{kodcaw}',['uses'=>'LelongController@calculationwtdLejer']);


    // //-- Untung Rugi --//
    $router->get('UntungRugiCalculation/{kodcaw}',['uses'=>'TebusController@untungrugicalculation']);
    $router->get('UntungRugiCalculationLejer/{kodcaw}',['uses'=>'TebusController@untungrugicalculationLejer']);

    /* Pembaharuan Akrual */
    $router->get('Lejer/Keuntungan/{kodcaw}',['uses'=>'LaporanController@SemakanKeuntunganLejer']);
    $router->get('Lejer/PendapatanAkrual/{kodcaw}',['uses'=>'LaporanController@SemakanPendapatanAkrual']);
    $router->get('Backup/ImbangDuga/{kodcaw}',['uses'=>'LaporanController@SemakanBackupImbangDuga']);

    /* Penyelarasan */
    $router->get('penyelarasan/{kodcaw}',['uses'=>'PenyelarasanController@getPenyelarasan']);


    //END IMBANG DUGA & LEJER AM//

    //ADDED LEJER AM

    $router->get('latest_transaksi_untung/{norujukan}',['uses'=>'TransaksiKeuntunganController@getLatestTransaksi_Untung']);
    $router->get('jumlah_bayaran_pendahuluan/{norujukan}',['uses'=>'TransaksiKeuntunganController@GetjumlahBayaranPendahuluan']);

    //-- Ansuran GLEJER --//
    $router->get('ansuranByrKaunter/{kodcaw}/{norujukan}',['uses'=>'TransactionController@getSumBayaran_Ansuran']);


    //Komuditi Pukal
    $router->get('komuditi/check',['uses'=>'KomuditiController@checkKomuditi']);
    $router->get('komuditi/checkdate',['uses'=>'KomuditiController@checkKomuditiDateChoose']);
    $router->post('komuditi/pembelian',['uses'=>'KomuditiController@beliKomuditi']);
    $router->post('komuditi/jual',['uses'=>'KomuditiController@jualKomuditi']);
    $router->put('komuditi/update',['uses'=>'KomuditiController@updateKomuditi']);
    $router->put('komuditi/transaksi',['uses'=>'KomuditiController@transaksiKomuditi']);
    $router->put('komuditi/batal',['uses'=>'KomuditiController@batalKomuditi']);

    $router->get('komuditi/produk',['uses'=>'KomuditiController@getKomuditiProduct']);
    $router->get('komuditi/unit',['uses'=>'KomuditiController@getKomuditiProductUnit']);
    $router->get('komuditi/description',['uses'=>'KomuditiController@getKomuditiProductDescription']);
    $router->get('komuditi/rekodharian',['uses'=>'KomuditiController@rekodTransaksiHarian']);
    $router->get('komuditi/rekodkomuditi',['uses'=>'KomuditiController@rekodKomuditi']);
    $router->get('komoditi/rekod/transaksi',['uses'=>'KomuditiController@rekodTransaksiKomoditi']);

    $router->get('laporan/harian',['uses'=>'LaporanController@laporanHarian']);
    $router->get('laporan/terkumpul',['uses'=>'LaporanController@laporanTerkumpul']);

    //Collection ID Billplz
    $router->get('billplz/collectionid',['uses'=>'PortalBillplzController@getCollectionIDCawangan']);

    //Generate TAC Express Payment
    $router->post('tac/generate/express_payment',['uses'=>'TacExpressPaymentController@generateTacExpressPayment']);
    $router->get('tac/get/express_payment',['uses'=>'TacExpressPaymentController@getTacExpressPayment']);
    $router->get('tac/verify/express_payment',['uses'=>'TacExpressPaymentController@verifyTacExpressPayment']);

    //initiateTunai
    $router->get('initiate/tunai',['uses'=>'TunaiController@initiateTunai']);
    //WTD
    $router->get('check/wtd',['uses'=>'WTDController@getDraftWTD']);
    $router->get('check/customer',['uses' => 'WTDController@getCustomerWTD']);

    $router->get('check/lelong/tawarruq',['uses'=>'GadaiController@updateLelongTawarruq']);
    $router->get('update/sttebus/gadaian',['uses'=>'GadaiController@updateTebusGadai']);

    $router->get('check/upah12/kosong',['uses'=>'GadaiController@upah12kosong']);

    $router->get('calculate/akru/bycawangan',['uses'=>'GadaiController@calculateAkru']);

    $router->get('keluar/lelong/tawarruq',['uses'=>'LelongController@keluarLelongTawarruq']);

    $router->get('backup/stok/audit',['uses'=>'BackupStokAuditController@backupStokAudit']);
    $router->get('backup/stok/audit/problem',['uses'=>'BackupStokAuditController@backupStokAuditProblem']);
    $router->get('stokaudit/backdate',['uses'=>'BackupStokAuditController@LaporanAuditBackdate']);
    $router->get('stokaudit/backdate/problemakru',['uses'=>'BackupStokAuditController@backupStokAuditProblemAkru']);


    //One Percent
    $router->get('kadarujrah',['uses' => 'GadaiController@getKadarUjrah']);
    $router->post('onepercent',['uses' => 'GadaiController@getOnePercent']);
    $router->get('kadarujrah/by_group_id',['uses' => 'GadaiController@getKadarUjrahByGroupId']);

    //STOKAUDITKHAS
    $router->get('stokauditkhas/aktif/{kodcaw}',['uses'=>'StokAuditController@LaporanAuditKhasAktif']);
    $router->get('stokauditkhasbynorujukan/aktif/{kodcaw}',['uses'=>'StokAuditController@LaporanAuditKhasByNorujukan']);

    //API BLAST WASAP
    $router->post('blastwasap/{kodcaw}',['uses'=>'StokAuditController@blastwasap']);
    $router->post('blastwasapbysag/{kodcaw}',['uses'=>'StokAuditController@blastwasapbysag']);
    $router->get('rekodblast/{kodcaw}',['uses'=>'StokAuditController@rekodblast']);
    $router->get('rekodblastsms/{kodcaw}',['uses'=>'StokAuditController@rekodblastsms']);

    //API notis peringatan cawangan
    $router->get('/cawangan/getcawnotis/{kodcaw}/{notisid}',['uses'=>'CawanganCallCenterController@getcawnotis']);
    $router->get('/cawangan/senarainotisperingatan/{kodcaw}',['uses'=>'CawanganCallCenterController@senarainotisperingatan']);
    $router->get('/cawangan/getcawnotisall/{kodcaw}',['uses'=>'CawanganCallCenterController@getcawnotisall']);
    $router->get('/cawangan/bycawnotisperingatan/{kodcaw}/{notisid}',['uses'=>'CawanganCallCenterController@bycawnotisperingatan']);

    $router->post('panjar/updatetunai/{kodcaw}',['uses'=>'DenominasiController@cashdeposit']);
    $router->post('panjar/serahantunai/{kodcaw}',['uses'=>'DenominasiController@cashwithdraw']);
    $router->post('panjar/createpanjar/{kodcaw}',['uses'=>'DenominasiController@createpanjar']);
    $router->post('panjar/deletepanjar/{kodcaw}',['uses'=>'DenominasiController@deletepanjar']);
    $router->get('panjar/getperubatan/{kodcaw}',['uses'=>'DenominasiController@getPerubatanAmount']);

    /* Endpoint for Account Statements */
    $router->get('record/accountstatement/{kodcaw}',['uses'=>'TunaiController@getAccStatement']);

    /* Endpoint for Auto Serahan */
    $router->get('autoserahan/list',['uses'=>'AutoSerahanController@getAutoSerahan']);
    $router->put('autoserahan/approve',['uses'=>'AutoSerahanController@autoSerahanApproval']);
    $router->post('autoserahan/delete',['uses'=>'AutoSerahanController@deleteAutoSerahan']);
    $router->post('autoserahan/create',['uses'=>'AutoSerahanController@createAutoSerahan']);
    $router->post('autoserahan/delete',['uses'=>'AutoSerahanController@deleteAutoSerahan']);
    $router->put('autoserahan/pendahuluan',['uses'=>'AutoSerahanController@pendahuluanAutoSerahan']);
    $router->put('autoserahan/serahan',['uses'=>'AutoSerahanController@serahanAutoSerahan']);
    $router->put('autoserahan/delete/pendahuluan',['uses'=>'AutoSerahanController@removeAutoPendahuluan']);
    $router->put('autoserahan/delete/serahan',['uses'=>'AutoSerahanController@removeAutoSerahan']);
    $router->put('autoserahan/setapproval',['uses'=>'AutoSerahanController@SetApprovalWithdrawal']);
    $router->get('autoserahan/get',['uses'=>'AutoSerahanController@getAutoSerahanApproval']);
    $router->get('autoserahan/checkapproval',['uses'=>'AutoSerahanController@checkProsesApproval']);
    $router->get('autoserahan/allrecord',['uses'=>'AutoSerahanController@getApprovedAutoSerahan']);    

    /*Endpoints for Hapus Ansuran*/
    $router->put('UpdateHapusAnsuran',['uses'=>'KelulusanController@UpdateHapusAnsuranOperasi']);
    $router->get('getApproval',['uses'=>'KelulusanController@getApproval']);
    $router->get('getApproval/list',['uses'=>'KelulusanController@getApprovalList']);
    $router->get('getApproval/laporan',['uses'=>'KelulusanController@getApprovalLaporan']);
});

$router->group(['prefix'=>'e-arrahn'], function () use ($router){
});

$router->group(['prefix'=>'mobile'], function () use ($router){

    $router->get('customers/{ic}',['uses'=>'CustomerController@showOneCustomerByICMobile']);

       //utama
       $router->get('customers/{ic}/gadai/amaran/lelong',['uses'=>'CustomerController@show6BlnGadai']);
       $router->get('harga_emas',['uses'=>'HargaEmasController@showAllHargaEmasMobile']);
       $router->get('gadai/norujukan/count/{nokp}',['uses'=>'CustomerController@countNorujukanMobile']);
       $router->get('gadai/norujukan/{nokp}',['uses'=>'CustomerController@listNorujukanMobile']);
       $router->get('akaun-bank/{nokp}',['uses'=>'CustomerController@akaunBankMobile']);
       $router->get('bank-listing',['uses'=>'CustomerController@bankListMobile']);
       $router->post('insert/akaun-bank',['uses'=>'CustomerController@insertAkaunBankMobile']);
       $router->get('gadai/norujukan/jumlahPembiayaan/{nokp}',['uses'=>'CustomerController@jumlahPembiayaanMobile']);
       $router->get('gadai/norujukan/jumlahBakiLelong/{nokp}',['uses'=>'CustomerController@jumlahBakiLelongMobile']);
       $router->post('gadai/detail/norujukan',['uses'=>'CustomerController@getGadaiDetailMobile']);

       //gadaian
       $router->get('gadai/{noic}',['uses'=>'GadaiController@showOneGadaiMobile']);
       $router->get('customers/{ic}/gadaitebuslelong/{kodcaw}',['uses'=>'CustomerController@gadaiTebusLelongByCawanganMobile']);

       //profile
       $router->post('customers/update/{nokp}', ['uses' => 'CustomerController@customerUpdate']);

       //register
       $router->get('otp/{nokp}',['uses'=>'OtpController@getOtp']);
       $router->get('otp/check/{otp_token}',['uses'=>'OtpController@checkToken']);
       $router->put('otp/update_otp',['uses'=>'OtpController@usedOTP']);

       $router->post('send-email', ['uses' => 'CustomerController@sendEmail']);

});

$router->group(['prefix'=>'dashboard'], function () use ($router){
    $router->get('jumlahGadai',['uses'=>'GadaiController@showAllGadaiToday']);
    $router->get('jumlahTebus',['uses'=>'GadaiController@showAllTebusToday']);
    $router->get('jumlahUpah',['uses'=>'GadaiController@showAllUpahToday']);
    $router->get('jumlahVariasi',['uses'=>'GadaiController@showAllVariasiToday']);
    $router->get('gadaiTerkumpul',['uses'=>'GadaiController@showAllGadaiTerkumpul']);

    $router->get('tebus/terkumpul',['uses'=>'GadaiController@showTebusTerkumpul']);
    $router->get('upah/terkumpul',['uses'=>'GadaiController@showUpahTerkumpul']);
    $router->get('outstanding/semasa',['uses'=>'GadaiController@outstandingSemasa']);
    $router->get('nilaimarhun/semasa',['uses'=>'GadaiController@nilaiMarhunSemasa']);
    $router->get('vault/semasa',['uses'=>'GadaiController@petiBesiSemasa']);

    $router->get('oneweekdata',['uses'=>'GadaiController@oneWeekData']);

    $router->get('newcustomertoday',['uses'=>'CustomerController@getTotalNewCustomerToday']);
    $router->get('statistik/komoditi/harini',['uses'=>'GadaiController@KomoditiDashboard']);

    $router->post('prestasi/cawangan',['uses'=>'GadaiController@prestasiCawangan']);

    $router->post('peti_besi',['uses'=>'GadaiController@petiBesiCawangan']);

    $router->get('percentCawangan',['uses'=>'GadaiController@percent']);
    $router->get('percentCawanganTop5',['uses'=>'GadaiController@percentTop5']);
    $router->get('totalPinjamanGadaian',['uses'=>'GadaiController@totalPinjamanGadaian']);

    $router->post('gadaiTebusUpah',['uses'=>'GadaiController@bilanganTransaksi']);

    $router->get('statistik/gadaian',['uses'=>'GadaiController@statistikGadaian']);

    $router->get('komuditi/check',['uses'=>'KomuditiController@checkKomuditiDashboard']);

    $router->get('komoditi/jumlah/baki',['uses'=>'KomuditiController@jumlahKomoditiDashboard']);
    $router->post('komoditi/statistik',['uses'=>'KomuditiController@statistikKomoditiDashboard']);
});

$router->group(['prefix'=>'portal'], function () use ($router){
    $router->get('financeMonth',['uses'=>'GadaiController@PembiayaanBulanan']);
    $router->get('transaksipelanggan',['uses'=>'TransactionController@TransaksiPelanggan']);
    $router->get('transaksipelanggan/upah',['uses'=>'TransactionController@TransaksiUpah']);
    $router->get('searchsagonline',['uses'=>'TransactionOnlineController@searchSAGOnline']);
    $router->get('customer/info',['uses'=>'TransactionOnlineController@CustomerInfo']);
    $router->get('customer/info/lelong',['uses'=>'TransactionOnlineController@CustomerInfoLelong']);
});

$router->group(['prefix'=>'admin'], function () use ($router){

    $router->get('getTunaiPaginate/{kodcaw}',['uses' => 'AdminPageController@TunaiPaginateforAdmin']);
    $router->get('getPetiBesiPaginate/{kodcaw}',['uses' => 'AdminPageController@PetiBesiPaginateforAdmin']);
    $router->get('GetTunaiByTarikh/{kodcaw}',['uses' =>'AdminPageController@getTarikhTunai']);
    $router->get('GetTunaiByTarikhSebelum/{kodcaw}',['uses' =>'AdminPageController@getTarikhTunaiSebelum']);
    $router->get('getAddTunaiDateKodlaluan/{kodcaw}/',['uses' =>'AdminPageController@getAddTunaiDateKodlaluan']);
    $router->get('AdvansurSearchByTarikh/{kodcaw}',['uses'=>'AdminPageController@SenaraiAdvansurTarikh']);
    $router->get('TuntutBakiTarikhTeller/{kodcaw}',['uses'=>'AdminPageController@showTuntutBakiTarikhTeller']);
    $router->get('lelong/tarikh/{kodcaw}',['uses'=>'AdminPageController@LelonganTarikh']);
    $router->post('updateTunaiGTByTarikh/{kodcaw}',['uses'=>'AdminPageController@UpdateTunaiByTarikh']);
    $router->get('searchByName',['uses'=>'CustomerController@AdminsearchCustomerByName']);
    $router->get('searchByIC',['uses'=>'CustomerController@AdminsearchCustomerByIC']); //refer ni jugak

    // sag
    $router->get('searchBySag',['uses'=>'CustomerController@AdminsearchCustomerBySAG']); //refer ni jugak

    $router->get('pembiayaanTahunan',['uses'=>'AdminPageController@TahunanGadai']);
    $router->get('penebusanTahunan',['uses'=>'AdminPageController@TahunanTebus']);
    $router->get('keuntunganTahunan',['uses'=>'AdminPageController@TahunanKeuntungan']);

    $router->get('pembiayaanBulanan',['uses'=>'AdminPageController@PembiayaanBulanan']);
    $router->get('penebusanBulanan',['uses'=>'AdminPageController@PenebusanBulanan']);
    $router->get('keuntunganBulanan',['uses'=>'AdminPageController@KeuntunganBulanan']);
    $router->get('pembiayaanToday',['uses'=>'AdminPageController@showAllGadaiToday']);
    $router->get('penebusanToday',['uses'=>'AdminPageController@showAllTebusToday']);
    $router->get('keuntunganToday',['uses'=>'AdminPageController@showAllUpahToday']);
    $router->get('bilangan/gadai',['uses'=>'AdminPageController@BilanganGadaianBulanan']);
    $router->get('bilangan/tebus',['uses'=>'AdminPageController@BilanganPenebusanBulanan']);
    $router->get('bilangan/pengadai/{kodcaw}',['uses'=>'AdminPageController@BilanganPengadai']);


    $router->get('senaraiBajet',['uses' => 'AdminPageController@SenaraiBajet']);
    $router->get('senaraiKemaskiniBajet',['uses' => 'AdminPageController@senaraikemaskinibajet']);
    $router->get('checkBajet',['uses' => 'AdminPageController@checkBajet']);
    $router->post('simpanBajet',['uses'=>'AdminPageController@SimpanBajet']);
    $router->put('kemaskiniBajet',['uses'=>'AdminPageController@KemaskiniBajet']);

    $router->get('Customers/{id}',['uses'=>'AdminPageController@showOneCustomer']);
    $router->get('PetibesiSebelumTarikh/{kodcaw}',['uses'=>'AdminPageController@getpetibesiSebelumbyTarikh']);
    $router->get('GlDetailTarikh/{kodcaw}',['uses'=>'AdminPageController@getGldetailbyTarikh']);
    $router->get('PanjarTarikh/{kodcaw}',['uses'=>'AdminPageController@getPanjarbyTarikh']);
    $router->put('UpdatePetiBesi',['uses'=>'AdminPageController@updatePetiBesiAdmin']);
    $router->get('searchSAGOnline',['uses'=>'AdminPageController@AdminsearchSagOnline']);
    $router->post('simpanStatus',['uses'=>'AdminPageController@SimpanStatus']);

    $router->get('SenaraiBlacklist/{kodcaw}',['uses'=>'AdminPageController@SenaraiBlacklist']);
    $router->post('DeleteBlacklist',['uses'=>'AdminPageController@DeleteBlackList']);
    $router->post('AddSenaraiHitam',['uses'=>'AdminPageController@AddSenaraiHitam']);
    $router->put('notislelong/update/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong']);
    $router->put('notislelong/update2/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong2']);

    $router->get('ListOperasi/Paginate',['uses'=>'AdminPageController@listoperasi']);
    $router->get('ListOperasiKelulusan/Paginate',['uses'=>'AdminPageController@listoperasikelulusan']);

    $router->get('customers/{ic}/gadai/{status}',['uses'=>'AdminPageController@showOneCustomerGadai']);

    $router->post('permohonan/add/{kodcaw}',['uses'=>'AdminPageController@TambahPermohonan']);
    $router->get('permohonan/get/{kodcaw}',['uses'=>'AdminPageController@GetPermohonanCawangan']);
    $router->get('permohonan/rekod/{kodcaw}',['uses'=>'AdminPageController@GetRekodPermohonanCawangan']);
    $router->get('permohonan/get/{kodcaw}/{mohonid}',['uses'=>'AdminPageController@GetPermohonanById']);
    $router->get('permohonan/description/{mohonid}',['uses'=>'AdminPageController@GetDescriptionStatus']);

    $router->put('permohonan/updateoperasi',['uses'=>'AdminPageController@KelulusanPermohonanByOperasi']);
    $router->put('permohonan/updateakaun',['uses'=>'AdminPageController@KelulusanPermohonanByAkaun']);
    $router->put('permohonan/updatecetak',['uses'=>'AdminPageController@PengesahanCetakan']);
    $router->post('permohonan/updatepb',['uses'=>'AdminPageController@KelulusanPermohonanByPB']);
    $router->put('permohonan/updatebank',['uses'=>'AdminPageController@DepositBank']);
    $router->put('permohonan/tagterima',['uses'=>'AdminPageController@TagTerima']);
    $router->post('permohonan/tagcit',['uses'=>'AdminPageController@TagCit']);
    $router->get('permohonan/viewfiles',['uses'=>'AdminPageController@downloadFile']);
    $router->post('permohonan/updatejanapc',['uses'=>'AdminPageController@PenjanaanPC']);


    $router->get('rangebakilelong/{kodcaw}',['uses'=>'AdminPageController@RangeBakiLelong']);
    $router->get('wtd/senarai',['uses'=>'AdminPageController@SenaraiTuntutWTD']);
    $router->post('wtd/insert',['uses'=>'AdminPageController@InsertDraftWTD']);
    $router->post('wtd/process',['uses'=>'AdminPageController@ProsesWTD']);
    $router->get('wtd/rekod',['uses'=>'AdminPageController@rekodWTD']);
    $router->get('wtd/rekod/{batchno}',['uses'=>'AdminPageController@rekodWTDByBatchNo']);
    $router->post('wtd/delete',['uses'=>'AdminPageController@RemoveDraftWTD']);
    $router->get('wtd/dalamproses',['uses'=>'AdminPageController@rekodWTDDalamProses']);

    //Aiman Ngube WTD
    $router->get('wtd/janaSimulasi',['uses'=>'AdminPageController@JanaSimulasiWTD']);
    $router->get('wtd/rekodSimulasi',['uses'=>'AdminPageController@RekodSimulasiWTD']);
    $router->post('wtd/prosesSimulasi',['uses'=>'AdminPageController@ProsesSimulasiWTD']);
    $router->post('wtd/pengesahanSimulasi',['uses'=>'AdminPageController@PengesahanSimulasiWTD']);
    $router->post('wtd/simulasiToDraft',['uses'=>'AdminPageController@SimulasiToDraft']);
    $router->post('wtd/simulasiBaru',['uses'=>'AdminPageController@SimulasiBaru']);

    //laporan wtd
    $router->get('wtd/summaryWtd', ['uses' => 'WTDController@getSummaryWtd']);

    //debugwtd
    $router->get('wtd/debugWtd', ['uses' => 'WTDController@getDebugWtd']);

    $router->get('audit/keuntungansebenar',['uses'=>'AdminPageController@KeuntunganSebenarExport']);
    $router->get('laporan/aging',['uses'=>'AdminPageController@LaporanAging']);
    $router->get('dashboard/aging',['uses'=>'AdminPageController@DashboardAging']);

    $router->get('laporan/auditcustomer',['uses'=>'AdminPageController@laporanAuditCustomer']);
    $router->get('ig/keuntungansebenar',['uses'=>'AdminPageController@AkruKeuntunganSebenar']);
    $router->get('ig/pendapatanterakru',['uses'=>'TebusController@CalculationPendapatanTerakru']);

    $router->get('laporan/serahgadai',['uses'=>'AdminPageController@Laporan_SerahPetiBesiGadai']);
    $router->get('laporan/serahmarhuntebus',['uses'=>'AdminPageController@Laporan_SerahMarhunTebus']);

    $router->get('tetapan/listbarcode',['uses'=>'AdminPageController@ListBarcodeScannedOperasi']);
    $router->put('tetapan/listbarcode/update',['uses'=>'AdminPageController@ListBarcodeScannedOperasi_Update']);
    $router->get('tetapan/penggunamargin',['uses'=>'AdminPageController@PenggunaMargin']);
    $router->put('tetapan/penggunamargin/update',['uses'=>'AdminPageController@PenggunaMargin_Update']);
    $router->get('tetapan/listcawangan',['uses'=>'AdminPageController@ListCawangan']);
    $router->put('tetapan/listcawangan/update',['uses'=>'AdminPageController@ListCawangan_Update']);


    $router->get('laporanllcaw/gadai',['uses'=>'AdminPageController@getLaporanGadaiAllCaw']);
    $router->get('laporan/akrubulan',['uses'=>'AdminPageController@getLaporanAkruBulan']);
    $router->get('laporan/akrual/generateDaily',['uses'=>'LaporanController@GenerateDailyAkrual']);
    $router->get('laporan/akrual/generateMonthly',['uses'=>'LaporanController@GenerateMonthlyAkrual']);
    $router->get('laporan/akrual/insertImbangDuga',['uses'=>'LaporanController@InsertDailyImbangDuga']);
    $router->get('laporan/akrual/UntungRugiTerkumpul/{kodcaw}',['uses' => 'AdminPageController@calculationUntungTerkumpulAkru']);
    $router->get('laporan/akrual/updateImbangDuga',['uses'=>'LaporanController@UpdateDailyImbangDuga']);
    $router->get('laporan/akrual/updateImbangDugaRefined',['uses'=>'LaporanController@UpdateDailyImbangDugaRefined']);
    $router->get('laporan/akrual/getImbangDugaBackupData',['uses'=>'LaporanController@getImbangDugaBackupData']);
    $router->post('ansuran/delete',['uses'=>'GadaiController@deleteAnsuran']);
    $router->get('ansuran/getLatest',['uses'=>'GadaiController@getLatestAdvanceWithoutDelete']);
    $router->get('laporan/imbangdugabackup',['uses' => 'LaporanController@getImbangDugaBackup']);
    $router->get('laporan/kelulusan',['uses' => 'LaporanController@getLaporanKelulusan']);
    $router->get('laporan/kelulusan/list',['uses' => 'LaporanController@getListofKelulusan']);
    $router->get('laporan/online',['uses'=>'AdminPageController@LaporanOnline']);
    $router->get('laporan/tuntutbaki',['uses'=>'AdminPageController@LaporanTuntutBaki']);

    $router->get('store/ringkasanharian',['uses'=>'AdminPageController@StoreRingkasanHarian']);
    $router->get('get/ringkasanharian',['uses'=>'AdminPageController@getRingkasanHarian']);

    $router->get('ig/penghutang',['uses'=>'AdminPageController@ListPenghutang']);
    $router->get('ig/bayaran_penghutang',['uses'=>'AdminPageController@SenaraiBayaranHutang']);
    $router->get('get/accountcheck',['uses'=>'AdminPageController@getAccountList']);
    $router->post('get/jobstatus',['uses'=>'AdminPageController@getJobStatus']);
});


$router->group(['prefix'=>'lelong'], function () use ($router){
    $router->get('upahtawarruq/{kodcaw}/{norujukan}/{jeniskeuntungan}',['uses'=>'TebusController@upahTawarruq']);
    $router->get('upahrebettawarruq/{kodcaw}/{norujukan}/{jeniskeuntungan}',['uses'=>'TebusController@upahRebetTawarruq']);
    $router->get('kiraupahUjrahOnePercent/{kodcaw}/{norujukan}',['uses'=>'LelongController@kiraupahUjrahOnePercent']);
    $router->get('kiraupahUjrahOnePercentRebate/{kodcaw}/{norujukan}',['uses'=>'LelongController@kiraupahUjrahOnePercentRebate']);
    $router->post('taglel/update',['uses'=>'GadaiController@updateTagLelong']);
    $router->post('taglel/revert',['uses'=>'GadaiController@revertTagLelong']);
    $router->post('exportLelong',['uses'=>'LelongController@exportLelong']);
    $router->get('get/ringkasanharian',['uses'=>'LelongController@getRingkasanHarian']);
    $router->get('laporan/aging',['uses'=>'AdminPageController@LaporanAging']);
    $router->get('getLaporanGadaiRangeDatebyTeller/{kodcaw}',['uses'=>'LelongController@getLaporanGadaiRangeDatebyTeller']);
    $router->get('getLaporanTebusRangeDatebyTeller/{kodcaw}',['uses'=>'LelongController@getLaporanTebusRangeDatebyTeller']);
    $router->get('getLaporanGadaiRangeDatebyPenilai/{kodcaw}',['uses'=>'LelongController@getLaporanGadaiRangeDatebyPenilai']);

    // $router->get('get/listbatchlelong',['uses'=>'AdminPageController@getRingkasanHarian']);
    $router->get('get/listbatchlelong/{kodcaw}',['uses'=>'LelongController@showAllLelongByCawanganBatchno']);
    $router->get('get/listlelongbybatch/{kodcaw}/{batchno}',['uses'=>'LelongController@showAllLelongByCawanganbyBatchno']);
    $router->get('get/listbatchlelongall/{kodcaw}',['uses'=>'LelongController@showAllLelongByCawanganbyBatchnoall']);
    $router->get('get/listbatchlelongallT/{kodcaw}',['uses'=>'LelongController@showAllLelongByCawanganbyBatchnoallT']);
    $router->get('get/listbatchlelongT/{kodcaw}',['uses'=>'LelongController@showAllLelongByCawanganBatchnoT']);
    $router->get('get/listlelongbybatchT/{kodcaw}/{batchno}',['uses'=>'LelongController@showAllLelongByCawanganbyBatchnoT']);
    $router->get('get/upahtawarruqbytarikh',['uses'=>'TebusController@upahTawarruqByTarikh']);
    $router->get('ringkasan-harian/{kod_cawangan}', ['uses' => 'Reports\RingkasanHarianController@getLaporanCawanganKPI']);

});

$router->group(['prefix'=>'kelantanpay'], function () use ($router){
    $router->get('gadai/customer',['uses'=>'KelantanPayController@index']);
    $router->post('payment/gadai',['uses'=>'KelantanPayController@postPayment']);
});

$router->group(['prefix'=>'arcc'], function () use ($router){
    //ARCC API
    $router->get('datagadai/aktif/{kodcaw}',['uses'=>'CallCenterController@datagadai']);
    $router->get('cariannotispertama/{kodcaw}',['uses'=>'CallCenterController@cariannotispertama']);
    $router->get('cawangan',['uses'=>'CallCenterController@showAllCawangans']);
    $router->post('insertdatagadai/aktif/{kodcaw}',['uses'=>'CallCenterController@insertdatagadai']);
    $router->post('insertnotispertama/{kodcaw}',['uses'=>'CallCenterController@insertnotispertama']);
    $router->get('getbatchnotispertama',['uses'=>'CallCenterController@getbatchnotispertama']);
    $router->get('getbatchnotis',['uses'=>'CallCenterController@getbatchnotis']);
    $router->get('senarainotisperingatan',['uses'=>'CallCenterController@senarainotisperingatan']);
    $router->get('getcawnotis/{notisid}',['uses'=>'CallCenterController@getcawnotis']);
    $router->get('getcawnotisbycaw',['uses'=>'CallCenterController@getcawnotisbycaw']);
    $router->get('bycawnotisperingatan/{kodcaw}/{notisid}',['uses'=>'CallCenterController@bycawnotisperingatan']);
    $router->post('/notis/blastwasapbysag',['uses'=>'CallCenterController@blastwasapbysag']);
    $router->post('kemaskininotisperingatan',['uses'=>'CallCenterController@kemaskininotisperingatan']);
    $router->get('cariannotiskedua',['uses'=>'CallCenterController@cariannotiskedua']);
    $router->get('getcawnotiskeduabycaw',['uses'=>'CallCenterController@getcawnotiskeduabycaw']);
    $router->get('bycawnotisperingatankedua/{kodcaw}/{notisid}',['uses'=>'CallCenterController@bycawnotisperingatankedua']);
    $router->get('notisperingatankedua/{kodcaw}/{notisid}',['uses'=>'CallCenterController@notisperingatankedua']);
    $router->get('getfasa',['uses'=>'CallCenterController@getfasa']);
    $router->get('getdatanotiskedua/{kodcaw}/{notisid}/{fasa}',['uses'=>'CallCenterController@getdatanotiskedua']);
    $router->post('/notis/blastwasapbysagkedua',['uses'=>'CallCenterController@blastwasapbysagkedua']);
    $router->get('getcawnotiskemaskini/{notisid}',['uses'=>'CallCenterController@getcawnotiskemaskini']);
    $router->get('senarainotisperingatankedua',['uses'=>'CallCenterController@senarainotisperingatankedua']);


    $router->get('gadaian/{kodcaw}',['uses'=>'CallCenterController@getJbgGadai']);
    $router->get('getbatchnotisjbg',['uses'=>'CallCenterController@getbatchnotisjbg']);
    $router->post('insertdatagadaijbg/{kodcaw}',['uses'=>'CallCenterController@insertdatagadaijbg']);
    $router->get('senarainotisjbg',['uses'=>'CallCenterController@senarainotisjbg']);
    $router->get('getcawnotisjbg/{notisid}',['uses'=>'CallCenterController@getcawnotisjbg']);
    $router->get('getcawnotisjbgbycaw',['uses'=>'CallCenterController@getcawnotisjbgbycaw']);
    $router->get('bycawnotisjbg/{kodcaw}/{notisid}',['uses'=>'CallCenterController@bycawnotisjbg']);
    $router->get('bysagnotisjbg/{kodcaw}/{notisid}/{id}',['uses'=>'CallCenterController@bysagnotisjbg']);
    $router->get('bysagnotisjbgcustomer/{kodcaw}/{notisid}/{id}',['uses'=>'CallCenterController@bysagnotisjbgCustomer']);

    $router->get('bycawnotisjbg2/{kodcaw}/{notisid}',['uses'=>'CallCenterController@bycawnotisjbg2']);
    $router->get('bysagnotisjbg2/{kodcaw}/{notisid}/{nokp}',['uses'=>'CallCenterController@bysagnotisjbg2']);
    $router->put('updatecall/{kodcaw}/{notisid}/{nokp}', ['uses' => 'CallCenterController@updatecall']);
    $router->get('bysagnotisjbgcustomer2/{kodcaw}/{notisid}/{nokp}',['uses'=>'CallCenterController@bysagnotisjbgCustomer2']);
    $router->get('rekodgadai',['uses'=>'CallCenterController@rekodgadai']);
    $router->post('rekodgadai-batch',['uses'=>'CallCenterController@rekodgadaiBatch']);
});
