@php $settings_data = \App\Models\Utility::settingsById($proposal->created_by); @endphp @if ($settings_data['SITE_RTL'] == 'on') @endif

{{ __('PROPOSAL') }}

@if ($settings['company_name']) {{ $settings['company_name'] }} @endif
@if ($settings['mail_from_address']) {{ $settings['mail_from_address'] }} @endif

@if ($settings['company_address']) {{ $settings['company_address'] }} @endif @if ($settings['company_city'])
{{ $settings['company_city'] }}, @endif @if ($settings['company_state']) {{ $settings['company_state'] }} @endif @if ($settings['company_zipcode']) - {{ $settings['company_zipcode'] }} @endif @if ($settings['company_country'])
{{ $settings['company_country'] }} @endif @if ($settings['company_telephone']) {{ $settings['company_telephone'] }} @endif
@if (!empty($settings['registration_number'])) {{ __('Registration Number') }} : {{ $settings['registration_number'] }} @endif
@if ($settings['vat_gst_number_switch'] == 'on') @if (!empty($settings['tax_type']) && !empty($settings['vat_number'])) {{ $settings['tax_type'] . ' ' . __('Number') }} : {{ $settings['vat_number'] }}
@endif {{__('Tax Number ')}} : {{!empty($vendor->tax_number)?$vendor->tax_number:''}} @endif

@if (!empty($customFields) && count($proposal->customField) > 0) @foreach ($customFields as $field) @endforeach @endif @if ($settings['qr_display'] == 'on') @endif
{{ __('Number') }}: {{ Utility::proposalNumberFormat($settings, $proposal->proposal_id) }}
{{ __('Issue Date') }}: {{ Utility::dateFormat($settings, $proposal->issue_date) }}
{{ $field->name }} : {{ !empty($proposal->customField) ? $proposal->customField[$field->id] : '-' }}
{!! DNS2D::getBarcodeHTML(route('proposal.link.copy', \Crypt::encrypt($proposal->proposal_id)), 'QRCODE', 2, 2) !!}
@if ($settings['shipping_display'] == 'on') @endif
{{ __('Bill To') }}: @if (!empty($customer->billing_name))

{{ !empty($customer->billing_name) ? $customer->billing_name : '' }}
{{ !empty($customer->billing_address) ? $customer->billing_address : '' }}
{{ !empty($customer->billing_city) ? $customer->billing_city : '' . ', ' }}
{{ !empty($customer->billing_state) ? $customer->billing_state : '', ', ' }}, {{ !empty($customer->billing_zip) ? $customer->billing_zip : '' }}
{{ !empty($customer->billing_country) ? $customer->billing_country : '' }}
{{ !empty($customer->billing_phone) ? $customer->billing_phone : '' }}

@else - @endif
{{ __('Ship To') }}: @if (!empty($customer->shipping_name))

{{ !empty($customer->shipping_name) ? $customer->shipping_name : '' }}
{{ !empty($customer->shipping_address) ? $customer->shipping_address : '' }}
{{ !empty($customer->shipping_city) ? $customer->shipping_city : '' . ', ' }}
{{ !empty($customer->shipping_state) ? $customer->shipping_state : '' . ', ' }}, {{ !empty($customer->shipping_zip) ? $customer->shipping_zip : '' }}
{{ !empty($customer->shipping_country) ? $customer->shipping_country : '' }}
{{ !empty($customer->shipping_phone) ? $customer->shipping_phone : '' }}

@else - @endif
@if (isset($proposal->itemData) && count($proposal->itemData) > 0) @foreach ($proposal->itemData as $key => $item) @php $unitName = App\Models\ProductServiceUnit::find($item->unit); @endphp @php $itemtax = 0; @endphp @if (!empty($item->description)) @endif @endforeach @else @endif
{{ __('Item') }} {{ __('Quantity') }} {{ __('Rate') }} {{ __('Discount') }} {{ __('Tax') }} (%) {{ __('Price') }} {{ __('after tax & discount') }}
{{ $item->name }}{{ $item->quantity }} {{ $unitName != null ? '(' . $unitName->name . ')' : '' }} {{ Utility::priceFormat($settings, $item->price) }} {{ $item->discount != 0 ? Utility::priceFormat($settings, $item->discount) : '-' }} @if (!empty($item->itemTax)) @foreach ($item->itemTax as $taxes) @php $itemtax += $taxes['tax_price']; @endphp

{{ $taxes['name'] }} ({{ $taxes['rate'] }}) {{ $taxes['price'] }}

@endforeach @else - @endif
{{ Utility::priceFormat($settings, $item->price * $item->quantity - $item->discount + $itemtax) }}
{{ $item->description }}
{{ __('Total') }} {{ $proposal->totalQuantity }} {{ Utility::priceFormat($settings, $proposal->totalRate) }} {{ Utility::priceFormat($settings, $proposal->totalDiscount) }} {{ Utility::priceFormat($settings, $proposal->totalTaxPrice) }}
@if (!empty($proposal->taxesData)) @foreach ($proposal->taxesData as $taxName => $taxPrice) @endforeach @endif
{{ __('Subtotal') }}: {{ Utility::priceFormat($settings, $proposal->getSubTotal()) }}
{{ __('Discount') }}: {{ Utility::priceFormat($settings, $proposal->getTotalDiscount()) }}
{{ $taxName }} : {{ Utility::priceFormat($settings, $taxPrice) }}
{{ __('Total') }}: {{ Utility::priceFormat($settings, $proposal->getSubTotal() - $proposal->getTotalDiscount() + $proposal->getTotalTax()) }}
@if (!isset($preview)) @include('proposal.script'); @endif