<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
// Route::get('/', function () {
// return view('welcome');
// });
Route::get('/', 'AuthManageController@viewLogin')->name('login');
Route::get('/login', 'AuthManageController@viewLogin')->name('login');
Route::post('/verify_login', 'AuthManageController@verifyLogin');
Route::post('/first_account', 'UserManageController@firstAccount');
Route::group(['middleware' => ['auth', 'checkRole:super_admin,admin,kasir']], function () {
Route::get('/logout', 'AuthManageController@logoutProcess');
Route::get('/dashboard', 'ViewManageController@viewDashboard');
Route::get('/dashboard/chart/{filter}', 'ViewManageController@filterChartDashboard');
// ============================== Tambah Baru ===========================================//
Route::get('/dashboard/all-incomes/{minDate}/{maxDate}', 'ViewManageController@allIncomesDashboard');
Route::get('/dashboard/all-incomes/', 'ViewManageController@allIncomesDashboard');
// ============================== Tambah Baru ===========================================//
Route::post('/market/update', 'ViewManageController@updateMarket');
// ------------------------- PPN -------------------------
Route::get('/ppn', 'PPNManageController@viewPPN');
Route::get('/ppn/edit/{id}', 'PPNManageController@editPPN');
Route::post('/ppn/update', 'PPNManageController@updatePPN');
// ------------------------- Fitur Cari -------------------------
Route::get('/search/{word}', 'SearchManageController@searchPage');
// ------------------------- Profil -------------------------
Route::get('/profile', 'ProfileManageController@viewProfile');
Route::post('/profile/update/data', 'ProfileManageController@changeData');
Route::post('/profile/update/password', 'ProfileManageController@changePassword');
Route::post('/profile/update/picture', 'ProfileManageController@changePicture');
// ------------------------- Kelola Akun -------------------------
// > Akun
Route::get('/account', 'UserManageController@viewAccount');
Route::get('/account/new', 'UserManageController@viewNewAccount');
Route::post('/account/create', 'UserManageController@createAccount');
Route::get('/account/edit/{id}', 'UserManageController@editAccount');
Route::post('/account/update', 'UserManageController@updateAccount');
Route::get('/account/delete/{id}', 'UserManageController@deleteAccount');
Route::get('/account/filter/{id}', 'UserManageController@filterTable');
// > Akses
Route::get('/access', 'AccessManageController@viewAccess');
Route::get('/access/change/{user}/{access}', 'AccessManageController@changeAccess');
Route::get('/access/check/{user}', 'AccessManageController@checkAccess');
Route::get('/access/sidebar', 'AccessManageController@sidebarRefresh');
// ------------------------- Kelola Barang -------------------------
// > Barang
Route::get('/product', 'ProductManageController@viewProduct');
Route::get('/product/new', 'ProductManageController@viewNewProduct');
Route::post('/product/create', 'ProductManageController@createProduct');
Route::post('/product/import', 'ProductManageController@importProduct');
Route::get('/product/edit/{id}', 'ProductManageController@editProduct');
Route::post('/product/update', 'ProductManageController@updateProduct');
Route::get('/product/delete/{id}', 'ProductManageController@deleteProduct');
Route::get('/product/filter/{id}', 'ProductManageController@filterTable');
Route::get('/product/export', 'ProductManageController@exportProduct');
Route::get('/product/print', 'ProductManageController@printProduct');
// > Pasok
Route::get('/supply/system/{id}', 'SupplyManageController@supplySystem');
Route::get('/supply', 'SupplyManageController@viewSupply');
Route::get('/supply/filter/{kode_pasok}', 'SupplyManageController@filterTable');
Route::get('/supply/new', 'SupplyManageController@viewNewSupply');
Route::get('/supply/check/{id}', 'SupplyManageController@checkSupplyCheck');
Route::get('/supply/data/{id}', 'SupplyManageController@checkSupplyData');
Route::post('/supply/create', 'SupplyManageController@createSupply');
Route::post('/supply/import', 'SupplyManageController@importSupply');
Route::get('/supply/statistics', 'SupplyManageController@statisticsSupply');
Route::get('/supply/statistics/product/{id}', 'SupplyManageController@statisticsProduct');
Route::get('/supply/statistics/users/{id}', 'SupplyManageController@statisticsUsers');
Route::get('/supply/statistics/table/{id}', 'SupplyManageController@statisticsTable');
Route::post('/supply/statistics/export', 'SupplyManageController@exportSupply');
Route::get('/supply/search_supplier', 'SupplyManageController@searchSupplier');
Route::post('/supply/export', 'SupplyManageController@excelSupply');
// supplier / pemasok
Route::get('/suppliers', 'SupplierManageController@viewSupplier');
Route::get('/supplier/new', 'SupplierManageController@viewNewSupplier');
Route::get('/supplier/edit/{id}', 'SupplierManageController@editSupplier');
Route::post('/supplier/create', 'SupplierManageController@createNewSupplier');
Route::post('/supplier/update', 'SupplierManageController@updateSupplier');
Route::get('/supplier/delete/{id}', 'SupplierManageController@delete');
Route::get('/supplier/detail/{id}', 'SupplierManageController@viewDetailSupplier');
// ------------------------- Customer -------------------------
Route::get('/customers', 'CustomerManageController@viewCustomer');
Route::get('/customer/new', 'CustomerManageController@viewNewCustomer');
Route::get('/customer/edit/{id}', 'CustomerManageController@editCustomer');
Route::post('/customer/create', 'CustomerManageController@createNewCustomer');
Route::post('/customer/update', 'CustomerManageController@updateCustomer');
Route::get('/customer/delete/{id}', 'CustomerManageController@delete');
Route::get('/customer/detail/{id}', 'CustomerManageController@viewDetailCustomer');
// ------------------------- Payable -------------------------
Route::get('/payable', 'PayableManageController@viewPayable');
Route::post('/payable/update', 'PayableManageController@updatePayable');
Route::get('/payable/edit/{id}', 'PayableManageController@editPayable');
// Route::get('/customer/new', 'CustomerManageController@viewNewCustomer');
// Route::get('/customer/edit/{id}', 'CustomerManageController@editCustomer');
// Route::post('/customer/create', 'CustomerManageController@createNewCustomer');
// Route::post('/customer/update', 'CustomerManageController@updateCustomer');
// Route::get('/customer/delete/{id}', 'CustomerManageController@delete');
// ------------------------- Receivable -------------------------
Route::get('/receivable', 'ReceivableManageController@viewReceivable');
Route::post('/receivable/update', 'ReceivableManageController@updateReceivable');
Route::get('/receivable/edit/{id}', 'ReceivableManageController@editReceivable');
// Route::get('/customer/new', 'CustomerManageController@viewNewCustomer');
// Route::get('/customer/edit/{id}', 'CustomerManageController@editCustomer');
// Route::post('/customer/create', 'CustomerManageController@createNewCustomer');
// Route::post('/customer/update', 'CustomerManageController@updateCustomer');
// Route::get('/customer/delete/{id}', 'CustomerManageController@delete');
// ------------------------- Transaksi -------------------------
Route::get('/transaction/transaction', 'TransactionManageController@viewTransaction');
Route::get('/transaction/transactions/{id}', 'TransactionManageController@viewTransactions');
Route::get('/transaction/pending_transaction', 'TransactionManageController@viewPendingTransaction');
Route::get('/transaction/product/{id}', 'TransactionManageController@transactionProduct');
Route::get('/transaction/customer/{id}', 'TransactionManageController@dataCustomer');
Route::get('/transaction/product/check/{id}', 'TransactionManageController@transactionProductCheck');
Route::post('/transaction/process_paid', 'TransactionManageController@paidTransactionProcess');
Route::post('/transaction/process_payable', 'TransactionManageController@payableTransactionProcess');
Route::post('/transaction/process_tunda_bayar', 'TransactionManageController@pendingTransactionProcess');
Route::get('/transaction/receipt/{id}', 'TransactionManageController@receiptTransaction');
Route::get('transaction/item_search', 'TransactionManageController@searchItem');
Route::get('transaction/customer_search', 'TransactionManageController@searchCustomer');
Route::get('transaction/report_transaction_kasir', 'TransactionManageController@reportTransactionKasir');
Route::get('transaction/report_transaction_kasir/filter', 'TransactionManageController@reportTransactionKasir');
// Route::get('/dotmatrix_formated_receipt', function(){
// return view('dotmatrix_formated_receipt');
// });
// Route::view('/dotmatrix_formated_receipt', 'transaction.dotmatrix_formated_receipt');
// -------------------------- Retur ---------------------------------
Route::get('/retur/retur_customer', 'ReturManageController@viewReturCustomer')->name('retur_customer');
Route::get('/retur/retur_customer/add', 'ReturManageController@viewNewReturCustomer');
Route::get('/retur/retur_customer/detail/{id}/{no_transaksi}', 'ReturManageController@viewDetailReturCustomer');
Route::get('/retur/retur_customer/delete/{id}/{no_transaksi}', 'ReturManageController@deleteReturCustomer');
Route::get('/retur/retur_customer/searchKodeTransaksi', 'ReturManageController@searchKodeTransaksi');
Route::get('/retur/retur_customer/searchKodeTransaksinonppn', 'ReturManageController@searchKodeTransaksinonppn');
Route::get('/retur/retur_customer/searchKodeTransaksiById', 'ReturManageController@searchKodeTransaksiById');
Route::get('/retur/retur_customer/searchKodeTransaksinonppnById', 'ReturManageController@searchKodeTransaksinonppnById');
Route::post('/retur/retur_customer/process', 'ReturManageController@processReturCustomer');
Route::get('/retur/retur_customer/print/{id}/{no_transaksi}', 'ReturManageController@printReturCustomer');
Route::get('/retur/retur_customer/delete_product/{id}', 'ReturManageController@deleteProductReturCustomer');
Route::post('/retur/retur_customer/export', 'ReturManageController@exportReturCustomer');
Route::get('/retur/retur_supplier', 'ReturManageController@viewReturSupplier');
Route::post('/retur/retur_supplier/process', 'ReturManageController@processReturSupplier');
Route::post('/retur/retur_supplier/process_update', 'ReturManageController@processReturSupplierUpdate');
Route::get('/retur/retur_supplier/delete/{id}', 'ReturManageController@deleteReturSupplier');
Route::get('/retur/retur_supplier/print/{id}', 'ReturManageController@printReturSupplier');
Route::get('/retur/retur_supplier/searchSupplier', 'ReturManageController@searchSupplier');
Route::get('retur/retur_supplier/searchProduct', 'ReturManageController@searchProduct');
Route::post('/retur/retur_supplier/export', 'ReturManageController@exportReturSupplier');
// ------------------------- Kelola Laporan -------------------------
Route::get('/report/transaction', 'ReportManageController@reportTransaction');
Route::post('/report/transaction/filter', 'ReportManageController@filterTransaction');
Route::get('/report/transaction/chart/{id}', 'ReportManageController@chartTransaction');
Route::post('/report/transaction/export', 'ReportManageController@exportTransaction');
Route::post('/report/transaction/exportExcel', 'ReportManageController@exportExcelTransaction');
Route::get('/report/workers', 'ReportManageController@reportWorker');
Route::get('/report/workers/filter/{id}', 'ReportManageController@filterWorker');
Route::get('/report/workers/detail/{id}', 'ReportManageController@detailWorker');
Route::post('/report/workers/export/{id}', 'ReportManageController@exportWorker');
Route::get('/report/stok', 'AktivitasUpdateStokController@index');
Route::get('/report/stok/detail/', 'AktivitasUpdateStokController@detail');
Route::get('/report/stok/detail/filter', 'AktivitasUpdateStokController@detail');
Route::get('/report/stok/detail/excel/{id}/{type}/{tgl1}/{tgl2}/{n}', 'AktivitasUpdateStokController@exportExcel');
// ------------------------- Kelola Email -------------------------
Route::get('/transaction/discount_email', 'TransactionManageController@discountEmail');
// ------------------------- AKUN -------------------------
Route::get('/accounting/akun', 'AccountingManageController@viewAkun');
Route::post('/accounting/akun/add', 'AccountingManageController@storeAkun');
Route::post('/accounting/akun/update', 'AccountingManageController@updateAkun');
Route::get('/accounting/akun/delete/{id}', 'AccountingManageController@deleteAkun');
Route::post('/accounting/akun/duplicate', 'AccountingManageController@duplicateAkun');
Route::get('/accounting/akun/data', 'AccountingManageController@dataAkun');
//------------------------- Aktiva --------------------------------
Route::get('/accounting/aktiva_lancar', 'AccountingManageController@viewAktivaLancar');
Route::post('/accounting/aktiva_lancar/add', 'AccountingManageController@addAktivaLancar');
Route::get('/accounting/aktiva_lancar/delete/{id}', 'AccountingManageController@deleteAktivaLancar');
Route::post('/accounting/aktiva_lancar/update', 'AccountingManageController@updateAktivaLancar');
Route::get('/accounting/aktiva_tetap', 'AccountingManageController@viewAktivaTetap');
Route::post('/accounting/aktiva_tetap/add', 'AccountingManageController@addAktivaTetap');
Route::get('/accounting/aktiva_tetap/delete/{id}', 'AccountingManageController@deleteAktivaTetap');
Route::post('/accounting/aktiva_tetap/update', 'AccountingManageController@updateAktivaTetap');
Route::get('/accounting/aktiva_tetap/edit/{id}', 'AccountingManageController@editAktivaTetap');
Route::get('/accounting/laporan_aktiva', 'AccountingManageController@viewLaporanAktiva');
Route::post('/accounting/laporan_aktiva/printexcel', 'AccountingManageController@excelPrintLaporanAktiva');
//------------------------- Laporan Barang -----------------------------
Route::get('/accounting/jurnal_barang_harian', 'AccountingManageController@viewJurnalBarangHarian');
Route::get('/accounting/jurnal_barang_harian/filter', 'AccountingManageController@viewJurnalBarangHarian');
Route::get('/accounting/jurnal_barang_harian/getdata', 'AccountingManageController@getBarangHarian');
Route::get('/accounting/jurnal_barang_bulanan', 'AccountingManageController@viewJurnalBarangBulanan');
Route::get('/accounting/jurnal_barang_hilang', 'AccountingManageController@viewJurnalBarangHilang');
Route::post('/accounting/jurnal_barang_hilang/add', 'AccountingManageController@addProductHilang');
Route::get('/accounting/jurnal_barang_hilang/delete/{id}', 'AccountingManageController@deleteProductHilang');
//------------------------- Laporan Kas -----------------------------
Route::get('/accounting/kas_in', 'AccountingManageController@viewKasIn');
Route::get('/accounting/kas_out', 'AccountingManageController@viewKasOut');
//------------------------- Bank -----------------------------
Route::get('/accounting/bank', 'AccountingManageController@viewBankIn');
Route::post('/accounting/bank/add', 'AccountingManageController@addBank');
Route::get('/accounting/bank/delete/{id}', 'AccountingManageController@deleteBank');
Route::post('/accounting/bank/update', 'AccountingManageController@updateBank');
//------------------------- Laporan Modal -----------------------------
// Route::get('/accounting/modal', 'AccountingManageController@viewModal');
// Route::post('/accounting/modal/add', 'AccountingManageController@addModal');
// Route::get('/accounting/modal/delete/{id}', 'AccountingManageController@deleteModal');
// Route::post('/accounting/modal/update', 'AccountingManageController@updateModal');
//------------------------- Laporan Keuangan -----------------------------
Route::get('/accounting/neraca', 'AccountingManageController@viewNeraca');
Route::get('/accounting/neraca/excel', 'AccountingManageController@excelNeraca');
Route::get('/accounting/neraca/pdf', 'AccountingManageController@pdfNeraca');
Route::get('/accounting/neraca/filter/', 'AccountingManageController@filterNeraca');
Route::get('/accounting/jurnal_harian', 'AccountingManageController@viewJurnalHarian');
Route::get('/accounting/jurnal_harian/filter', 'AccountingManageController@filterJurnalHarian');
Route::get('/accounting/jurnal_harian/export', 'AccountingManageController@exportJurnalHarian');
Route::get('/accounting/jurnal_harian/pdf', 'AccountingManageController@pdfJurnalHarian');
Route::get('/accounting/buku_besar', 'AccountingManageController@viewBukuBesar');
Route::get('/accounting/buku_besar/excel', 'AccountingManageController@excelBukuBesar');
Route::get('/accounting/buku_besar/pdf', 'AccountingManageController@pdfBukuBesar');
Route::get('/accounting/buku_besar/tahun', 'AccountingManageController@tahunBukuBesar');
Route::get('/accounting/laba_rugi', 'AccountingManageController@viewLabaRugi');
Route::get('/accounting/laba_rugi/filter', 'AccountingManageController@filterLabaRugi');
Route::get('/accounting/laba_rugi/excel', 'AccountingManageController@excelLabaRugi');
Route::get('/accounting/laba_rugi/pdf', 'AccountingManageController@pdfLabaRugi');
});
// Auth::routes();
// Route::get('/home', 'HomeController@index')->name('home');