@if ($overviewBond['bond'])
@lang('pos/aggregation-invoices/show.aggregation_invoice')
@lang('pos/aggregation-invoices/show.bond_number')

{{ $overviewBond['bond']->bond_number }}

@lang('pos/aggregation-invoices/show.branch')

{{ $overviewBond['bond']->branch?->name }}

@lang('pos/aggregation-invoices/show.invoice_date') :

{{ $overviewBond['bond']->date }}

@lang('pos/aggregation-invoices/show.total_before_tax') :

{{ dn($overviewBond['bond']->price - ($overviewBond['bond']->discount ?? 0)) }}

@lang('pos/aggregation-invoices/show.total_tax') :

{{ dn($overviewBond['bond']->tax_amount ?? 0) }}

@lang('pos/aggregation-invoices/show.total_after_tax') :

{{ dn($overviewBond['bond']->total) }}

@lang('pos/aggregation-invoices/show.items')

@php $totalQuantity = 0; $totalPrice = 0; $totalDiscount = 0; $finalTotal = 0; @endphp @foreach ($overviewBond['bond']->items as $item) @php $quantity = (float) $item->quantity; $price = (float) $item->price; $discount = (float) ($item->discount ?? 0); $tax = (float) ($item->tax_ratio ?? 0); $totalQuantity += $quantity; $totalPrice += $price; $totalDiscount += $discount; $itemTotal = ($price * $quantity) - $discount; $itemTotalWithTax = $itemTotal * (1 + $tax / 100); $finalTotal += $itemTotalWithTax; @endphp @endforeach
@lang('pos/aggregation-invoices/show.unit_code') @lang('pos/aggregation-invoices/show.item_description') @lang('pos/aggregation-invoices/show.unit') @lang('pos/aggregation-invoices/show.quantity') @lang('pos/aggregation-invoices/show.unit_price') @lang('pos/aggregation-invoices/show.discount_value') @lang('pos/aggregation-invoices/show.tax_rate') @lang('pos/aggregation-invoices/show.total')
{{ $item->barcode?->number }} {{ $item->barcode?->ar_name }} {{ $item->barcode?->unit?->name }} {{ dn($quantity) }} {{ dn($price) }} {{ dn($discount) }} {{ $tax ? ($tax . '%') : '---' }} {{ dn($itemTotalWithTax) }}
{{ dn($totalQuantity) }} {{ dn($totalPrice) }} {{ dn($totalDiscount) }} {{ dn($finalTotal) }}

@lang('pos/aggregation-invoices/show.recipient_name')

@lang('pos/aggregation-invoices/show.recipient_signature')

@php function arabicTafqeet($value) { return \Tafqeet::inArabic( number_format((float) str_replace(',', '', $value), 3, '.', ''), 'jod' ); } @endphp
{{ arabicTafqeet(dn($finalTotal)) }}
@php $svgPath = storage_path( 'app/fotara/images/aggregation_invoice_' . $overviewBond['bond']->id . '_qr.svg', ); @endphp
@if (file_exists($svgPath))
{!! file_get_contents($svgPath) !!}
Posted To Fotara
@endif
@endif @push('script') @endpush