@extends('admin.layout.master') @section('custom_style') @endsection @section('content') @include('flash-message')
@if ($errors->any())
@endif
{{ __('obs.cashier') }} {{ __('obs.handover') }}
{{--
{{ __('obs.reporting') }} {{ __('obs.date') }}: {{ carbon()->parse()->format('d-m-Y') }}
{{ __('obs.opening') }} {{ __('obs.received') }} {{ __('obs.payment') }} {{ __('obs.refund') }} {{ __('obs.balance') }}
{{ $summary['opening_balance'] }} {{ $summary['received'] }} {{ $summary['handovered'] }} {{ $summary['refund'] }} {{ $summary['balance'] }}
@if (!user_default_cash_id(active_user()))
@endif
--}}
{{-- style="display: none" --}}
@csrf

{{ __('obs.collection') }} {{ __('obs.details') }}

{{-- --}} @if (!empty($user_collection_details)) @php $i = 1; @endphp @foreach ($user_collection_details as $party_id => $agent_wise_collection) @php $agent_total_receive_amount = 0; $agent_total_refund = 0; $agent_total_balance= 0; @endphp @foreach ($agent_wise_collection as $reservaion_id => $data) @php $received = $data->whereIn('voucher_type', [1, 4])->where('ledger_id','<>',getInitDataWithKeyWord('discount')->ledger_id)->where('ledger_id','<>',getInitDataWithKeyWord('commission')->ledger_id)->sum('amount'); $refund = round($data->whereIn('voucher_type', [5])->sum('amount'), 2); $discount = $data->whereIn('ledger_id',[591])->sum('amount'); $after_discount = $received - $discount; $agent_total_receive_amount += $after_discount; $agent_total_refund += $refund; $agent_total_balance += ($after_discount - $refund); @endphp {{-- @dd($data->first()->reservation->get_agent_info) --}} {{-- --}} {{-- --}} @endforeach @endforeach @endif
#{{ __('obs.sl') }} {{ __('obs.checkin') }}/{{ __('obs.resv') }} {{ __('obs.date') }} {{ __('obs.checkout') }} {{ __('obs.date') }} {{ __('obs.resv') }} {{ __('obs.no') }} {{ __('obs.checkin') }} {{ __('obs.no') }}{{ __('obs.party') }} {{ __('obs.name') }}{{ __('obs.received') }} {{ __('obs.refund') }} {{ __('obs.check_box') }} 
{{party_name($party_id)}}
{{ $i++ }} {{ $data->first()->reservation? ($data->first()->reservation->check_in_date? carbon()->parse($data->first()->reservation->check_in_date)->format('d-m-Y'): date('d-m-Y', strtotime($data->first()->reservation->date))): null }} {{ $data->first()->reservation? ($data->first()->reservation->check_in_date? carbon()->parse($data->first()->reservation->check_out_date)->format('d-m-Y'): ''): null }} {{ $data->first()->reservation ? $data->first()->reservation->resv_code : null }} {{ $data->first()->reservation ? $data->first()->reservation->checkin_code : null }} {{ $data->first()->reservation ? $data->first()->reservation->get_agent_info->name_eng : party_name($data->first()->party_id) }} {{$after_discount}} {{ $refund }} @php $amount_after_refund = $data['user_received'] - $data['refund']; @endphp
{{-- --}}
{{ __('obs.agent') }} {{ __('obs.total') }} {{$agent_total_receive_amount}} {{$agent_total_refund}} {{$agent_total_balance}}
{{ __('obs.grand_total') }} {{ $total_received }} {{ $total_refund }} {{ __('obs.balance') }}: {{ $balance }}
@error('note') {{ $message }} @enderror
{{ __('obs.handover') }} {{ __('obs.to') }} {{ __('obs.cashier') }}
@error('user_id') {{ $message }} @enderror

{{ __('obs.handover') }} {{ __('obs.request_list_of_date') }}: {{ carbon()->parse()->format('d-m-Y') }}

@foreach ($user_handover_list as $invoice => $request_list) @php $sender = App\Models\Frontdesk\FdInvoiceDetails::where('fd_invoice_id', $invoice) ->where('type', 1) ->first(); $sent_to = App\Models\Frontdesk\FdInvoiceDetails::where('fd_invoice_id', $invoice) ->where('type', 0) ->first(); // dd($sender); @endphp @endforeach
{{ __('obs.hotel') }} {{ __('obs.sender') }} {{ __('obs.sent_to') }} {{ __('obs.amount') }} {{ __('obs.date') }} {{ __('obs.action') }}
{{ $request_list->first()->warehouse_id ? get_warehouse_name($request_list->first()->warehouse_id) : null }} {{ user_name($sender->cashier_id) }} {{ user_name($sent_to->cashier_id) }} {{ $request_list->sum('amount') }} {{ carbon()->parse($request_list->first()->date)->format('d-m-Y h:m:i A') }} {{ __('obs.details') }} || {{-- {{$request_list->first()->status == 2 ? "Accept" : null }} || --}} @if ($request_list->first()->type == 1) {{ __('obs.pending') }} || @else {{ __('obs.accept') }} {{-- {{$request_list->first()->status == 2 ? "Accept" :null }} || --}} @endif {{ __('obs.reject') }}
{{--

{{ __('obs.request_list_from') }} {{ __('obs.accounts') }}

@foreach ($receive_from_accounts as $voucher => $request_list) @php $admin_id = $request_list->first()->voucher->created_by; $senderName = App\Models\Admin\Admin::where('id', $admin_id)->first()->name; @endphp @endforeach
{{ __('obs.sender') }} {{ __('obs.type') }} {{ __('obs.amount') }} {{ __('obs.date') }} {{ __('obs.action') }}
{{ $senderName }} @if ($request_list->first()->voucher->type == 1) {{ 'Cash Payment' }} @elseif ($request_list->first()->voucher->type == 2) {{ 'Bank Payment' }} @elseif ($request_list->first()->voucher->type == 3) {{ 'Cash Receive' }} @else {{ 'Bank Receive' }} @endif {{ $request_list->sum('amount') }} {{ carbon()->parse($request_list->first()->date)->format('d-m-Y h:m:i A') }} {{ __('obs.accept') }}
--}} @endsection @section('script') @endsection