mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
refactor: adding remarks
This commit is contained in:
+14
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
use App\Classes\Modules\Transactions\Processors\CreateInvoiceTransactionProcessor;
|
||||
use App\Http\Controllers\Accounting\BankStatementController;
|
||||
use App\Models\Remark;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\User;
|
||||
use App\Models\Wallet;
|
||||
@@ -969,10 +970,18 @@ Route::get('/invoice/{marking}/{started_at}/{ended_at}/fix', function($marking,
|
||||
);
|
||||
})->name('invoice.fix.byCustomerMarking');
|
||||
|
||||
require __DIR__.'/remark.php';
|
||||
route:: post('/transaction/{id}/create-remark',function ($transactionId) {
|
||||
$transaction = Transaction::find($transactionId);
|
||||
$remark = new Remark();
|
||||
$remark->content = request('content');
|
||||
$remark->transaction_id;
|
||||
$remark->save();
|
||||
return redirect()->back();
|
||||
})->name('transaction.create-remark');
|
||||
|
||||
Route::get('/show-white-form-transactions-in-date-range/{from_date}/{to_date}', function ($from_date, $to_date) {
|
||||
|
||||
|
||||
$approvedTransactions = Transaction::where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED])->where('owner_type', '!=', Wallet::class)->orderBy('status')->get();
|
||||
|
||||
echo '<h1>Pending Orders Payments</h1>';
|
||||
@@ -997,9 +1006,10 @@ Route::get('/show-white-form-transactions-in-date-range/{from_date}/{to_date}',
|
||||
echo '<td style="border: 1px solid black;">' . ApprovalStatus::APPROVAL_STATUS_ID[$approvedTransaction->status] . '</td>';
|
||||
echo '<td style="border: 1px solid black;">' . $approvedTransaction->remarks . '</td>';
|
||||
echo '<td style="border: 1px solid black;">' ;
|
||||
echo '<form method="post" action="' . route('remark.create', ['id' => $approvedTransaction->id]) . '">';
|
||||
echo '<form method="post" action="' . route('transaction.create-remark', ['id' => $approvedTransaction->id]) . '">';
|
||||
echo '<input type="text" name="content" placeholder="Enter remark">';
|
||||
echo '<button type="submit">Add Remark</button>';
|
||||
echo csrf_field();
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
@@ -1048,4 +1058,6 @@ Route::get('/show-white-form-transactions-in-date-range/{from_date}/{to_date}',
|
||||
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user