@extends('layouts.app') @section('title', __('superadmin::lang.superadmin') . ' | Business') @section('content') @include('superadmin::layouts.nav')

@lang( 'superadmin::lang.view_business' ) {{$business->name}}

{{ $business->name }}

@lang('business.business_name')

{{ $business->name }}

@lang('business.currency')

{{ $business->currency->currency }}

@lang('business.tax_number1')

@if(!empty($business->tax_number_1)) {{ $business->tax_label_1 }}: {{ $business->tax_number_1 }} @endif

@lang('business.tax_number2')

@if(!empty($business->tax_number_2)) {{ $business->tax_label_2 }}: {{ $business->tax_number_2 }} @endif

@lang('business.time_zone')

{{ $business->time_zone }}

@lang('business.is_active') @if($business->is_active == 0)

Inactive

@else

Active

@endif @lang('business.created_by') @if(!empty($created_by))

{{$created_by->surname}} {{$created_by->first_name}} {{$created_by->last_name}}

@endif
@lang('business.owner') @if(!empty($business->owner))

{{$business->owner->surname}} {{$business->owner->first_name}} {{$business->owner->last_name}}

@endif @lang('business.email')

{{$business->owner->email}}

@lang('business.mobile')

{{$business->owner->contact_no}}

@lang('business.address')

{{$business->owner->address}}

@if(!empty($business->logo)) Business Logo @endif

@lang( 'superadmin::lang.assign_common_suppliers' )

@lang('superadmin::lang.manage_suppliers')
@forelse($business->assignedCommonSuppliers as $supplier) @php $master = $supplier->masterSupplier ?? $supplier; $name = trim((string) ($master->name ?? '')); if ($name === '' && ! empty($master->supplier_business_name)) { $name = trim((string) $master->supplier_business_name); } if ($name === '') { $name = 'Supplier #' . $supplier->id; } $email = $master->email ?? ''; $mobile = $master->mobile ?? ''; @endphp @empty @endforelse
@lang('contact.name') @lang('contact.email') @lang('contact.mobile')
{{ $name }} {{ $email }} {{ $mobile }}
@lang('superadmin::lang.no_suppliers_assigned')
@if($business->is_supplier_warehouse)

@lang( 'superadmin::lang.manage_manufacturers' )

@lang('superadmin::lang.manage_manufacturers')

@lang('superadmin::lang.manage_manufacturers_help')

@forelse($business->assignedManufacturers as $manufacturer) @php $name = trim((string) ($manufacturer->name ?? '')); if ($name === '' && ! empty($manufacturer->supplier_business_name)) { $name = trim((string) $manufacturer->supplier_business_name); } if ($name === '') { $name = 'Manufacturer #' . $manufacturer->id; } @endphp @empty @endforelse
@lang('contact.name') @lang('contact.email') @lang('contact.mobile')
{{ $name }} {{ $manufacturer->email ?: '-' }} @if(empty($manufacturer->email)) @lang('superadmin::lang.no_email_warning') @endif {{ $manufacturer->mobile ?: '-' }}
@lang('superadmin::lang.no_manufacturers_assigned')

@lang( 'superadmin::lang.warehouse_minmax_par' )

@lang('superadmin::lang.warehouse_minmax_par_help')

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'seedWarehouseMinMax'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::close() !!}

