@lang('accounting/show.invoice') {{ $resource->type_as_text }}

@lang('accounting/show.invoice_number') : {{ $resource->bond_number }}

@lang('accounting/show.date') : {{ $resource->date }}

@if ($resource->debit_type == 'receivable')

@lang('accounting/show.amount_due_from') : {{ $resource->debit_receivable_account->name }}

@else

@lang('accounting/show.amount_due_from_account') : {{ $resource->debit_account->name }}

@endif

@lang('accounting/show.number') @if ($resource->debit_type == 'cash') @lang('accounting/show.account') : {{ $resource->debit_account_id }} @else @lang('accounting/show.client') : {{ $resource->debit_receivable_id }} @endif

@lang('accounting/show.client_tax_number') : {{ $resource->debit_type == 'receivable' ? $resource->debit_receivable_account->tax_number : '---' }}

@foreach ($resource->credit_items as $item) @endforeach @php $amount_sum = $resource->credit_items->sum('amount'); $tax_amount_sum = $resource->credit_items->sum('tax_amount'); @endphp
@lang('general.description') @lang('accounting/show.before_tax') @lang('accounting/show.tax') @lang('accounting/show.total_price')
{{ $item->account->name }} {{ dn($item->amount) }} {{ $item->tax_amount ? dn($item->tax_amount) : '---' }} {{ dn($item->amount + $item->tax_amount ?? 0) }} {{ Tafqeet::inArabic(number_format((float) str_replace(',', '', dn($item->amount + $item->tax_amount ?? 0)), 3, '.', ''), 'jod') }}
@lang('general.total') {{ dn($amount_sum) }} {{ dn($tax_amount_sum) }} {{ dn($amount_sum + $tax_amount_sum) }} {{ Tafqeet::inArabic(number_format((float) str_replace(',', '', dn($amount_sum + $tax_amount_sum)), 3, '.', ''), 'jod') }}
@if ($resource->notice)

@lang('accounting/show.notes') :

{{ $resource->notice }}

@else @lang('accounting/show.no_notes'). @endif

{!! QrCode::size(100)->generate( route('tenant.show-document', ['type' => 'services-invoice', 'id' => $resource->id]), ) !!}
@lang('accounting/show.total_before_tax') {{ dn($amount_sum) }}
@php $taxes = App\Models\Accounting\Tax::active() ->groupBy('value') ->get(); @endphp @foreach ($taxes as $tax_item)
@lang('accounting/show.tax') {{ $tax_item->value }}% {{ dn($resource->credit_items->where('tax_id', $tax_item->id)->sum('tax_amount')) }}
@endforeach
@lang('general.total') {{ dn($amount_sum + $tax_amount_sum) }}
@php $debit_sum = 0; $credit_sum = 0; @endphp @foreach ($resource->credit_items as $item) @endforeach
@lang('accounting/show.account_receivable') @lang('accounting/show.debtor') @lang('accounting/show.creditor') @lang('accounting/show.cost_center') @lang('general.description')
{{ $resource->proper_debit_account?->name }} {{ dn($resource->amount) }} --- --- {{ $resource->notice }}
{{ $item->account->name }} --- {{ dn($item->amount + ($item->tax_amount ?? 0)) }} --- {{ $item->notice ?? '---' }}
{{ dn($resource->amount) }} {{ dn($resource->amount) }}
@php $signatures = App\Models\Signature::byType('service_invoice') ->active() ->get(); @endphp @if (count($signatures))

@lang('accounting/show.signature')

@foreach ($signatures as $signature)

{{ $signature->label }}

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

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