@extends('layouts.admin') @push('script-page') @endpush @section('page-title') {{__('Contract')}} @endsection @section('title')
{{__('Contract')}}
@endsection @section('breadcrumb') @if(\Auth::guard('customer')->check()) @else @endif @endsection @section('action-btn') {{-- --}} @if(\Auth::user()->can('create contract'))
@endif @endsection @section('filter') @endsection @section('content')
{{__('Total Contracts')}}

{{ $cnt_contract['total'] }}

{{__('This Month Total Contracts')}}

{{ $cnt_contract['this_month'] }}

{{__('This Week Total Contracts')}}

{{ $cnt_contract['this_week'] }}

{{__('Last 30 Days Total Contracts')}}

{{ $cnt_contract['last_30days'] }}

@if(\Auth::user()->can('view contract')) @endif @if(Gate::check('manage contract')) @endif {{-- --}} @foreach ($contracts as $contract) @if(Gate::check('manage contract')) @endif {{-- --}} @endforeach
{{__('#')}}{{__('Subject')}}{{__('Customer')}}{{__('Type')}} {{__('Value')}} {{__('Start Date')}} {{__('End Date')}} {{__('Status')}}{{__('Description')}}{{__('Action')}}
@if(\Auth::user()->type =='company') @if(\Auth::user()->can('view contract')) {{\Auth::user()->contractNumberFormat($contract->id)}} @endif @else @if(\Auth::user()->can('view contract')) {{\Auth::user()->contractNumberFormat($contract->id)}} @endif @endif {{ $contract->subject}}{{ !empty($contract->clients)?$contract->clients->name:'' }}{{ !empty($contract->types)?$contract->types->name:'' }} {{ \Auth::user()->priceFormat($contract->value) }} {{ \Auth::user()->dateFormat($contract->start_date )}} {{ \Auth::user()->dateFormat($contract->end_date )}} @if($contract->status == 'start') {{__('Started')}} @else {{__('Close')}} @endif
@if((\Auth::user()->can('duplicate contract')) && ($contract->status == 'start')) @endif @if(\Auth::user()->type =='company') @if(\Auth::user()->can('view contract')) @endif @else @if(\Auth::user()->can('view contract')) @endif @endif @if(\Auth::user()->can('edit contract')) @endif @if(\Auth::user()->can('delete contract'))
{!! Form::open(['method' => 'DELETE', 'route' => ['contract.destroy', $contract->id],'id'=>'delete-form-'.$contract->id]) !!} {!! Form::close() !!}
@endif
@endsection