@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
Cheque No |
Cheque Date |
Deposit Date |
Deposit Slip No |
@foreach ($accountVouchers as $voucher)
@if ($voucher->voucher_chqno || $voucher->voucher_chqdate || $voucher->voucher_depdate || $voucher->voucher_depslipno)
{{ $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' }} |
@endif
@endforeach
@else
Account Details
Payment Mode |
Net Amount |
Transaction Type |
Cheque Status |
@foreach ($accountVouchers as $voucher)
{{ ucfirst($voucher->payment_mode) }} |
{{ number_format($voucher->net_amount, 2) }} |
{{ $voucher->transaction_type }} |
{{ $voucher->cheq_status ?? 'N/A' }} |
@endforeach
@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)
ادانکی کمانه |
رقم Credit |
Employee |
@foreach ($items as $item)
{{ $customerNames[$item['adaegi_khata']] ?? 'ID#' . $item['adaegi_khata'] }} |
{{ number_format($item['credit_amount'] ?? 0, 2) }} |
{{ $item['employee'] ?? '' }} |
@php $totalAmount += $item['credit_amount'] ?? 0; @endphp
@endforeach
Total |
{{ number_format($totalAmount, 2) }} |
|
@else
No items recorded for this voucher
@endif