@extends('layouts.master') @section('content')
{{ $title }}
@if(\Auth::user()->utype==1) New Invoice

@endif
@if(\Auth::user()->utype!=3) @endif @if($invoices) @foreach($invoices as $row) @if(\Auth::user()->utype!=3) @endif items?$row->items->sum('payable_amount'):0;; $total1=$row->items?$row->items->sum('payable_amount'):0; $total2=$row->items?$row->items->sum('payable_amount'):0; $total_vat=($total1*$row->vat)/100; $total_tax=($total2*$row->tax)/100; $payable=$total+$total_vat+$total_tax;; $paid=$row->items?$row->items->sum('paid_amount'):0; $due=$payable-$paid; ?> @endforeach @endif
Invoice CodeVendorService Date Due Date Amount Status Attachment Action
{{ $row->invoice_code }}{{ $row->company?$row->company->name:'' }} @if($row->items) @foreach($row->items as $itm) {{ $itm->service?$itm->service->name:'' }}
@endforeach @endif
{{ date('d M, Y',strtotime($row->invoice_date)) }} {{ date('d M, Y',strtotime($row->due_date)) }} {{ $payable }} @if($row->status==0) Due @elseif($row->status==1) Paid @endif @if(!empty($row->attachment)) Download @else No Attachment @endif {{-- $itm->service?$itm->service->account_id:0 ; --}} client?$row->client->id:0; ?> @if(\Auth::user()->utype==1) @endif
@stop @section('style') @stop @section('script') @stop