@extends('layouts.master') @section('content')
View {{ $voucherDetails->voucher_type }}

View {{ $voucherDetails->voucher_type }} Back to {{ $voucherDetails->voucher_type }} List

@php $items = json_decode($vou_other_detail->adaegi_array ?? '[]', true); $ids = collect($items)->pluck('adaegi_khata')->filter()->unique()->toArray(); $customers = \App\Customer::whereIn('id_customers', $ids) ->pluck('customer_name', 'id_customers'); @endphp @if(count($ids))
Customers: @foreach ($ids as $id) {{ $customers[$id] ?? 'ID#' . $id }} @endforeach
@endif
Details: {{ $vou_other_detail->voucher_details ?? 'N/A' }}
Voucher Number:
{{ $voucherDetails->voucher_number }}
Voucher Date:
{{ \Carbon\Carbon::parse($voucherDetails->created_at)->format('d-m-Y') }}
Payment Mode: {{ ucfirst($vou_other_detail->payment_mode ?? 'N/A') }}

@php $showChequeDetails = $accountVouchers->contains(function ($voucher) { return $voucher->voucher_chqno || $voucher->voucher_chqdate || $voucher->voucher_depdate || $voucher->voucher_depslipno; }); @endphp @if ($showChequeDetails)

Cheque Details

@foreach ($accountVouchers as $voucher) @if ($voucher->voucher_chqno || $voucher->voucher_chqdate || $voucher->voucher_depdate || $voucher->voucher_depslipno) @endif @endforeach
Cheque No Cheque Date Deposit Date Deposit Slip No
{{ $voucher->voucher_chqno ?? 'N/A' }} {{ $voucher->voucher_chqdate ? \Carbon\Carbon::parse($voucher->voucher_chqdate)->format('d-m-Y') : 'N/A' }} {{ $voucher->voucher_depdate ? \Carbon\Carbon::parse($voucher->voucher_depdate)->format('d-m-Y') : 'N/A' }} {{ $voucher->voucher_depslipno ?? 'N/A' }}
@else

Account Details

@foreach ($accountVouchers as $voucher) @endforeach
Payment Mode Net Amount Transaction Type Cheque Status
{{ ucfirst($voucher->payment_mode) }} {{ number_format($voucher->net_amount, 2) }} {{ $voucher->transaction_type }} {{ $voucher->cheq_status ?? 'N/A' }}
@endif

Voucher Details

@php $items = json_decode($vou_other_detail->adaegi_array ?? '[]', true); $totalAmount = 0; $customerIds = collect($items)->pluck('adaegi_khata')->filter()->unique()->toArray(); $customerNames = \App\Customer::whereIn('id_customers', $customerIds)->pluck('customer_name', 'id_customers'); @endphp @if (count($items) > 0) @foreach ($items as $item) @php $totalAmount += $item['credit_amount'] ?? 0; @endphp @endforeach
ادانکی کمانه رقم Credit Employee
{{ $customerNames[$item['adaegi_khata']] ?? 'ID#' . $item['adaegi_khata'] }} {{ number_format($item['credit_amount'] ?? 0, 2) }} {{ $item['employee'] ?? '' }}
Total {{ number_format($totalAmount, 2) }}
@else
No items recorded for this voucher
@endif
@endsection @push('scripts') @endpush