manual payments list

This commit is contained in:
omair saleh
2022-08-24 16:21:18 +08:00
parent d0c64f30f2
commit 85c19266f8
+3
View File
@@ -364,9 +364,12 @@ Route::get('/wallets/active', function(){
Route::get('/payments/manual', function(){
$payments = Transaction::where('type', TransactionType::PAYMENT)->whereIn('payment_method', [\App\Classes\ValueObjects\Constants\PaymentMethodType::CASH, \App\Classes\ValueObjects\Constants\PaymentMethodType::BA, \App\Classes\ValueObjects\Constants\PaymentMethodType::CHEQUE])->where('owner_type', Booking::class)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
$i = 0;
echo '<table>';
foreach ($payments as $payment){
$i++;
echo '<tr>';
echo '<td>'.$i.'</td>';
echo '<td>'.$payment->documents()->first() ? $payment->documents()->first()->created_at : 'not sure: '.$payment->created_at.'</td>';
echo '<td><a href="'.route('booking.details', $payment->owner->marking).'" target="_blank">'.$payment->owner->marking.'</a></td>';
echo '<td>'.$payment->amount.'</td>';