finishing to dev
All checks were successful
All checks were successful
This commit is contained in:
@@ -5,6 +5,13 @@
|
||||
@endsection
|
||||
|
||||
@php
|
||||
$file = base_path('lang/countrylist.json');
|
||||
|
||||
if (file_exists($file)) {
|
||||
$countries = json_decode(file_get_contents($file), true);
|
||||
} else {
|
||||
$countries = [];
|
||||
}
|
||||
$type = request('type') !== 'Supplier' ? 'Customer' : 'Supplier';
|
||||
@endphp
|
||||
|
||||
@@ -20,18 +27,12 @@
|
||||
|
||||
<h4>{{ __('Add new :type', ['type' => __($type)]) }}</h4>
|
||||
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<a data-bs-toggle="modal" data-bs-target="#parties-import-modal" class="save-publish-btn" href="#">
|
||||
{{__('Bulk Upload')}}
|
||||
</a>
|
||||
|
||||
@usercan('parties.read')
|
||||
<a href="{{ route('business.parties.index', ['type' => request('type')]) }}"
|
||||
class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active' : '' }}">
|
||||
<i class="far fa-list" aria-hidden="true"></i>{{ __(':type List', ['type' => __($type)]) }}
|
||||
</a>
|
||||
@endusercan
|
||||
</div>
|
||||
@usercan('parties.read')
|
||||
<a href="{{ route('business.parties.index', ['type' => request('type')]) }}"
|
||||
class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active' : '' }}">
|
||||
<i class="far fa-list" aria-hidden="true"></i>{{ __(':type List', ['type' => __($type)]) }}
|
||||
</a>
|
||||
@endusercan
|
||||
</div>
|
||||
|
||||
<div class="order-form-section p-16">
|
||||
@@ -42,11 +43,11 @@ class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active
|
||||
<div class="row col-lg-9">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __($type . ' Name') }}</label>
|
||||
<input type="text" name="name" required class="form-control" placeholder="{{ __('Enter :type Name', ['type' => __($type)]) }}">
|
||||
<input type="text" name="name" required class="form-control" placeholder="{{ __('Enter '.$type.' Name') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Phone Number') }}</label>
|
||||
<input type="text" name="phone" class="form-control" placeholder="{{ __('Enter Phone Number') }}">
|
||||
<input type="number" name="phone" class="form-control" placeholder="{{ __('Enter Phone Number') }}">
|
||||
</div>
|
||||
@if (request('type') !== 'Supplier')
|
||||
<div class="col-lg-6 mb-2">
|
||||
@@ -94,12 +95,6 @@ class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active
|
||||
<label>{{ __('Address') }}</label>
|
||||
<input type="text" name="address" class="form-control" placeholder="{{ __('Enter Address') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Tax No') }}</label>
|
||||
<input type="text" name="tax_no" class="form-control" placeholder="{{ __('Enter tax') }}">
|
||||
</div>
|
||||
|
||||
<div class="accordion" id="customAccordion">
|
||||
<div class="accordion-item border-0">
|
||||
<h2 class="accordion-header">
|
||||
@@ -111,39 +106,31 @@ class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active
|
||||
data-bs-parent="#customAccordion">
|
||||
<div class="accordion-body fst-italic text-secondary p-0">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<select name="country_id" id="country_id" class="form-control">
|
||||
<option value="">{{ __('Select a country') }}</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}">{{ __($country->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('State') }}</label>
|
||||
<select name="state_id" id="state_id" class="form-control">
|
||||
<option value="">{{ __('Select state') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('City') }}</label>
|
||||
<input type="text" name="billing_address[city]" class="form-control" placeholder="{{ __('Enter city') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Zip Code') }}</label>
|
||||
<input type="text" name="billing_address[zip_code]" class="form-control" placeholder="{{ __('Enter zip code') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Address line 1') }}</label>
|
||||
<input type="text" name="billing_address[address]" class="form-control" placeholder="{{ __('Enter address') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('City') }}</label>
|
||||
<input type="text" name="billing_address[city]" class="form-control" placeholder="{{ __('Enter city') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('State') }}</label>
|
||||
<input type="text" name="billing_address[state]" class="form-control" placeholder="{{ __('Enter state') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Zip Code') }}</label>
|
||||
<input type="text" name="billing_address[zip_code]" class="form-control" placeholder="{{ __('Enter zip code') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<select name="billing_address[country]" class="form-control">
|
||||
<option value="">{{ __('Select a country') }}</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country['name'] }}">{{ __($country['name']) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -197,7 +184,7 @@ class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active
|
||||
<img src="{{ asset('assets/images/icons/img.png') }}" alt="icon" />
|
||||
</div>
|
||||
<p>{{__('Drag & drop your Image')}}</p>
|
||||
<p>{{__('or')}} <span class="browse-text">{{__('Browse')}}</span></p>
|
||||
<p>or <span class="browse-text">{{__('Browse')}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" name="image" id="fileInput" accept="image/*">
|
||||
@@ -218,11 +205,4 @@ class="add-order-btn rounded-2 {{ Route::is('business.parties.create') ? 'active
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" value="{{ route('business.get-states.index') }}" id="get-state">
|
||||
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('business::parties.bulk-upload.parties-import')
|
||||
@endpush
|
||||
|
||||
@@ -65,21 +65,9 @@ class="table-product-img">
|
||||
@endusercan
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.parties.advance-payments', [$party->id, 'type' => request('type')]) }}">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" class="pt-1 me-0" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.66602 3.75H7.29715C7.96019 3.75 8.5961 4.01339 9.06493 4.48223L11.666 7.08333" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.16602 11.25H1.66602" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M7.08268 6.25L8.74935 7.91667C9.2096 8.37692 9.2096 9.12308 8.74935 9.58333C8.28912 10.0436 7.54292 10.0436 7.08268 9.58333L5.83268 8.33333C5.11544 9.05058 3.97994 9.13125 3.16847 8.52267L2.91602 8.33333" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.16602 9.16536V12.9154C4.16602 14.4867 4.16602 15.2724 4.65417 15.7605C5.14232 16.2487 5.928 16.2487 7.49935 16.2487H14.9993C16.5707 16.2487 17.3563 16.2487 17.8445 15.7605C18.3327 15.2724 18.3327 14.4867 18.3327 12.9154V10.4154C18.3327 8.84403 18.3327 8.05834 17.8445 7.57019C17.3563 7.08203 16.5707 7.08203 14.9993 7.08203H7.91602" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12.7077 11.6654C12.7077 12.4708 12.0548 13.1237 11.2493 13.1237C10.4439 13.1237 9.79102 12.4708 9.79102 11.6654C9.79102 10.8599 10.4439 10.207 11.2493 10.207C12.0548 10.207 12.7077 10.8599 12.7077 11.6654Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
{{ $party->type == 'Supplier' ? __('Advance Pay') : __('Advance Collect') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.parties.edit', [$party->id, 'type' => request('type')]) }}">
|
||||
<i class="fal fa-edit"></i>{{ __('Edit') }}
|
||||
</a>
|
||||
<a
|
||||
href="{{ route('business.parties.edit', [$party->id, 'type' => request('type')]) }}"><i
|
||||
class="fal fa-edit"></i>{{ __('Edit') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
@usercan('parties.delete')
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
@endsection
|
||||
|
||||
@php
|
||||
$file = base_path('lang/countrylist.json');
|
||||
|
||||
if (file_exists($file)) {
|
||||
$countries = json_decode(file_get_contents($file), true);
|
||||
} else {
|
||||
$countries = [];
|
||||
}
|
||||
$type = request('type') !== 'Supplier' ? 'Customer' : 'Supplier';
|
||||
@endphp
|
||||
|
||||
@@ -42,7 +49,7 @@ class="ajaxform_instant_reload">
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Phone') }}</label>
|
||||
<input type="text" value="{{ $party->phone }}" name="phone"
|
||||
<input type="number" value="{{ $party->phone }}" name="phone"
|
||||
class="form-control" placeholder="{{ __('Enter phone number') }}">
|
||||
</div>
|
||||
|
||||
@@ -70,8 +77,7 @@ class="form-control" placeholder="{{ __('Enter phone number') }}">
|
||||
@endif
|
||||
|
||||
@php
|
||||
$branch_id = auth()->user()->branch_id ?? auth()->user()->active_branch_id ?? null;
|
||||
$branch_logic = $party->branch_id != $branch_id;
|
||||
$branch_logic = $party->branch_id != (auth()->user()->active_branch?->id);
|
||||
@endphp
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
@@ -110,11 +116,6 @@ class="form-control" placeholder="{{ __('Enter Email') }}">
|
||||
class="form-control" placeholder="{{ __('Enter Address') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Tax No') }}</label>
|
||||
<input type="text" value="{{ $party->tax_no }}" name="tax_no" class="form-control" placeholder="{{ __('Enter tax') }}">
|
||||
</div>
|
||||
|
||||
<div class="accordion" id="customAccordion">
|
||||
<div class="accordion-item border-0">
|
||||
<h2 class="accordion-header">
|
||||
@@ -130,22 +131,12 @@ class="accordion-button address-accordion collapsed fw-medium text-primary bg-t
|
||||
data-bs-parent="#customAccordion">
|
||||
<div class="accordion-body fst-italic text-secondary p-0">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<select name="country_id" id="country_id" class="form-control">
|
||||
<option value="">{{ __('Select a country') }}</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}" @selected(($party->country_id ?? '') == $country->id)>{{ __($country->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('State') }}</label>
|
||||
<select name="state_id" id="state_id" class="form-control" data-selected="{{ $party->state_id ?? '' }}">
|
||||
<option value="">{{ __('Select state') }}</option>
|
||||
</select>
|
||||
<label>{{ __('Address') }}</label>
|
||||
<input type="text" name="billing_address[address]"
|
||||
value="{{ $party->billing_address['address'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter address') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
@@ -156,6 +147,14 @@ class="form-control"
|
||||
placeholder="{{ __('Enter city') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('State') }}</label>
|
||||
<input type="text" name="billing_address[state]"
|
||||
value="{{ $party->billing_address['state'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter state') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Zip Code') }}</label>
|
||||
<input type="text" name="billing_address[zip_code]"
|
||||
@@ -164,18 +163,24 @@ class="form-control"
|
||||
placeholder="{{ __('Enter zip code') }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Address') }}</label>
|
||||
<input type="text" name="billing_address[address]"
|
||||
value="{{ $party->billing_address['address'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter address') }}">
|
||||
</div>
|
||||
|
||||
@php
|
||||
$billing = is_array($party->billing_address) ? $party->billing_address : json_decode($party->billing_address, true) ?? [];
|
||||
@endphp
|
||||
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<select name="billing_address[country]"
|
||||
class="form-control">
|
||||
<option value="">{{ __('Select a country') }}
|
||||
</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country['name'] }}"
|
||||
@selected(($billing['country'] ?? '') == $country['name'])>
|
||||
{{ __($country['name']) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,7 +204,7 @@ class="accordion-button address-accordion fw-medium text-dark bg-transparent sha
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Address') }}</label>
|
||||
<input type="text" name="shipping_address[address]"
|
||||
value="{{ $party->shipping_address['address'] ?? '' }}"
|
||||
value="{{ $party->billing_address['address'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter address') }}">
|
||||
</div>
|
||||
@@ -207,7 +212,7 @@ class="form-control"
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('City') }}</label>
|
||||
<input type="text" name="shipping_address[city]"
|
||||
value="{{ $party->shipping_address['city'] ?? '' }}"
|
||||
value="{{ $party->billing_address['city'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter city') }}">
|
||||
</div>
|
||||
@@ -215,7 +220,7 @@ class="form-control"
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('State') }}</label>
|
||||
<input type="text" name="shipping_address[state]"
|
||||
value="{{ $party->shipping_address['state'] ?? '' }}"
|
||||
value="{{ $party->billing_address['state'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter state') }}">
|
||||
</div>
|
||||
@@ -223,7 +228,7 @@ class="form-control"
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Zip Code') }}</label>
|
||||
<input type="text" name="shipping_address[zip_code]"
|
||||
value="{{ $party->shipping_address['zip_code'] ?? '' }}"
|
||||
value="{{ $party->billing_address['zip_code'] ?? '' }}"
|
||||
class="form-control"
|
||||
placeholder="{{ __('Enter zip code') }}">
|
||||
</div>
|
||||
@@ -260,7 +265,7 @@ class="form-control">
|
||||
<img src="{{ asset( $party->image ?? 'assets/images/icons/img.png') }}" alt="icon" />
|
||||
</div>
|
||||
<p>{{__('Drag & drop your Image')}}</p>
|
||||
<p>{{__('or')}} <span class="browse-text">{{__('Browse')}}</span></p>
|
||||
<p>or <span class="browse-text">{{__('Browse')}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -285,6 +290,5 @@ class="theme-btn border-btn m-2">{{ __('Cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" value="{{ route('business.get-states.index') }}" id="get-state">
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user