@lang('accounting/receipts/show-from-qr.receipt_entry')
@lang('accounting/receipts/show-from-qr.date'):

{{ $resource->date }}

@lang('accounting/receipts/show-from-qr.document_number') :

{{ $resource->bond_number }}

@lang('accounting/receipts/show-from-qr.document_status') :

{{ $resource->audit_status ? 'مرحّل' : 'غير مرحّل' }}

@lang('accounting/receipts/show-from-qr.payment_method') :

{{ $resource->payment_way_by_ar }}

@lang('accounting/receipts/show-from-qr.account_type') :

{{ $resource->credit_type == 'account' ? 'حساب' : 'ذمة' }}

@lang('accounting/receipts/show-from-qr.debtor_party') :

{{ $resource->debit_account->name }}

@if ($resource->debit_type == 'receivable')
@lang('accounting/receipts/show-from-qr.creditor_party') :

{{ $resource->credit_type == 'account' ? $resource->credit_account->name : $resource->credit_receivable->name }}

@endif
@lang('accounting/receipts/show-from-qr.amount') :

{{ dn($resource->amount) }}

@if ($resource->payment_way == 'transfer')

@lang('accounting/receipts/show-from-qr.bank_transfers')

@foreach ($resource->transfers as $transfer) @endforeach
# @lang('accounting/receipts/show-from-qr.value') @lang('accounting/receipts/show-from-qr.transfer_number') @lang('accounting/receipts/show-from-qr.transfer_date') @lang('accounting/receipts/show-from-qr.bank') @lang('accounting/receipts/show-from-qr.description')
{{ $loop->iteration }} {{ $transfer->amount }} {{ $transfer->number }} {{ $transfer->date }} {{ $transfer->bank }} {{ $transfer->notice }}
{{ collect($resource->transfers)->sum('amount') }}
@endif @if ($resource->payment_way == 'check')

@lang('accounting/receipts/show-from-qr.checks')

@foreach ($resource->checks as $check) @endforeach
# @lang('accounting/receipts/show-from-qr.value') @lang('accounting/receipts/show-from-qr.check_number') @lang('accounting/receipts/show-from-qr.check_date') @lang('accounting/receipts/show-from-qr.bank') @lang('accounting/receipts/show-from-qr.description')
{{ $loop->iteration }} {{ dn($check->amount) }} {{ $check->number }} {{ $check->date }} {{ $check->bank }} {{ $check->notice }}
@lang('general.total') {{ dn(collect($resource->checks)->sum('amount')) }}
@endif {{-- Invoices List For Receivable --}}

@lang('accounting/receipts/show-from-qr.invoices')

@foreach ($resource->payments as $payment) @endforeach
# @lang('accounting/receipts/show-from-qr.document_type') @lang('accounting/receipts/show-from-qr.document_number') @lang('accounting/receipts/show-from-qr.date') @lang('accounting/receipts/show-from-qr.payments')
{{ $loop->iteration }} {{ $payment->invoice_type == 'services' ? 'فاتورة بيع خدمات' : 'فاتورة بيع' }} {{ $payment->invoice_id }} {{ $payment->created_at->format('m/d/Y') }} {{ dn($payment->amount) }}
{{ dn(collect($resource->payments)->sum('amount')) }}
@php $debit_sum = 0; $credit_sum = 0; @endphp
@lang('accounting/receipts/show-from-qr.account_receivable') @lang('accounting/receipts/show-from-qr.debtor') @lang('accounting/receipts/show-from-qr.creditor') @lang('accounting/receipts/show-from-qr.cost_center') @lang('accounting/receipts/show-from-qr.description')
{{ $resource->debit_account->name }} {{ dn($resource->amount) }} --- ---
{{ $resource->credit_type == 'account' ? $resource->credit_account->name : $resource->credit_receivable->name }} --- {{ dn($resource->amount) }} --- {{ $resource->notice ?? '---' }}
{{ dn($resource->amount) }} {{ dn($resource->amount) }}
@if ($resource->notice)

@lang('accounting/receipts/show-from-qr.notes') :

{{ $resource->notice }}

@else @lang('accounting/receipts/show-from-qr.no_notes') @endif

{!! QrCode::size(100)->generate( route('tenant.show-document', ['type' => 'rentals-receipt-bond', 'id' => $resource->id]), ) !!}
@php $signatures = App\Models\Signature::byType('receipt') ->active() ->get(); @endphp @if (count($signatures))

@lang('accounting/receipts/show-from-qr.signature')

@foreach ($signatures as $signature)

{{ $signature->label }}

----------------------------

@endforeach
@endif
@scriptag('build/js/manifest.js') @scriptag('build/js/vendor.js') @scriptag('build/js/app.js')