@if ($overviewBond['bond'])
@lang('pos/sales-invoices/show.pos_invoice')
@lang('pos/sales-invoices/show.sales_invoice_number') :

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

@lang('pos/sales-invoices/show.cash_register') :

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

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

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

@lang('pos/sales-invoices/show.cash_register_date') :

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

@lang('pos/sales-invoices/show.receipt_date') :

{{ $overviewBond['bond']->created_at->format('Y-m-d') }}

@lang('pos/sales-invoices/show.client'):

{{ $overviewBond['bond']->client?->name ?? 'نقدي' }}

@lang('pos/sales-invoices/show.amount'):

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

@lang('pos/sales-invoices/show.cashier')

{{ $overviewBond['bond']->user->full_name }}

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

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

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

@lang('pos/sales-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/pos_sales_invoice_' . $overviewBond['bond']->id . '_qr.svg', ); @endphp
@if (file_exists($svgPath))
{!! file_get_contents($svgPath) !!}
Posted To Fotara
@endif
@endif @push('script') @endpush