@extends('admin.layout.master') @section('custom_style') @endsection @section('content') @include('flash-message')
{{ __('obs.edit') }} {{ __('obs.advance') }} {{ __('obs.voucher') }}
{{ __('obs.advance') }} {{ __('obs.voucher') }} {{ __('obs.list') }}
@csrf @method('PUT')
get_invoice_other_info)) null @else style="display: none" @endif> @error('check_date') {{ $message }} @enderror
get_invoice_other_info)) null @else style="display: none" @endif> @error('cheque_or_transaction_number') {{ $message }} @enderror
@php $i = 0 @endphp @foreach ($hotels as $hotel) @php $i++; $advance_deducted_amount = 0; $remaining_amount = 0; $data = $advance->where('warehouse_id', $hotel->id)->first(); $reservation_id = $data ? ($data->reservation_id ? $data->reservation_id : null) : null; $amount = $data ? $data->amount : null; if ($amount) { $advance_history = resevationHistory_multi_warehouse(null, null, $data->fd_invoice_id, [$hotel->id]); $advance_refund = $advance_history['advance_refund']; $after_refund_advance = $amount - $advance_refund->sum('amount'); $advance_deduct = $advance_history['advance_deduct']; $advance_deducted_amount = count($advance_deduct) > 0 ? $advance_deduct->sum('amount') : 0; $remaining_amount = $after_refund_advance - $advance_deducted_amount; } // dd($advance_deducted_amount); // $remaining_amount = $after_refund_advance - (count($advance_deduct)> 0 ? $advance_deduct->sum('amount'): null); // dd($advance); @endphp @endforeach
{{ __('obs.sl') }} {{ __('obs.hotel') }} {{ __('obs.name') }} {{ __('obs.reservation') }} {{ __('obs.total_amount') }} {{ __('obs.adjust') }} {{ __('obs.remain') }} {{ __('obs.amount') }} : {{ $advance_debit->amount }}
{{ $i }} {{ $hotel->name_eng }}
{{ $amount }} {{ $advance_deducted_amount }} {{ $remaining_amount }}
@endsection @section('script') @endsection