@extends('admin.layout.master') @section('title', 'Agent Advance List') @section('custom_style') @endsection @section('content') @include('flash-message')
Agent Advance List
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{ Form::open(['route' => ['frontdesk.receipt.agent_advance_list'], 'method' => 'get', 'class' => 'form-horizontal', 'enctype' => 'multipart/form-data']) }}
Customer List
Date From
{{ Form::text('start_date', request()->start_date?date('d-m-Y', strtotime(request()->start_date)):date('d-m-Y'), ['class' => 'form-control date_picker', 'id' => 'start_date']) }}
Date To
{{ Form::text('end_date', request()->start_date?date('d-m-Y', strtotime(request()->start_date)):date('d-m-Y'), ['class' => 'form-control date_picker', 'id' => 'end_date']) }}
{{ Form::close() }}
@if ($agent_advance_lists) @if (count($agent_advance_lists) > 0)

Agent Advance List

@php $i = 1;@endphp @foreach ($agent_advance_lists as $list) {{-- @dd(resevationHistory(null,null,$list->id)['advance_deduct']->sum('amount')) --}} @php $advance_refund = resevationHistory(null,null,$list->fd_invoice_id)['advance_refund']; $after_fefund_advance = $list->amount - $advance_refund->sum('amount'); $advance_adjusted = resevationHistory(null,null,$list->fd_invoice_id)['advance_deduct']->sum('amount'); // dd($list); $remaining_amount = $after_fefund_advance - $advance_adjusted ; @endphp @endforeach
SL Agent Received By Voucher No Amount Adjusted Amount Remaining Amount Date Time Details
{{$i++}} {{party_name($list->party_id)}} {{user_name($list->created_by)}} {{$list->fd_invoice->invoice_no}} {{$after_fefund_advance}} {{$advance_adjusted}} {{$remaining_amount}} {{$list->date}} {{-- @if($advance_adjusted > 0) @endif --}}
@else

No Data Found

@endif @endif @endsection @section('script') @endsection