@php $date_format = get_company_option('date_format','Y-m-d'); @endphp

{{ get_company_option('company_name') }}

{{ get_company_option('address') }}
{{ get_company_option('email') }}
{!! get_company_option('vat_id') != '' ? _lang('VAT ID').': '.clean(get_company_option('vat_id')).'
' : '' !!} {!! get_company_option('reg_no')!= '' ? _lang('REG NO').': '.clean(get_company_option('reg_no')).'
' : '' !!}
{{ _lang('Supplier Details') }}
@if(isset($purchase->supplier)) {{ _lang('Name') }} : {{ $purchase->supplier->supplier_name }}
{{ _lang('Email') }} : {{ $purchase->supplier->email }}
{{ _lang('Phone') }} : {{ $purchase->supplier->phone }}
{{ _lang('VAT Number') }} : {{ $purchase->supplier->vat_number == '' ? _lang('N/A') : $purchase->supplier->vat_number }}
@endif
{{ _lang('Purchase Order') }}
{{ _lang('Order ID') }} #: {{ $purchase->id }}
{{ _lang('Order Date') }}: {{ date($date_format, strtotime($purchase->order_date)) }}
{{ _lang('Order Status') }}: @if($purchase->order_status == 1) {{ _lang('Ordered') }}
@elseif($purchase->order_status == 2) {{ _lang('Pending') }}
@elseif($purchase->order_status == 3) {{ _lang('Received') }}
@elseif($purchase->order_status == 4) {{ _lang('Canceled') }}
@endif {{ _lang('Payment') }}: @if($purchase->payment_status == 0) {{ _lang('Due') }}
@else {{ _lang('Paid') }}
@endif
@php $currency = currency(); @endphp @foreach($purchase->purchase_items as $item) @endforeach
{{ _lang('Name') }} {{ _lang('Quantity') }} {{ _lang('Unit Cost') }} {{ _lang('Discount')}} {{ _lang('Tax method') }} {{ _lang('Tax') }} {{ _lang('Line Total') }}
{{ $item->item->item_name }} {{ $item->quantity }} {{ decimalPlace($item->unit_cost, $currency) }} {{ decimalPlace($item->discount, $currency) }} {{ strtoupper($item->item->product->tax_method) }} {{ decimalPlace($item->tax_amount, $currency) }} {{ decimalPlace($item->sub_total, $currency) }}
@if($purchase->payment_status == 0) @endif
{{ _lang('Sub Total') }} {{ decimalPlace($purchase->product_total, $currency) }}
{{ _lang('Tax') }} {{ decimalPlace($purchase->order_tax, $currency) }}
{{ _lang('Shipping Cost') }} {{ decimalPlace($purchase->shipping_cost, $currency) }}
{{ _lang('Discount') }} {{ decimalPlace($purchase->order_discount, $currency) }}
{{ _lang('Grand Total') }} {{ decimalPlace($purchase->grand_total, $currency) }}
{{ _lang('Total Paid') }} {{ decimalPlace($purchase->paid, $currency) }}
{{ _lang('Amount Due') }} {{ decimalPlace(($purchase->grand_total - $purchase->paid), $currency) }}
@if( ! $transactions->isEmpty() ) @foreach($transactions as $transaction) @endforeach
{{ _lang('Payment History') }}
{{ _lang('Date') }} {{ _lang('Account') }} {{ _lang('Amount') }} {{ _lang('Base Amount') }} {{ _lang('Payment Method') }}
{{ date($date_format, strtotime($transaction->trans_date)) }} {{ $transaction->account->account_title.' - '.$transaction->account->account_currency }} {{ decimalPlace($transaction->amount, currency($transaction->account->account_currency)) }} {{ decimalPlace($transaction->base_amount, $currency) }} {{ $transaction->payment_method->name }}
@endif @if($purchase->note != '')
{{ $purchase->note }}
@endif