@extends('admin.layout.master') @section('custom_style') @endsection @section('content') @include('flash-message')
@if ($errors->any())
@endif
Receipt
Received From Agent/Local
{{ Form::open(['route' => ['frontdesk.receipt.list'], 'method' => 'get', 'class' => 'form-horizontal', 'enctype' => 'multipart/form-data']) }}
{{--
@error('customer_id') {{ $message }} @enderror
--}} {{--
{{ Form::select('package_type_id', $repository->package_types(), null, ['class' => 'form-control select2', 'id' => 'package_type', 'placeholder' => 'Select Package Type']) }} @error('package_type_id') {{ $message }} @enderror
--}} {{--
--}}
{{ 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']) }} @error('start_date') {{ $message }} @enderror
{{ Form::text('end_date', request()->end_date ? date('d-m-Y', strtotime(request()->end_date)) : date('d-m-Y'), ['class' => 'form-control date_picker', 'id' => 'end_date']) }} @error('end_date') {{ $message }} @enderror
{{ Form::close() }}
Receipt List
@php $i = 0 @endphp @foreach ($receipt_lists as $reservation=>$reservation_list) @foreach ($reservation_list as $invoice=>$invoice_list) @php $i++ @endphp {{-- --}} {{-- --}} @endforeach @endforeach
SL Pay Mode Voucher No Commission Discount Amount Date Action
{{ $i }} @foreach ($invoice_list as $list) {{-- @dd($list) --}} {{-- {{ getCashBank()->where('account_id',$list->ledger_id)->first() ? getCashBank()->where('account_id',$list->ledger_id)->first()->name_eng : null }} --}} {{ $list ? ($list->cash_bank ? $list->cash_bank->name_eng : null) : null }} @endforeach {{$invoice_list->first()->fd_invoice ? $list->fd_invoice->invoice_no : null}} @foreach ($invoice_list as $list) @if($list->ledger_id == getInitDataWithKeyWord('commission')->ledger_id) {{ $list->amount}} @endif @endforeach @foreach ($invoice_list as $list) @if($list->ledger_id == getInitDataWithKeyWord('discount')->ledger_id) {{ $list->amount}} @endif @endforeach @foreach ($invoice_list as $list) @if($list->ledger_id != getInitDataWithKeyWord('discount')->ledger_id && $list->ledger_id != getInitDataWithKeyWord('commission')->ledger_id) {{ $list->amount}} @endif @endforeach {{ carbon()->parse($invoice_list->first()->date)->format('d-m-Y') }}   Details
Total {{$receipt_lists->collapse()->collapse()->sum('amount')}}
@endsection @section('script') @endsection