mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
migrate wallets and create function for regenerates invoice
This commit is contained in:
@@ -62,6 +62,8 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
|
||||
|
||||
require __DIR__ . '/report.php';
|
||||
|
||||
require __DIR__ . '/wallet.php';
|
||||
|
||||
});
|
||||
|
||||
require __DIR__ . '/announcement.php';
|
||||
|
||||
@@ -16,6 +16,7 @@ Route::group(['prefix' => 'transactions', 'namespace' => 'Transactions', 'as' =>
|
||||
|
||||
Route::group(['prefix' => 'invoice', 'as' => 'invoice.'], function () {
|
||||
route::post('/shipping-invoice/create', 'CreateShippingInvoiceTransactionController@create')->name('create');
|
||||
route::post('/shipping-invoice/company/{company_module_id}/regenerate', 'RegenerateShippingInvoiceTransactionController@regenerate')->name('company.regenerate');
|
||||
route::put('/shipping-invoice/{id}/update', 'UpdateShippingInvoiceTransactionController@update')->name('update');
|
||||
route::put('/shipping-invoice/{id}/approve', 'ApproveShippingInvoiceTransactionController@approve')->name('approve');
|
||||
});
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group(['prefix' => 'wallets', 'namespace' => 'Wallets', 'as' => 'wallet.'], function () {
|
||||
Route::get('/', 'ListWalletController@list')->name('list');
|
||||
|
||||
Route::get('/company-module/{company_module_id}', 'FetchWalletByCompanyModuleController@fetch')->name('company_module.show');
|
||||
|
||||
Route::post('/create', 'CreateWalletController@create')->name('create');
|
||||
|
||||
Route::post('/topup', 'TopUpWalletController@topUp')->name('topup'); // user
|
||||
Route::post('/credit', 'CreditWalletController@credit')->name('credit'); // admin +
|
||||
|
||||
Route::put('/{transaction_id}/update-status/{status}', 'UpdateStatusWalletController@updateStatus')->where('status', 'approve|reject')->name('approval');
|
||||
|
||||
Route::get('/reports', 'WalletReportController@walletsReport')->name('reports');
|
||||
});
|
||||
@@ -955,3 +955,10 @@ Route::get('/packing-lists/delete-duplicated', function(Request $request){
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Route::get('/wallet/{marking}/details', function ($marking) {
|
||||
$connection = CompanyConnection::where('invitee_reference', $marking)->first();
|
||||
$id = $connection->invitee->id;
|
||||
return view('pages.wallet.index', ['id' => $id]);
|
||||
})->name('wallet.details');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user