@php
$paymentIds = $PaymentLedgers->pluck('id')->toArray();
@endphp
@foreach ($PaymentLedgers as $PaymentLedger)
@isset($accountingVoucher)
@php
if ($accountingVoucher->adj_voucher_id != null) {
$amount = App\Models\AccountingVoucherDetails::where(
'accounting_voucher_id',
$accountingVoucher->adj_voucher_id,
)
->where('ledger_id', $PaymentLedger->id)
->first();
} else {
$amount = App\Models\AccountingVoucherDetails::where(
'accounting_voucher_id',
$accountingVoucher->id,
)
->where('ledger_id', $PaymentLedger->id)
->first();
}
@endphp
@endisset
@endforeach
Credit Party(Dr)