@extends('layouts.admin') @push('css') @endpush @section('content')
@include('admin.withdraw.withdraw_report_topbar')
Multiple Withdraw Request
@csrf
@if ($errors->has('issue_date')) {{ $errors->first('issue_date') }} @endif
@if ($errors->has('cheque_bank_id')) {{ $errors->first('cheque_bank_id') }} @endif
@if ($errors->has('type')) {{ $errors->first('type') }} @endif
@php $total = 0; @endphp @foreach($statements as $key => $user_id) @php $transactions = model('Transaction')::with('agent')->whereIn('for_report', ['agent_commission','agent_investment']) ->where('agent_id', $user_id)->where('amount' , '>', '0') ->where('type', 'Monthly Business Profit') ->whereDate('trans_date', '=', \Carbon\Carbon::now()->startOfMonth()) ->get(); $user = \App\Models\User::find($user_id); $total = $transactions->sum('amount'); @endphp @if(!empty($user)) @endif @endforeach
Sl. Name Amount
{{ $key+1 }} {{ @$transactions[0]->agent->name }} ({{ @$transactions[0]->agent->user_id }}) {{ $total }}
@push('alljs') @endpush @endsection