@extends('layouts.app') @section('content')

Purchase - {{$purchase->invoice_no}}

@lang('Account'):
{{ $purchase->account->account_name }} ({{ $purchase->account->account_no }})
{{ $purchase->account->address }}
{{ $purchase->account->contact }}
{{ $purchase->account->phone}}
Invoice No: #{{ $purchase->invoice_no }}
Po No: #{{ $purchase->purchase_no }}
Date: {{ $purchase->transaction_date }}
Delivery Date: {{ $purchase->delivery_date }}
Total Qty.: {{ $purchase->total_qty }}
Total Amount: {{ $purchase->final_total }}
Total Paid: {{ $purchase->total_paid }}
Due Amount: {{ $purchase->due }}
@if($purchase->type == 2) @endif @php $total_before_tax = 0.00; @endphp @foreach($purchase->lines_of_purchase as $purchase_line) @if($purchase->type == 2) @endif @php $total_before_tax += $purchase_line->amount; @endphp @endforeach
# @lang('Code') @lang('Description') @lang('Qty') @lang('STR') @lang('Rate')@lang('Exc. Rate')@lang('Amount')
{{ $loop->iteration }} {{ $purchase_line->product->code }} {{ $purchase_line->product->name }} {{ $purchase_line->quantity }} {{ $purchase_line->store->name }} {{ $purchase_line->rate }}{{ $purchase_line->exchange_rate }}{{ $purchase_line->amount }}
@php $discount_amount = 0; if($purchase->discount_type == 'percentage') { $discount_amount = $total_before_tax * ($purchase->discount_amount/100); } else { $discount_amount = $purchase->discount_amount; } @endphp
@lang('Sub Total'): {{ $total_before_tax }}
@lang('Discount')(-): {{ $discount_amount }}
@lang('Tax')(+): {{$purchase->tax_amount }}
@lang('Grand Total'): {{ $purchase->final_total }}
@endsection