{{-- @extends('layouts.admin') --}} @include('new_layouts.header') {{-- @section('page-title') {{ucwords($project->project_name).__("'s Expenses")}} @endsection --}} {{-- @section('breadcrumb') @endsection --}} @include('construction_project.side-menu',['hrm_header' => "Expenses"])
@can('create expense') @endcan
@if(Gate::check('edit expense') || Gate::check('delete expense')) @endif @if(isset($project->expense) && !empty($project->expense) && count($project->expense) > 0) @foreach($project->expense as $expense) @if(Gate::check('edit expense') || Gate::check('delete expense')) @endif @endforeach @else @endif
{{__('Attachment')}} {{__('Name')}} {{__('Date')}} {{__('Amount')}}
@if(!empty($expense->attachment)) @else @endif {{ $expense->name }} @if(!empty($expense->task)){{ $expense->task->name }}@endif {{ (!empty($expense->date)) ? Utility::getDateFormated($expense->date) : '-' }} {{ \Auth::user()->priceFormat($expense->amount) }}
@can('edit expense') @endcan @can('delete expense')
{!! Form::open(['method' => 'DELETE', 'route' => ['projects.expenses.destroy',$expense->id],'id'=>'delete-expense-'.$expense->id]) !!}
@endcan
{!! Form::close() !!}
{{__('No Expense Found.')}}