@extends('companyuser::layouts.master') @section('title', __('purchases::suppliers.Edit Supplier')) @section('extra-styles') @endsection @section('breadcrumb') @endsection @section('content')
@csrf @method('PUT')
{{-- @include('superadmin::errors.lists') --}}
{{-- supplier code --}}
@error('code')

{{ $message }}

@enderror
{{-- supplier name --}}
@error('name')

{{ $message }}

@enderror
{{-- accounts receivables --}}
@error('account_receivable_id')

{{ $message }}

@enderror
{{-- phone number --}}
@if(Lang::locale() == 'ar')
@error('mobile')

{{ $message }}

@enderror
{{-- here we pass the supplier var named as user to the include to be able to use this file without modifying it --}} @include('superadmin::includes.selectCountry' , ['user' => $supplier]) @error('country_code')

{{ $message }}

@enderror
@else
@include('superadmin::includes.selectCountry', ['user' => $supplier]) @error('country_code')

{{ $message }}

@enderror
@error('mobile')

{{ $message }}

@enderror
@endif
{{-- email --}}
@error('email')

{{ $message }}

@enderror
{{-- tax number --}}
@error('tax_number')

{{ $message }}

@enderror
@lang('purchases::suppliers.Billing Address')
@error('street')

{{ $message }}

@enderror
@error('city')

{{ $message }}

@enderror
@error('country')

{{ $message }}

@enderror
@error('postal_code')

{{ $message }}

@enderror
@if( $customFields->count() ) {{-- this to handle the case when user create item when there is no custom fields then add custom fields from setting then open the edit page this means get the custom fields in bill , if it is empty it means there wasn't customfields so get the noraml custom fields that came from settings --}} @php $customFields = json_decode($supplier->custom_fields, true) ?? $customFields @endphp
@foreach($customFields as $key=>$field)
@if($field['type']=='checkbox') @else @endif
@endforeach
@endif
@include('sales::includes.redirect_popup')
@stop @section('extra_scripts') @endsection