mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
show-booking-expired for debug payment not showing
This commit is contained in:
@@ -44,13 +44,13 @@ class Kernel extends ConsoleKernel
|
|||||||
->appendOutputTo(storage_path().'/logs/delete-bulk-download-files.log')
|
->appendOutputTo(storage_path().'/logs/delete-bulk-download-files.log')
|
||||||
->withoutOverlapping();
|
->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('booking:expired')
|
// $schedule->command('booking:expired')
|
||||||
->dailyAt('02:00')
|
// ->dailyAt('02:00')
|
||||||
->withoutOverlapping();
|
// ->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('purchaseOrder:autoFill')
|
// $schedule->command('purchaseOrder:autoFill')
|
||||||
->dailyAt('03:00')
|
// ->dailyAt('03:00')
|
||||||
->withoutOverlapping();
|
// ->withoutOverlapping();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -872,6 +872,8 @@ Route::get('/transfer/{marking}/payment-details', function ($marking) {
|
|||||||
|
|
||||||
$transactions = $booking->transactions()->withTrashed()->get();
|
$transactions = $booking->transactions()->withTrashed()->get();
|
||||||
|
|
||||||
|
$paymentMethods = PaymentMethodType::PAYMENT_METHODS_ID;
|
||||||
|
|
||||||
$statusLabels = [
|
$statusLabels = [
|
||||||
0 => 'PAYMENT_ATTEMPT',
|
0 => 'PAYMENT_ATTEMPT',
|
||||||
1 => 'PAYMENT',
|
1 => 'PAYMENT',
|
||||||
@@ -898,6 +900,7 @@ Route::get('/transfer/{marking}/payment-details', function ($marking) {
|
|||||||
echo '<th>Amount</th>';
|
echo '<th>Amount</th>';
|
||||||
echo '<th>Type</th>';
|
echo '<th>Type</th>';
|
||||||
echo '<th>Status</th>';
|
echo '<th>Status</th>';
|
||||||
|
echo '<th>Payment Method</th>';
|
||||||
echo '<th>Created At</th>';
|
echo '<th>Created At</th>';
|
||||||
echo '<th>Deleted At</th>';
|
echo '<th>Deleted At</th>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@@ -910,6 +913,7 @@ Route::get('/transfer/{marking}/payment-details', function ($marking) {
|
|||||||
echo '<td>' . $transaction->amount . '</td>';
|
echo '<td>' . $transaction->amount . '</td>';
|
||||||
echo '<td>' . $statusLabels[$transaction->type] . '</td>';
|
echo '<td>' . $statusLabels[$transaction->type] . '</td>';
|
||||||
echo '<td>' . $ApprovalStatus [$transaction->status] . '</td>';
|
echo '<td>' . $ApprovalStatus [$transaction->status] . '</td>';
|
||||||
|
echo '<td>' . $paymentMethods [$transaction->payment_method] . '</td>';
|
||||||
echo '<td>' . $transaction->created_at . '</td>';
|
echo '<td>' . $transaction->created_at . '</td>';
|
||||||
echo '<td>' . $transaction->deleted_at . '</td>';
|
echo '<td>' . $transaction->deleted_at . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@@ -917,4 +921,70 @@ Route::get('/transfer/{marking}/payment-details', function ($marking) {
|
|||||||
|
|
||||||
echo '</tbody>';
|
echo '</tbody>';
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
|
||||||
|
echo '<br>';
|
||||||
|
echo '<td><a href="'.route('wallet.details', $booking->company->reference).'" target="_blank">Wallet Details</a></td>';
|
||||||
|
|
||||||
|
})->name('booking.details.transactions');
|
||||||
|
|
||||||
|
Route::get('show-booking-expired', function () {
|
||||||
|
$transactions = Transaction::where('type', TransactionType::PAYMENT)
|
||||||
|
->where('status', ApprovalStatus::EXPIRED)
|
||||||
|
->whereDate('updated_at', '>=', '2024-02-16')
|
||||||
|
->orderBy('updated_at', 'desc')
|
||||||
|
->get();
|
||||||
|
// print_r(count($transactions));
|
||||||
|
|
||||||
|
|
||||||
|
$statusLabels = [
|
||||||
|
0 => 'PAYMENT_ATTEMPT',
|
||||||
|
1 => 'PAYMENT',
|
||||||
|
2 => 'INVOICE',
|
||||||
|
3 => 'BILL',
|
||||||
|
4 => 'PROFORMA',
|
||||||
|
5 => 'TOP_UP',
|
||||||
|
6 => 'REFUND',
|
||||||
|
7 => 'PURCHASE_ORDER',
|
||||||
|
8 => 'SUPPLIER_DELIVER',
|
||||||
|
9 => 'CREDIT_NOTE',
|
||||||
|
10 => 'WITHDRAW',
|
||||||
|
11 => 'DEBIT_NOTE',
|
||||||
|
12 => 'TRANSFER_FEE',
|
||||||
|
13 => 'CASH_BACK',
|
||||||
|
];
|
||||||
|
|
||||||
|
$ApprovalStatus = ApprovalStatus::APPROVAL_STATUS_ID;
|
||||||
|
|
||||||
|
echo '<table border="1" width="100%">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<th>Counter</th>';
|
||||||
|
echo '<th>ID</th>';
|
||||||
|
echo '<th>Booking</th>';
|
||||||
|
echo '<th>Payments</th>';
|
||||||
|
echo '<th>Amount</th>';
|
||||||
|
echo '<th>Type</th>';
|
||||||
|
echo '<th>Status</th>';
|
||||||
|
echo '<th>Updated At</th>';
|
||||||
|
echo '</tr>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
$counter = 1;
|
||||||
|
|
||||||
|
foreach ($transactions as $transaction) {
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td>' . $counter++ . '</td>';
|
||||||
|
echo '<td>' . $transaction->id . '</td>';
|
||||||
|
echo '<td>' . '<a href="'.route('booking.details', $transaction->owner->marking).'" target="_blank">'.$transaction->owner->marking.'</a>' . '</td>';
|
||||||
|
echo '<td>' . '<a href="'.route('booking.details.transactions', $transaction->owner->marking).'" target="_blank">Payments</a>' . '</td>';
|
||||||
|
echo '<td>' . $transaction->amount . '</td>';
|
||||||
|
echo '<td>' . $statusLabels[$transaction->type] . '</td>';
|
||||||
|
echo '<td>' . $ApprovalStatus [$transaction->status] . '</td>';
|
||||||
|
echo '<td>' . $transaction->updated_at . '</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</tbody>';
|
||||||
|
echo '</table>';
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user