@if ($overviewBond['bond'])
@lang('pos/returned-sales-bonds/show.pos_return_receipt')
@lang('pos/returned-sales-bonds/show.receipt_number') :

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

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

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

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

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

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

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

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

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

@lang('pos/returned-sales-bonds/show.type'):

{{ $overviewBond['bond']->type == 'from_invoice' ? ' مردود فاتورة' : 'مردود من فاتورة تبديل' }}

@if ($overviewBond['bond']->type == 'from_invoice')
@lang('pos/returned-sales-bonds/show.sales_invoice_number') :

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

@endif
@lang('pos/returned-sales-bonds/show.cashier')

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

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

@php $totalQuantity = 0; $totalPrice = 0; $finalTotal = 0; @endphp @foreach ($overviewBond['bond']->items as $item) @php $totalQuantity += $item->quantity; $totalPrice += $item->price; @endphp @endforeach
@lang('pos/returned-sales-bonds/show.unit_code') @lang('pos/returned-sales-bonds/show.item_description') @lang('pos/returned-sales-bonds/show.unit') @lang('pos/returned-sales-bonds/show.quantity') @lang('pos/returned-sales-bonds/show.unit_price') @lang('pos/returned-sales-bonds/show.tax_rate') @lang('pos/returned-sales-bonds/show.total')
{{ $item->barcode->number }} {{ $item->barcode->ar_name }} {{ $item->barcode->unit->name }} {{ dn($item->quantity) }} {{ dn($item->price) }} {{ $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) }}
{{ dn($totalQuantity) }} {{ dn($totalPrice) }} {{ dn($finalTotal) }}

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

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