@extends('layouts.main') @section('page-title') {{ __('Manage Bills') }} @endsection @section('page-breadcrumb') {{ __('Bill') }} @endsection @section('page-action')
@stack('addButtonHook') @if (module_is_active('ProductService')) @can('bill create') @endcan @endif
@endsection @push('css') @endpush @section('content')
{{ Form::open(['route' => ['bill.index'], 'method' => 'GET', 'id' => 'frm_submit']) }}
{{ Form::label('bill_date', __('Date'), ['class' => 'form-label']) }} {{ Form::date('bill_date', isset($_GET['bill_date']) ? $_GET['bill_date'] : null, ['class' => 'form-control form-control flatpickr-to-input', 'placeholder' => 'Select Date']) }}
@if (!\Auth::user()->type != 'vendor')
{{ Form::label('vendor', __('Vendor'), ['class' => 'form-label']) }} {{ Form::select('vendor', $vendor, isset($_GET['vendor']) ? $_GET['vendor'] : '', ['class' => 'form-control ', 'placeholder' => 'Select Vendor']) }}
@endif
{{ Form::label('status', __('Status'), ['class' => 'form-label']) }} {{ Form::select('status', $status, isset($_GET['status']) ? $_GET['status'] : '', ['class' => 'form-control ', 'placeholder' => 'Select Status']) }}
{{ Form::close() }}
@if (!\Auth::user()->type != 'vendor') @endif @if (Gate::check('bill edit') || Gate::check('bill delete') || Gate::check('bill show') || Gate::check('bill duplicate')) @endif @foreach ($bills as $bill) @if (!\Auth::user()->type != 'vendor') @endif @if (Gate::check('bill edit') || Gate::check('bill delete') || Gate::check('bill show') || Gate::check('bill duplicate')) @endif @endforeach
{{ __('Bill') }} {{ __('Vendor') }} {{ __('Bill Date') }} {{ __('Due Date') }} {{ __('Due Amount') }} {{ __('Status') }} {{ __('Action') }}
@can('bill show') {{ Modules\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @else {{ Modules\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @endif {{ !empty($bill->vendor) ? $bill->vendor->name : '' }}{{ company_date_formate($bill->bill_date) }} @if ($bill->due_date < date('Y-m-d'))

{{ company_date_formate($bill->due_date) }}

@else {{ company_date_formate($bill->due_date) }} @endif
{{ currency_format_with_sym($bill->getDue()) }} @if ($bill->status == 0) {{ __(Modules\Account\Entities\Bill::$statues[$bill->status]) }} @elseif($bill->status == 1) {{ __(Modules\Account\Entities\Bill::$statues[$bill->status]) }} @elseif($bill->status == 2) {{ __(Modules\Account\Entities\Bill::$statues[$bill->status]) }} @elseif($bill->status == 3) {{ __(Modules\Account\Entities\Bill::$statues[$bill->status]) }} @elseif($bill->status == 4) {{ __(Modules\Account\Entities\Bill::$statues[$bill->status]) }} @endif @can('bill duplicate')
{!! Form::open([ 'method' => 'get', 'route' => ['bill.duplicate', $bill->id], 'id' => 'duplicate-form-' . $bill->id, ]) !!} {{ Form::close() }}
@endcan @can('bill show') @endcan @if (module_is_active('ProductService') && $bill->bill_module == 'taskly' ? module_is_active('Taskly') : module_is_active('Account')) @can('bill edit') @endcan @endif @can('bill delete')
{{ Form::open(['route' => ['bill.destroy', $bill->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endcan
@endsection @push('scripts') @endpush