@extends('layouts.admin') @section('page-title') {{__('Manage Bills')}} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @section('action-btn')
{{-- --}} @can('create bill') @endcan
@endsection @section('content')
@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::label('bill_date',__('Bill Date'),['class'=>'form-label'])}} {{ Form::text('bill_date', isset($_GET['bill_date'])?$_GET['bill_date']:null, array('class' => 'form-control month-btn','id'=>'pc-daterangepicker-1','readonly')) }}
@if(!\Auth::guard('vender')->check())
{{ Form::label('vender', __('Vendor'),['class'=>'form-label'])}} {{ Form::select('vender',$vender,isset($_GET['vender'])?$_GET['vender']:'', array('class' => 'form-control select')) }}
@endif
{{ Form::label('status', __('Status'),['class'=>'form-label'])}} {{ Form::select('status', [''=>'Select Status'] + $status,isset($_GET['status'])?$_GET['status']:'', array('class' => 'form-control select')) }}
@if (!\Auth::guard('customer')->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],'class'=>'delete-form-btn','id'=>'delete-form-'.$bill->id]) !!} {!! Form::close() !!}
@endcan
@endsection