@if ($overviewBond['bond'])
@if ($overviewBond['bond']->status == 'draft') @can('warehouses-salesOrders-edit') @lang('general.edit') @endcan @endif

SALES OFFER

Offer #: {{ $overviewBond['bond']->bond_number }}
Offer Date : {{ $overviewBond['bond']->date }}
Customer: {{ $overviewBond['bond']->client_name }}
@if ($overviewBond['bond']->client)
Account # : {{ $overviewBond['bond']->client->id_by_receivable_type }}
@endif
@if ($overviewBond['bond']->client)
Customer phone: {{ $overviewBond['bond']->client->phone_1 }}
@endif
Address : @if ($overviewBond['bond']->client && is_array($overviewBond['bond']->client->address)) city: {{ $overviewBond['bond']->client->address['city'] ?? '---' }} / area:{{ $overviewBond['bond']->client->address['region'] ?? '---' }} / address:{{ $overviewBond['bond']->client->address['address'] ?? '---' }} @else --- @endif
F.O.Payment: {{ $overviewBond['bond']->client_type == 'cash' ? 'نقدي' : 'ذمة' }}
Payment way: {{ $overviewBond['bond']->selected_payment_way ?? '---' }}
Sales Ex : @lang('warehouses/sales-price-offers/show.sales_section')
Notes :{{ $overviewBond['bond']->notice }}
@php $total_amount_before_normal_discounts = 0; $total_extra_discounts = 0; $tax_amounts_total = 0; $client_discount = 0; $total_items_discount = 0; $total_final_price = 0; @endphp @foreach ($overviewBond['bond']->items as $item) @php $tax_ratio = $item->barcode->item->tax?->value; $tax_amount = $tax_ratio ? $item->total_price_after_extra_discount * ($tax_ratio / 100) : 0; $total_price_after_tax = $item->total_price_after_extra_discount + $tax_amount; $tax_amounts_total += $tax_amount; $total_amount_before_normal_discounts += $item->price * $item->quantity; $total_extra_discounts += $item->extra_discount_amount ? $item->extra_discount_amount * $item->quantity : 0; $client_discount += ($overviewBond['bond']->client_discount_ratio / 100) * $item->total_price_after_extra_discount; $total_items_discount += $item->discount_amount * $item->quantity; $total_final_price += $total_price_after_tax; @endphp @endforeach
# Ref. Description Qty Price Dis. Gross Price Amount
{{ $loop->iteration }} {{ $item->barcode->number }} {{ $item->barcode->ar_name }} {{ dn($item->quantity) }} {{ dn($item->price) }} {{ number_format(($item->discount_amount / ($item->price * $item->quantity)) * 100, 2) }}% {{ $item->price * $item->quantity - $item->discount_amount }} {{ $total_price_after_tax }}

# Of Items: {{ $overviewBond['bond']->items->count() }} Total Qty: {{ $overviewBond['bond']->items->sum('quantity') }}
@php if (! function_exists('arabicTafqeet')) { function arabicTafqeet($value) { return \Tafqeet::inArabic( number_format((float) str_replace(',', '', $value), 3, '.', ''), 'jod' ); } } @endphp

{{ arabicTafqeet(dn($total_final_price - $client_discount)) }}

Sub Total {{ dn($total_amount_before_normal_discounts) }}
Items Discount {{ dn($total_items_discount) }}
Extra Discount {{ dn($total_extra_discounts) }}
Client Discount {{ dn($client_discount) }}
Taxes {{ dn($tax_amounts_total) }}
Total {{ dn($total_final_price - $client_discount) }}

@lang('warehouses/sales-price-offers/show.receipt')

----------

@lang('warehouses/sales-price-offers/show.audit')

----------

@lang('warehouses/sales-price-offers/show.preparation')

----------

@endif @push('script') @endpush