@extends('layouts.admin') @section('page-title') {{ __('Manage Bills') }} @endsection @section('breadcrumb') @if (\Auth::guard('vender')->check()) @else @endif @endsection @section('action-btn')
@can('create bill') @endcan
@endsection @section('content') @php @endphp
@if (!\Auth::guard('vender')->check()) {{ Form::open(['route' => ['bill.index'], 'method' => 'GET', 'id' => 'frm_submit']) }} @else {{ Form::open(['route' => ['vender.bill'], 'method' => 'GET', 'id' => 'frm_submit']) }} @endif
{{ Form::label('date', __('Date'),['class'=>'text-type']) }} {{ Form::date('bill_date', isset($_GET['bill_date']) ? $_GET['bill_date'] :'', ['class' => 'month-btn form-control', 'id' => 'pc-daterangepicker-1', 'placeholder' => 'YYYY-MM-DD']) }}
@if (!\Auth::guard('vender')->check())
{{ Form::label('vender', __('Vendor'),['class'=>'text-type']) }} {{ Form::select('vender', $vender, isset($_GET['vender']) ? $_GET['vender'] : '', ['class' => 'form-control']) }}
@endif
{{ Form::label('status', __('Status'),['class'=>'text-type']) }} {{ Form::select('status', ['' => 'Select Status'] + $status, isset($_GET['status']) ? $_GET['status'] : '', ['class' => 'form-control']) }}
@if (!\Auth::guard('vender')->check()) @else @endif
{{ Form::close() }}
@if (!\Auth::guard('vender')->check()) @endif @if (Gate::check('edit bill') || Gate::check('delete bill') || Gate::check('show bill')) @endif @foreach ($bills as $bill) @if (!\Auth::guard('vender')->check()) @endif @if (Gate::check('edit bill') || Gate::check('delete bill') || Gate::check('show bill')) @endif @endforeach
{{ __('Bill') }} {{ __('Vendor') }} {{ __('Category') }} {{ __('Bill Date') }} {{ __('Due Date') }} {{ __('Status') }} {{ __('Action') }}
@if (\Auth::guard('vender')->check()) {{ AUth::user()->billNumberFormat($bill->bill_id) }} @else {{ AUth::user()->billNumberFormat($bill->bill_id) }} @endif {{ !empty($bill->vender) ? $bill->vender->name : '' }} {{ !empty($bill->category) ? $bill->category->name : '' }} {{ Auth::user()->dateFormat($bill->bill_date) }} {{ Auth::user()->dateFormat($bill->due_date) }} @if ($bill->status == 0) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 1) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 2) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 3) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 4) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @endif @can('duplicate bill')
{!! Form::open([ 'method' => 'get', 'route' => ['bill.duplicate', $bill->id], 'id' => 'duplicate-form-' . $bill->id, ]) !!} {!! Form::close() !!}
@endcan @can('show bill') @if (\Auth::guard('vender')->check()) @else @endif @endcan @can('edit bill') @endcan @can('delete bill')
{!! Form::open(['method' => 'DELETE', 'route' => ['bill.destroy', $bill->id]]) !!} {!! Form::close() !!}
@endcan
@endsection