@if ($billing_address) @lang('pdf_received_from') {!! $billing_address !!} @endif
@foreach ($payment->allocations as $allocation) @if ($allocation->invoice && $allocation->invoice->invoice_number) @endif @endforeach @php($unallocatedAmount = (int) $payment->amount - (int) $payment->allocations->sum('amount')) @if ($unallocatedAmount > 0) @endif
@lang('pdf_payment_date')  {{ $payment->formattedPaymentDate }}
@lang('pdf_payment_number')  {{ $payment->payment_number }}
@lang('pdf_payment_mode')  {{ $payment->paymentMethod ? $payment->paymentMethod->name : '-' }}
@lang('pdf_invoice_label')  {{ $allocation->invoice->invoice_number }}
@lang('customers.applied')  {!! format_money_pdf($allocation->amount, $allocation->invoice->currency) !!}
@lang('unapplied_credit')  {!! format_money_pdf($unallocatedAmount, $payment->customer->currency) !!}