@extends('layouts.admin') @section('page-title') {{__('Manage Revenues')}} @endsection @section('breadcrumb') @endsection @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'=>'form-label'])}} {{ Form::text('date', isset($_GET['date'])?$_GET['date']:null, array('class' => 'form-control month-btn','id'=>'pc-daterangepicker-1','readonly')) }}
{{Form::label('account',__('Account'),['class'=>'form-label'])}} {{ Form::select('account',$account,isset($_GET['account'])?$_GET['account']:'', array('class' => 'form-control select')) }}
{{ Form::label('customer', __('Customer'),['class'=>'form-label'])}} {{ Form::select('customer',$customer,isset($_GET['customer'])?$_GET['customer']:'', array('class' => 'form-control select')) }}
{{ Form::label('category', __('Category'),['class'=>'form-label'])}} {{ 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) @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