@extends('layouts.app') @section('content')

{{ __('xcustomer::customer.headings.all_customer_list') }}







{{-- @php $cities = \Pramix\XGeneral\Models\CityModel::get(); @endphp

{{-- {{ formDropdown('', 'customer_city', \Pramix\XGeneral\Models\CityModel::pluck('name_en', 'id'), '', ['class' => '', 'id' => 'customer_city']) }} --}} {{--
--}}



  

   Reset
{{-- --}} @foreach ($customers as $customer) @php $outstanding_amount = App\Utils\CommonUtil::calculateCustomerInvoiceOutstanding($customer->id); @endphp @php $delete_customer_permission = Illuminate\Support\Facades\Auth::user()->can(['DELETE_CUSTOMER']); $block_customer_permission = Illuminate\Support\Facades\Auth::user()->can(['BLOCK_CUSTOMER']); $files_customer_permission = Illuminate\Support\Facades\Auth::user()->can(['SHOW_ATTECH_FILES']); $edit_customer_permission = false; if(Illuminate\Support\Facades\Auth::user()->can('EDIT_CUSTOMER')) { $edit_customer_permission = true; } @endphp @endforeach
{{ __('xcustomer::customer.labels.business_name') }} {{ __('xcustomer::customer.labels.full_name') }} {{ __('xcustomer::customer.labels.mobile') }} {{ __('xcustomer::customer.labels.telephone') }} {{ __('xcustomer::customer.labels.email') }} {{ __('xcustomer::customer.labels.nic') }} Area Rep {{ __('xcustomer::customer.labels.customer_grade') }} {{ __('xcustomer::customer.labels.outstanding_amount') }} {{ __('xcustomer::customer.labels.action') }}
CUSTOMER CODE FULLNAME MOBILE AREA REP GRADE OUTSTANDING AMOUNT ACTION
{{$customer->business_name}} {{$customer->company_name}} {{$customer->mobile}} {{$customer->customerPrivateAddress->city->name_en ?? ''}} {{$customer->rep->username}} {{$customer->customer_grade}}{{ App\Http\Helper::formatPrice($outstanding_amount) }} @if ($files_customer_permission) @endif @if ($block_customer_permission) @php $text = 'fa-ban'; $class = 'block-customer'; if ($customer->block_status == 'Blocked') { $text = 'fa-check'; $class = 'unblock-customer'; } @endphp @endif @if ($edit_customer_permission) @endif @if ($delete_customer_permission)   @endif
{{ $customers->appends($_GET)->links() }}
{{-- Block Model--}}
@endsection @section('include_js') @endsection @section('custom_script') @endsection