manual payments list

This commit is contained in:
omair saleh
2022-08-24 16:20:29 +08:00
parent 66bc339db2
commit d0c64f30f2
+2 -2
View File
@@ -362,12 +362,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)->get();
$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();
echo '<table>';
foreach ($payments as $payment){
echo '<tr>';
// echo '<td>'.$payment->documents()->first() ? $payment->documents()->first()->created_at : 'not sure: '.$payment->created_at.'</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>';
echo '</tr>';