@extends('layouts.app') @section('title', __('Invoices')) @section('content')
@can('add invoice') {{--Add Card--}}
{{ __('New Invoice') }}
@endcan @can('view invoice') {{--Search Card--}}
{{ __('Search Invoice') }}
@csrf
@if($errors->has('number')) {{ $errors->first('number') }} @endif
@if($errors->has('searchfrom')) {{ $errors->first('searchfrom') }} @endif
@if($errors->has('searchto')) {{ $errors->first('searchto') }} @endif
@if($errors->has('searchtotal')) {{ $errors->first('searchtotal') }} @endif
{{--Results Card--}} @isset($results)
{{ __('Invoices') }}
@if($results->count() > 0) @foreach ($results as $result) @endforeach @else @endif
# {{ __('Number') }} {{ __('Date') }} {{ __('From') }} {{ __('To') }} {{ __('Total') }} {{ __('Amount Due') }} {{ __('Project') . ' / ' . __('Customer') }} {{ __('Items') }} {{ __('Invoice Actions') }} {{ __('Notes') }}
{{ $loop->iteration }} {{ env('invoices_shortcut') . $result->id }} {{ $result->date }} {{ $result->from }} {{ $result->to }} {{ $result->total }} {{ $result->due }} @if($result->customer_id != null) {{ $result->customer->name }} @else {{ $result->project->number }} ({{ $result->project->customer->name }}) @endif
{{ $result->notes }}
{{ __('No Results') }}
@endisset @endcan
@endsection @section('scripts') @endsection