@if($order->billed_status != 'billed')
@lang('purchase::modules.purchaseOrder.convertToBill')
@endif
@lang('purchase::app.menu.purchaseOrder')

{{ mb_ucwords(company()->company_name) }}
@if (!is_null($settings) && $order->address) {!! nl2br($order->address->address) !!}
@endif {{ company()->company_phone }} @if ($invoiceSetting->show_gst == 'yes' && $order->address)
{{ strtoupper($order->address->tax_name) }}: {{ $order->address->tax_number }} @endif


@lang('app.orderNumber') {{ $order->purchase_order_number }}
@lang('modules.orders.orderDate') {{ $order->purchase_date->translatedFormat(company()->date_format) }}
@lang('app.status') {{ $order->purchase_status }}

@lang('modules.invoices.billedTo')
@if ($order->vendor && $order->vendor->primary_name) {{$order->vendor->primary_name}}
@endif @if ($order->vendor && $order->vendor->email) {{$order->vendor->email}}
@endif @if ($order->vendor && $order->vendor->phone) {{$order->vendor->phone}}
@endif @if ($order->vendor && $order->vendor->company_name) {{mb_ucwords($order->vendor->company_name)}}
@endif @if ($order->vendor && $order->vendor->billing_address) {{$order->vendor->billing_address}}
@endif

@lang('purchase::modules.purchaseOrder.' . $order->billed_status)
@if ($invoiceSetting->hsn_sac_code_show) @endif @foreach ($order->items as $item) @if ($item->type == 'item') @if ($invoiceSetting->hsn_sac_code_show) @endif @if ($item->item_summary || $item->purchaseItemImage) @endif @endif @endforeach
@lang('app.description')@lang('app.hsnSac') @lang('modules.invoices.qty') @lang('modules.invoices.unitPrice') ({{ $order->currency->currency_code }}) @lang('modules.invoices.tax') @lang('modules.invoices.amount') ({{ $order->currency->currency_code }})
{{ ($item->item_name) }}{{ $item->hsn_sac_code }}{{ $item->quantity }} @if($item->unit)
{{ $item->unit->unit_type }}@endif
{{ currency_format($item->unit_price, $order->currency_id, false) }} {{ strtoupper($item->tax_list) }} {{ currency_format($item->amount, $order->currency_id, false) }}
{!! nl2br($item->item_summary) !!} @if ($item->purchaseItemImage)

@endif
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang('modules.invoices.subTotal')
@lang('modules.invoices.discount')
{{ mb_strtoupper($key) }}
@lang('modules.invoices.total')
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
{{ currency_format($order->sub_total, $order->currency_id, false) }}
{{ currency_format($discount, $order->currency_id, false) }}
{{ currency_format($tax, $order->currency_id, false) }}
{{ currency_format($order->total, $order->currency_id, false) }}
@foreach ($order->items as $item) @if ($item->type == 'item') @endif @endforeach @if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang('app.description') @if ($item->item_summary != '' || $item->purchaseItemImage) @endif
{{ ($item->item_name) }}
{!! nl2br(strip_tags($item->item_summary, ['p', 'b', 'strong', 'a'])) !!} @if ($item->purchaseItemImage)

@endif
@lang('modules.invoices.qty') {{ $item->quantity }}
@lang('modules.invoices.unitPrice') ({{ $order->currency->currency_code }}) {{ currency_format($item->unit_price, $order->currency_id, false) }}
@lang('modules.invoices.amount') ({{ $order->currency->currency_code }}) {{ currency_format($item->amount, $order->currency_id, false) }}
@lang('modules.invoices.subTotal') {{ currency_format($order->sub_total, $order->currency_id, false) }}
@lang('modules.invoices.discount') {{ currency_format($discount, $order->currency_id, false) }}
{{ mb_strtoupper($key) }} {{ currency_format($tax, $order->currency_id, false) }}
@lang('modules.invoices.total') {{ currency_format($order->total, $order->currency_id, false) }}
@lang('app.note') @lang('modules.invoiceSettings.invoiceTerms')

{!! !empty($order->note) ? $order->note : '--' !!}

{!! nl2br($purchaseSetting->purchase_terms) !!}

@if (isset($taxes) && invoice_setting()->tax_calculation_msg == 1)

@if ($order->calculate_tax == 'after_discount') @lang('messages.calculateTaxAfterDiscount') @else @lang('messages.calculateTaxBeforeDiscount') @endif

@endif