<?php

use App\TransactionOnline;
use Illuminate\Support\Facades\DB;

$router->group(['prefix' => 'api/reports'], function () use ($router) {
    $router->group(['namespace' => 'Reports'], function () use ($router) {
        $router->get('gadaian', ['uses' => 'GadaianController@getSummaryLaporanGadai']);
        $router->get('gadaian/{kod_cawangan}', ['uses' => 'GadaianController@getLaporanCawangan']);
        $router->get('penebusan', ['uses' => 'PenebusanController@getSummaryLaporanTebus']);
        $router->get('penebusan/{kod_cawangan}', ['uses' => 'PenebusanController@getLaporanCawangan']);
        $router->get('ansuran', ['uses' => 'AnsuranController@getSummaryLaporanAnsuran']);
        $router->get('ansuran/{kod_cawangan}', ['uses' => 'AnsuranController@getLaporanCawangan']);
        $router->get('kawalan-stok/{kod_cawangan}', ['uses' => 'KawalanStokController@getLaporanCawangan']);
        $router->get('ringkasan-harian', ['uses' => 'RingkasanHarianController@getSummaryLaporanRingkasanHarian']);
        $router->get('ringkasan-harian/{kod_cawangan}', ['uses' => 'RingkasanHarianController@getLaporanCawangan']);
        $router->get('stok-audit', ['uses' => 'StokAuditController@getSummaryLaporanStokAudit']);

        $router->get('onepercent/balance/{kod_cawangan}', ['uses' => 'OnePercentController@getKeuntunganImbangDuga']);
        $router->get('onepercent/ledger/{kod_cawangan}', ['uses' => 'OnePercentController@getKeuntunganLejerAm']);
        $router->get('ujrah/balance/{kod_cawangan}', ['uses' => 'OnePercentController@getUjrahImbangDuga']);
        $router->get('ujrah/ledger/{kod_cawangan}', ['uses' => 'OnePercentController@getUjrahLejerAm']);
        $router->get('rounded/balance/{kod_cawangan}', ['uses' => 'OnePercentController@getRoundedImbangDuga']);
        $router->get('rounded/ledger/{kod_cawangan}', ['uses' => 'OnePercentController@getRoundedLejerAm']);
        $router->get('totalrebate', ['uses' => 'OnePercentController@getTotalRebate']);
        $router->get('getaccrualincome', ['uses' => 'OnePercentController@getAccruedincome']);
        $router->get('getaccrualincome/all', ['uses' => 'OnePercentController@getAllCawanganAccruedIncome']);
        $router->get('getTotalCurrentProfit/{kod_cawangan}', ['uses' => 'OnePercentController@getCurrentProfit']);

        $router->get('stokaudit/get', ['uses' => 'OnePercentController@getStokAuditBackdate']);

        $router->get('balancesheets/get', ['uses' => 'BalanceSheetsController@getBalanceSheetsList']);

        $router->get('updateig', ['uses' => 'BalanceSheetsController@insertBalanceSheets']);
        $router->get('updateigall', ['uses' => 'BalanceSheetsController@updateIGBalanceSheets']);

        $router->get('lelongan', ['uses' => 'LelonganController@getSummaryLaporanLelong']);
        $router->get('lelongan/{kod_cawangan}', ['uses' => 'LelonganController@getLaporanCawangan']);

        $router->get('aging', ['uses' => 'AgingController@getSummaryLaporanAging']);

        $router->get('outstanding', ['uses' => 'OutstandingController@getSummaryLaporanOutstanding']);

        $router->get('petibesi', ['uses' => 'OutstandingController@getSummaryLaporanPetibesi']);

        $router->get('pelangganbaru', ['uses' => 'AnalisaController@getSummaryLaporanPelangganBaru']);

        $router->get('pelangganaktif', ['uses' => 'AnalisaController@getSummaryLaporanPelangganAktif']);

        $router->get('bakilelongbelumtuntut', ['uses' => 'LelonganController@getSummaryLaporanBakiLelongBelumTuntut']);
        $router->get('bakilelongbelumtuntut/{kod_cawangan}', ['uses' => 'LelonganController@getLaporanBakiLelongBelumTuntutCawangan']);
        $router->get('bayaran-online', ['uses' => 'BayaranOnlineController']);
        $router->get('bayaran-online-detail', ['uses' => 'BayaranOnlineDetailController']);

        $router->get('gadaitebus', ['uses' => 'GadaianController@getSummaryLaporanGadaiTebus']);
        $router->get('gadaitebusmasa', ['uses' => 'GadaianController@getSummaryLaporanGadaiTebusMasa']);
        $router->get('gadaitebusmasa/{kod_cawangan}', ['uses' => 'GadaianController@getLaporanGadaiTebusMasaCawangan']);
        $router->get('audit-trail', ['uses' => 'AuditTrailController@getAuditTrail']);
        $router->get('audittrail/operasi',['uses'=>'AuditTrailController@AuditTrailOperasi']);
        $router->get('saringan/gadaian', ['uses' => 'SaringanGadaianController@getLaporanGadai']);

        $router->get('data-pelanggan', ['uses' => 'AnalisaController@getSummaryLaporanDataPelanggan']);
        $router->get('data-pelanggan-bycaw', ['uses' => 'AnalisaController@getSummaryLaporanDataPelangganBycaw']);
    });
});