@lang( 'superadmin::lang.tpm_po_frequency' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveTpmPoFrequency'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::label('tpm_po_frequency_days', __('superadmin::lang.tpm_po_frequency_days') . ':') !!} {!! Form::number('tpm_po_frequency_days', $business->tpm_po_frequency_days, ['class' => 'form-control', 'min' => 1, 'max' => 30, 'style' => 'width:120px', 'placeholder' => __('superadmin::lang.tpm_po_frequency_off_ph')]) !!}

@lang('superadmin::lang.tpm_po_frequency_help') @if(empty($business->tpm_po_frequency_days))
@lang('superadmin::lang.tpm_po_frequency_off') @endif
@if($business->assignedManufacturers->isEmpty()) @lang('superadmin::lang.tpm_none_assigned') @lang('superadmin::lang.manage_manufacturers') @else @lang('superadmin::lang.tpm_po_goes_to'): {{ $business->assignedManufacturers->pluck('name')->filter()->implode(', ') ?: $business->assignedManufacturers->first()->supplier_business_name }} @endif

{!! Form::close() !!}
@endif

@lang( 'superadmin::lang.drug_license' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveDrugLicense'], [$business->id]), 'method' => 'post']) !!}
{!! Form::label('drug_license_20_21_no', __('superadmin::lang.drug_license_no') . ':') !!} {!! Form::text('drug_license_20_21_no', $business->drug_license_20_21_no, ['class' => 'form-control', 'style' => 'width:220px', 'placeholder' => 'DL-20 / 21']) !!}
{!! Form::label('drug_license_20_21_expiry', __('superadmin::lang.drug_license_expiry') . ':') !!} {!! Form::date('drug_license_20_21_expiry', !empty($business->drug_license_20_21_expiry) ? \Carbon\Carbon::parse($business->drug_license_20_21_expiry)->format('Y-m-d') : null, ['class' => 'form-control']) !!}
@if(!empty($business->drug_license_20_21_expiry) && \Carbon\Carbon::parse($business->drug_license_20_21_expiry)->endOfDay()->isPast()) @lang('superadmin::lang.license_expired') @endif

{!! Form::label('drug_license_20b_21b_no', __('superadmin::lang.drug_license_no') . ':') !!} {!! Form::text('drug_license_20b_21b_no', $business->drug_license_20b_21b_no, ['class' => 'form-control', 'style' => 'width:220px', 'placeholder' => 'DL-20B / 21B']) !!}
{!! Form::label('drug_license_20b_21b_expiry', __('superadmin::lang.drug_license_expiry') . ':') !!} {!! Form::date('drug_license_20b_21b_expiry', !empty($business->drug_license_20b_21b_expiry) ? \Carbon\Carbon::parse($business->drug_license_20b_21b_expiry)->format('Y-m-d') : null, ['class' => 'form-control']) !!}
@if(!empty($business->drug_license_20b_21b_expiry) && \Carbon\Carbon::parse($business->drug_license_20b_21b_expiry)->endOfDay()->isPast()) @lang('superadmin::lang.license_expired') @endif
@if($business->is_supplier_warehouse)

@lang('superadmin::lang.drug_license_warehouse_help')

@endif {!! Form::close() !!}

@lang( 'superadmin::lang.other_licenses' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveOtherLicenses'], [$business->id]), 'method' => 'post']) !!}
{!! Form::label('trade_license_no', __('superadmin::lang.license_no') . ':') !!} {!! Form::text('trade_license_no', $business->trade_license_no, ['class' => 'form-control', 'style' => 'width:220px']) !!}
{!! Form::label('trade_license_expiry', __('superadmin::lang.license_expiry') . ':') !!} {!! Form::date('trade_license_expiry', !empty($business->trade_license_expiry) ? \Carbon\Carbon::parse($business->trade_license_expiry)->format('Y-m-d') : null, ['class' => 'form-control']) !!}
@if(!empty($business->trade_license_expiry) && \Carbon\Carbon::parse($business->trade_license_expiry)->endOfDay()->isPast()) @lang('superadmin::lang.license_expired') @endif

{!! Form::label('shop_establishment_license_no', __('superadmin::lang.license_no') . ':') !!} {!! Form::text('shop_establishment_license_no', $business->shop_establishment_license_no, ['class' => 'form-control', 'style' => 'width:220px']) !!}
{!! Form::label('shop_establishment_license_expiry', __('superadmin::lang.license_expiry') . ':') !!} {!! Form::date('shop_establishment_license_expiry', !empty($business->shop_establishment_license_expiry) ? \Carbon\Carbon::parse($business->shop_establishment_license_expiry)->format('Y-m-d') : null, ['class' => 'form-control']) !!}
@if(!empty($business->shop_establishment_license_expiry) && \Carbon\Carbon::parse($business->shop_establishment_license_expiry)->endOfDay()->isPast()) @lang('superadmin::lang.license_expired') @endif

{!! Form::label('fssai_license_no', __('superadmin::lang.license_no') . ':') !!} {!! Form::text('fssai_license_no', $business->fssai_license_no, ['class' => 'form-control', 'style' => 'width:220px']) !!}
{!! Form::label('fssai_license_expiry', __('superadmin::lang.license_expiry') . ':') !!} {!! Form::date('fssai_license_expiry', !empty($business->fssai_license_expiry) ? \Carbon\Carbon::parse($business->fssai_license_expiry)->format('Y-m-d') : null, ['class' => 'form-control']) !!}
@if(!empty($business->fssai_license_expiry) && \Carbon\Carbon::parse($business->fssai_license_expiry)->endOfDay()->isPast()) @lang('superadmin::lang.license_expired') @endif
{!! Form::close() !!}

@lang( 'superadmin::lang.store_unique_number' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveStoreNumber'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::label('store_unique_number', __('superadmin::lang.store_unique_number') . ':') !!} {!! Form::text('store_unique_number', $business->store_unique_number, ['class' => 'form-control', 'style' => 'width:220px', 'placeholder' => __('superadmin::lang.store_unique_number_placeholder')]) !!}

@lang('superadmin::lang.store_unique_number_help')

{!! Form::close() !!}

@lang( 'superadmin::lang.auto_po_frequency' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveAutoPoFrequency'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::label('auto_po_frequency_days', __('superadmin::lang.auto_po_frequency_days') . ':') !!} {!! Form::number('auto_po_frequency_days', $business->auto_po_frequency_days, ['class' => 'form-control', 'min' => 1, 'max' => 30, 'style' => 'width:120px', 'placeholder' => __('superadmin::lang.inherit')]) !!}

@lang('superadmin::lang.auto_po_frequency_help') @if(empty($business->auto_po_frequency_days) && !empty($effective_auto_po_frequency))
@lang('superadmin::lang.auto_po_frequency_inherited', ['days' => $effective_auto_po_frequency]) @elseif(empty($effective_auto_po_frequency))
@lang('superadmin::lang.auto_po_frequency_off') @endif

{!! Form::close() !!} {{-- Urgent (off-cycle) threshold. Lives in the same box as the cadence because the two only make sense together: the cadence says when the combined PO goes out, this says when one product refuses to wait. --}} @if(empty($business->is_supplier_warehouse))
{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveUrgentPoPercent'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::label('urgent_po_min_percent', __('superadmin::lang.urgent_po_min_percent') . ':') !!} {!! Form::number('urgent_po_min_percent', $business->settingFromCommonSettings('urgent_po_min_percent'), ['class' => 'form-control', 'min' => 0, 'max' => 100, 'style' => 'width:120px', 'placeholder' => __('superadmin::lang.inherit')]) !!}

@lang('superadmin::lang.urgent_po_min_percent_help') @php $effective_urgent_pct = $business->effectiveUrgentPoMinPercent(); @endphp @if(!empty($effective_urgent_pct))
@lang('superadmin::lang.urgent_po_min_percent_effective', ['percent' => $effective_urgent_pct]) @else
@lang('superadmin::lang.urgent_po_min_percent_off') @endif

{!! Form::close() !!} @endif

@if($assigned_suppliers->isEmpty()) @lang('superadmin::lang.auto_po_supplier_none_assigned') @lang('superadmin::lang.assign_common_suppliers') @else @lang('superadmin::lang.auto_po_goes_to'): {{ $assigned_suppliers->implode(', ') }} (@lang('superadmin::lang.assign_common_suppliers')) @endif

@lang( 'superadmin::lang.sell_return_policy' )

{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\BusinessController::class, 'saveReturnPolicy'], [$business->id]), 'method' => 'post', 'class' => 'form-inline']) !!}
{!! Form::label('sell_return_period_days', __('superadmin::lang.sell_return_period_days') . ':') !!} {!! Form::number('sell_return_period_days', $business->sell_return_period_days, ['class' => 'form-control', 'min' => 0, 'style' => 'width:120px', 'placeholder' => '0']) !!}

@lang('superadmin::lang.sell_return_period_days_help')

{!! Form::close() !!}

@lang( 'superadmin::lang.business_location' )

@foreach($business->locations as $location) @endforeach
Name Location ID Landmark city Zip Code State Country
{{ $location->name }} {{ $location->location_id }} {{ $location->landmark }} {{ $location->city }} {{ $location->zip_code }} {{ $location->state }} {{ $location->country }}

@lang( 'superadmin::lang.package_subscription' )

@foreach($business->subscriptions as $subscription) @endforeach
Package Name Start Date Trail End Date End Date Paid Via Payment Transaction ID Created At Created By
{{ $subscription->package_details['name'] }} @if(!empty($subscription->start_date)){{@format_date($subscription->start_date)}}@endif @if(!empty($subscription->trial_end_date)){{@format_date($subscription->trial_end_date)}}@endif @if(!empty($subscription->end_date)){{@format_date($subscription->end_date)}}@endif {{ $subscription->paid_via }} {{ $subscription->payment_transaction_id }} {{ $subscription->created_at }} @if(!empty($subscription->created_user)) {{$subscription->created_user->user_full_name}} @endif
@component('components.widget', ['class' => 'box-default', 'title' => __( 'user.all_users' )]) @can('user.view')
@lang( 'business.username' ) @lang( 'user.name' ) @lang( 'user.role' ) @lang( 'business.email' ) @lang( 'messages.action' )
@endcan @endcomponent @include('superadmin::business.update_password_modal')
@stop @section('javascript') @endsection