@extends('layouts.admin') @section('page-title') {{__('Manage Revenues')}} @endsection @section('breadcrumb') @endsection @php $date = isset($_GET['date'])?$_GET['date']:0; @endphp @section('action-btn')
@can('create revenue') @endcan
@endsection @section('content')
{{ Form::open(array('route' => array('revenue.index'),'method' => 'GET','id'=>'revenue_form')) }}
{{ Form::label('date', __('Date'),['class'=>'text-type']) }} {{ Form::text('date', isset($_GET['date'])?$_GET['date']:'', array('class' => 'month-btn form-control pc-datepicker-1','id'=>'pc-daterangepicker-1','placeholder'=>'YYYY-MM-DD')) }}
{{ Form::label('account', __('Account'),['class'=>'text-type']) }} {{ Form::select('account',$account,isset($_GET['account'])?$_GET['account']:'', array('class' => 'form-control select')) }}
{{ Form::label('customer', __('Customer'),['class'=>'text-type']) }} {{ Form::select('customer',$customer,isset($_GET['customer'])?$_GET['customer']:'', array('class' => 'form-control select')) }}
{{ Form::label('category', __('Category'),['class'=>'text-type']) }} {{ Form::select('category',$category,isset($_GET['category'])?$_GET['category']:'', array('class' => 'form-control select')) }}
{{ Form::close() }}
@if(Gate::check('edit revenue') || Gate::check('delete revenue')) @endif @foreach ($revenues as $revenue) @php $revenuepath=\App\Models\Utility::get_file('uploads/revenue'); @endphp @if(Gate::check('edit revenue') || Gate::check('delete revenue')) @endif @endforeach
{{__('Date')}} {{__('Amount')}} {{__('Account')}} {{__('Customer')}} {{__('Category')}} {{__('Reference')}} {{__('Description')}} {{__('Payment Receipt')}} {{__('Action')}}
{{ Auth::user()->dateFormat($revenue->date)}} {{ Auth::user()->priceFormat($revenue->amount)}} {{ !empty($revenue->bankAccount)?$revenue->bankAccount->bank_name.' '.$revenue->bankAccount->holder_name:''}} {{ (!empty($revenue->customer)?$revenue->customer->name:'-')}} {{ !empty($revenue->category)?$revenue->category->name:'-'}} {{ !empty($revenue->reference)?$revenue->reference:'-'}} {{ !empty($revenue->description)?$revenue->description:'-'}} @if(!empty($revenue->add_receipt))
@else - @endif
@can('edit revenue') @endcan @can('delete revenue')
{!! Form::open(['method' => 'DELETE', 'route' => ['revenue.destroy', $revenue->id],'class'=>'delete-form-btn','id'=>'delete-form-'.$revenue->id]) !!} {!! Form::close() !!}
@endcan
@endsection