mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
update check duplicate refunds
This commit is contained in:
+5
-3
@@ -1162,9 +1162,11 @@ Route::get('check-duplicate-refunds', function () {
|
|||||||
$booking_ref_click = '<a href="'.route('booking.details', $booking_ref).'" target="_blank">'.$booking_ref.'</a>';
|
$booking_ref_click = '<a href="'.route('booking.details', $booking_ref).'" target="_blank">'.$booking_ref.'</a>';
|
||||||
|
|
||||||
$booking = Booking::where('marking', $booking_ref)->first();
|
$booking = Booking::where('marking', $booking_ref)->first();
|
||||||
$payment = $booking->transactions()->where('type', TransactionType::PAYMENT)->first();
|
if ($booking) {
|
||||||
$refund = $payment->transactions()->where('type', TransactionType::REFUND)->get()->pluck('id')->toArray();
|
$payment = $booking->transactions()->where('type', TransactionType::PAYMENT)->first();
|
||||||
$refund = implode(',', $refund);
|
$refund = $payment->transactions()->where('type', TransactionType::REFUND)->get()->pluck('id')->toArray();
|
||||||
|
$refund = implode(',', $refund);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "<td style='border: 1px solid black;'>$booking_ref_click</td>";
|
echo "<td style='border: 1px solid black;'>$booking_ref_click</td>";
|
||||||
echo "<td style='border: 1px solid black;'>" . ($payment ? $payment->id : '') . "</td>";
|
echo "<td style='border: 1px solid black;'>" . ($payment ? $payment->id : '') . "</td>";
|
||||||
|
|||||||
Reference in New Issue
Block a user