@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(array('route' => array('bill.index'),'method' => 'GET','id'=>'frm_submit')) }} @else {{ Form::open(array('route' => array('vender.bill'),'method' => 'GET','id'=>'frm_submit')) }} @endif
{{ Form::date('bill_date', isset($_GET['bill_date'])?$_GET['bill_date']:null, array('class' => 'month-btn form-control','id'=>'pc-daterangepicker-1')) }}
@if(!\Auth::guard('vender')->check())
{{ Form::select('vender',$vender,isset($_GET['vender'])?$_GET['vender']:'', array('class' => 'form-control select2')) }}
@endif
{{ Form::select('status', [''=>'Select Status'] + $status,isset($_GET['status'])?$_GET['status']:'', array('class' => 'form-control select2')) }}
@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')}} {!! DNS1D::getBarcodeHTML($bill->sku, "C128",1.4,22) !!}

{{$bill->sku}}

@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