@extends('layouts.admin') @section('content') @php $readonly=''; @endphp @if($action=='View') @php $readonly='readonly'; @endphp @endif
@if($action == 'Edit')
{{ method_field('PUT') }} @else @endif @csrf

@if(old('first_name')) @php $first_name = old('first_name'); @endphp @elseif(isset($record->first_name) && $record->first_name != '') @php $first_name = $record->first_name; @endphp @else @php $first_name = ''; @endphp @endif @error('first_name') {{ $message }} @enderror
@if(old('last_name')) @php $last_name = old('last_name'); @endphp @elseif(isset($record->last_name) && $record->last_name != '') @php $last_name = $record->last_name; @endphp @else @php $last_name = ''; @endphp @endif @error('last_name') {{ $message }} @enderror
@if(old('email')) @php $email = old('email'); @endphp @elseif(isset($record->email) && $record->email != '') @php $email = $record->email; @endphp @else @php $email = ''; @endphp @endif @error('email') {{ $message }} @enderror
@if(old('phone')) @php $phone = old('phone'); @endphp @elseif(isset($record->phone) && $record->phone != '') @php $phone = $record->phone; @endphp @else @php $phone = ''; @endphp @endif @error('phone') {{ $message }} @enderror
@if(old('country_id')) @php $country_id = old('country_id'); @endphp @elseif(isset($record->country_id) && $record->country_id != '') @php $country_id = $record->country_id; @endphp @else @php $country_id = ''; @endphp @endif @error('country_id') {{ $message }} @enderror
@if(old('state_id')) @php $state_id = old('state_id'); @endphp @elseif(isset($record->state_id) && $record->state_id != '') @php $state_id = $record->state_id; @endphp @else @php $state_id = ''; @endphp @endif @error('state_id') {{ $message }} @enderror
@if(old('city_id')) @php $city_id = old('city_id'); @endphp @elseif(isset($record->city_id) && $record->city_id != '') @php $city_id = $record->city_id; @endphp @else @php $city_id = ''; @endphp @endif @error('city_id') {{ $message }} @enderror
@if(old('address')) @php $address = old('address'); @endphp @elseif(isset($record->address) && $record->address != '') @php $address = $record->address; @endphp @else @php $address = ''; @endphp @endif @error('address') {{ $message }} @enderror
@if(old('zipcode')) @php $zipcode = old('zipcode'); @endphp @elseif(isset($record->zipcode) && $record->zipcode != '') @php $zipcode = $record->zipcode; @endphp @else @php $zipcode = ''; @endphp @endif @error('zipcode') {{ $message }} @enderror
@if(old('instagram_link')) @php $instagram_link = old('instagram_link'); @endphp @elseif(isset($record->instagram_link) && $record->instagram_link != '') @php $instagram_link = $record->instagram_link; @endphp @else @php $instagram_link = ''; @endphp @endif @error('instagram_link') {{ $message }} @enderror
@if(old('facebook_link')) @php $facebook_link = old('facebook_link'); @endphp @elseif(isset($record->facebook_link) && $record->facebook_link != '') @php $facebook_link = $record->facebook_link; @endphp @else @php $facebook_link = ''; @endphp @endif @error('facebook_link') {{ $message }} @enderror
@if(old('website')) @php $website = old('website'); @endphp @elseif(isset($record->website) && $record->website != '') @php $website = $record->website; @endphp @else @php $website = ''; @endphp @endif @error('website') {{ $message }} @enderror
@if(old('term_id')) @php $term_id = old('term_id'); @endphp @elseif(isset($record->term_id) && $record->term_id != '') @php $term_id = $record->term_id; @endphp @else @php $term_id = ''; @endphp @endif @error('term_id') {{ $message }} @enderror
@if(old('business_registration_no')) @php $business_registration_no = old('business_registration_no'); @endphp @elseif(isset($record->business_registration_no) && $record->business_registration_no != '') @php $business_registration_no = $record->business_registration_no; @endphp @else @php $business_registration_no = ''; @endphp @endif @error('business_registration_no') {{ $message }} @enderror
@if(old('fin_charges')) @php $fin_charges = old('fin_charges'); @endphp @elseif(isset($record->fin_charges) && $record->fin_charges != '') @php $fin_charges = $record->fin_charges; @endphp @else @php $fin_charges = ''; @endphp @endif @error('fin_charges') {{ $message }} @enderror
@if(old('active')) @php $active = old('active'); @endphp @elseif(isset($record->active)) @php $active = $record->active; @endphp @else @php $active = 1; @endphp @endif
@if(old('is_more_phone')) @php $is_more_phone = old('is_more_phone'); @endphp @elseif(isset($record->is_more_phone)) @php $is_more_phone = $record->is_more_phone; @endphp @else @php $is_more_phone = 0; @endphp @endif
@if(old('is_send_statement')) @php $is_send_statement = old('is_send_statement'); @endphp @elseif(isset($record->is_send_statement)) @php $is_send_statement = $record->is_send_statement; @endphp @else @php $is_send_statement = 0; @endphp @endif
@if(old('is_hold')) @php $is_hold = old('is_hold'); @endphp @elseif(isset($record->is_hold)) @php $is_hold = $record->is_hold; @endphp @else @php $is_hold = 0; @endphp @endif
@if(old('is_ship_lock')) @php $is_ship_lock = old('is_ship_lock'); @endphp @elseif(isset($record->is_ship_lock)) @php $is_ship_lock = $record->is_ship_lock; @endphp @else @php $is_ship_lock = 0; @endphp @endif
@if(old('is_lock')) @php $is_lock = old('is_lock'); @endphp @elseif(isset($record->is_lock)) @php $is_lock = $record->is_lock; @endphp @else @php $is_lock = 0; @endphp @endif
@if(old('categories')) @php $cat_ids = old('categories'); @endphp @elseif(isset($record->collections) && $record->collections != '') @php $cat_ids = $record->collections->pluck('cat_id')->toArray(); @endphp @else @php $cat_ids = []; @endphp @endif @error('categories') {{ $message }} @enderror
@if(old('seasons')) @php $season = old('seasons'); @endphp @elseif(isset($record->seasons) && $record->seasons != '') @php $season = $record->seasons->pluck('season_id')->toArray(); @endphp @else @php $season = []; @endphp @endif @error('seasons') {{ $message }} @enderror
@if(isset($record->is_product_disc)) @php $is_product_disc = $record->is_product_disc; @endphp @else @php $is_product_disc = 0; @endphp @endif
@if(isset($record) && $selectedCategories->count()>0) @include('customer.exclusive-category',['categories'=>$selectedCategories,'cat_ids'=>$cat_ids]) @endif
@if(isset($record) && isset($record->is_product_disc) && $record->is_product_disc==1) @include('customer.product-discount',['seasons'=>$selectedSeasons,'categories'=>$selectedCategories]) @endif

@if(isset($record->contacts) && $record->contacts->count()>0) @foreach($record->contacts as $contact) @include('customer.contact-info',['contact'=>$contact]) @endforeach @else @include('customer.contact-info') @endif
@if($action != 'View')
@endif

@if(isset($record->card_details) && $record->card_details->count()>0) @foreach($record->card_details as $card_details) @include('customer.card-info',['record'=>$card_details]) @endforeach @else @include('customer.card-info') @endif
@if($action != 'View')
@endif

@if(isset($record->shipping_details) && $record->shipping_details->count()>0) @foreach($record->shipping_details as $shipping_detail) @include('customer.ship-info',['detail'=>$shipping_detail]) @endforeach @else @include('customer.ship-info') @endif
@if($action != 'View')
@endif
@if($action!='View') @endif {!! ($action!='View') ? 'Cancel' : 'Back' !!}
@endsection @push('scripts') @endpush