<?php

use Illuminate\Support\Facades\Route;

Route::group(['prefix' => 'accounting', 'as' => 'accounting.', 'namespace' => 'Accounting'], function () {
    Route::post('/import', 'BankStatementController@import')->name('statement.import');
    Route::get('/bank_account', 'BankStatementController@transactions')->name('bank.transaction');
    Route::group(['prefix' => 'statements/{id}', 'as' => 'statement.'], function () {
        Route::get('/details', 'BankStatementController@fetch')->name('details');
        Route::put('/details/update', 'BankStatementController@update')->name('details.update');
    });

    Route::post('bankStatement/{id}/details/{status}', 'ApproveDuplicateBankStatementDetailsStatusController@update')->where('status', 'approve|reject|pending_verification')->name('bankStatement.details.status.update');

    Route::group(['prefix' => 'statement_transaction', 'as' => 'statement_transaction.'], function () {
        Route::post('/owner/group-approve', 'GroupApproveStatementTransactionController@approve')->name('owner.groupApprove');
        Route::post('/{id}/owner/{status}', 'UpdateStatementTransactionStatusController@update')->where('status', 'approve|reject')->name('owner.status.update');
    });
});
