diff --git a/routes/booking.php b/routes/booking.php
index 44767438..d83bb4af 100644
--- a/routes/booking.php
+++ b/routes/booking.php
@@ -31,4 +31,5 @@ Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Booking
Route::post('/merge', 'MergeBookingController@merge')->name('merge');
Route::post('{id}/proforma/create', 'CreateProformaInvoiceTransaction@create')->name('proforma.create');
+
});
\ No newline at end of file
diff --git a/routes/document.php b/routes/document.php
index 12419c9e..c186032f 100644
--- a/routes/document.php
+++ b/routes/document.php
@@ -4,6 +4,9 @@ use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'document', 'as' => 'document.', 'namespace' => 'Documents'], function () {
Route::get('/list', 'ListDocumentsController@list')->name('list');
+ Route::delete('/{id}/delete', 'DeleteDocumentController@delete')->name('delete');
Route::put('/{id}/approve', 'ApproveDocumentController@approve')->name('status.approve');
Route::put('/{id}/reject', 'RejectDocumentController@reject')->name('status.reject');
+
+ Route::put('/{id}/reference/update', 'UpdateDocumentReferenceController@update')->name('reference.update');
});
\ No newline at end of file
diff --git a/routes/transaction.php b/routes/transaction.php
index 17502743..578b02c2 100644
--- a/routes/transaction.php
+++ b/routes/transaction.php
@@ -10,6 +10,8 @@ Route::group(['prefix' => 'transactions', 'namespace' => 'Transactions', 'as' =>
route::post('/supplier/{id}/bill/create', 'CreateSupplierTransactionController@create')->name('supplier.create');
route::post('{id}/bill/verification', 'CreatePaymentProofDocumentController@verify')->name('bill.verification');
route::post('{id}/bill/pay', 'CreatePaymentProofDocumentController@pay')->name('bill.pay');
+ Route::put('/{id}/bill/{status}', 'UpdatePaymentTransactionStatusController@update')->where('status', 'pending|complete')->name('bill.status');
+
route::delete('{id}/bill/delete', 'DeletePaymentProofDocumentController@delete')->name('bill.delete');
Route::post('booking/{id}/details/update', 'CreatePurchaseOrderTransactionController@create')->name('po.create');
diff --git a/routes/wallet.php b/routes/wallet.php
index 7ad2a479..123f36d6 100644
--- a/routes/wallet.php
+++ b/routes/wallet.php
@@ -5,8 +5,9 @@ use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'wallets', 'namespace' => 'Wallets', 'as' => 'wallet.'], function () {
Route::get('/', 'ListWalletController@list')->name('list');
Route::post('/create', 'CreateWalletController@create')->name('create');
- Route::post('/topup', 'TopUpWalletController@topUp')->name('topup');
- Route::post('/withdraw', 'WithdrawWalletController@withdraw')->name('withdraw');
- Route::put('/{transaction_id}/update-status/{status}', 'UpdateStatusWalletController@updateStatus')->where('status', 'approve|reject')->name('approval');
+ 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');
});
diff --git a/routes/web.php b/routes/web.php
index 4e63cede..e26ef4d8 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -112,4 +112,65 @@ Route::get('/fix_bills', function () {
});
-})->name('products.random');
\ No newline at end of file
+})->name('products.random');
+//Route::get('/duplicated_bills', function (Request $request) {
+// Auth()->login(User::find(1));
+// $bookings = Booking::whereIn('id', [10391, 10275, 10109, 10108, 10070, 10066, 10063, 9801, 9166, 8895, 8790, 8544, 8264, 6957, 5409, 4717])->with('transactions')->pluck('marking');
+// dd($bookings);
+//
+//})->name('x2.data');
+Route::get('/wallet/{marking}/details', function ($marking) {
+ $id = \App\Models\Company::where('reference', '=', $marking)->first()->id;
+ return view('pages.wallet.index', ['id' => $id]);
+})->name('wallet.details');
+
+Route::get('/wallets', function () {
+ return view('pages.wallet.wallets');
+})->name('wallet.wallets');
+
+Route::get('/test', function(){
+
+// Auth::login(User::findOrFail(1));
+// try {
+// $zip_file = 'cief_jun_to_september_delivery_orders.zip'; // Name of our archive to download
+// $zip = new ZipArchive();
+// if ($zip->open(storage_path().'/'.$zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) === TRUE) {
+//
+// //whereMonth('created_at', 5)->whereYear('created_at', 2021)->
+// $bookings = \App\Models\Booking::where('status', \App\Classes\ValueObjects\Constants\ApprovalStatus::COMPLETED)->get();
+//
+// foreach ($bookings as $booking) {
+// $file = $booking->documents()->where('document_type', \App\Classes\ValueObjects\Constants\DocumentType::SUPPLIER_DELIVER_ORDER)->first()->files()->first();
+// if (! $zip->addFile(Storage::disk('documents')->path($file->file->file_info->original->file), Carbon::now()->format('d_m_Y').'_'.$booking->marking.'.pdf')) {
+// echo 'Could not add file to ZIP: ' . $file;
+// }
+// }
+//
+// // Close ZipArchive
+// $zip->close();
+// } else {
+// echo 'Could not open ZIP file.';
+// }
+// } catch (Exception $exception) {
+// dd($exception);
+// }
+
+
+});
+Route::get('/bookings/billplz', function () {
+ return view('pages.billplz_redirect');
+})->name('bookings.billplz');
+
+Route::get('billplz/bills/{bill_no}', function($bill_no){
+ return redirect(env('BILLPLZ_BASE_URL').'/bills/'.$bill_no);
+})->name('billplz.bill');
+
+
+Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');
+Route::get('/export/transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@transactions');
+
+Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {
+ return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
+})->name('products.random');
+
+Route::get('/auto-purchase-order-fill', 'Bookings\AutoPurchaseOrderFillController@auto')->name('assign');