@php $canEditSettings = \App\Support\AdminAccess::canAction('settings', 'edit'); $canEditFbrSettings = $canEditSettings && $fbrSettingsUnlocked; @endphp

{{ __('Admin Settings') }}

{{ __('Update your business details, receipt logo, and password from one place.') }}

{{ __('Logged in as') }} {{ $admin->name }} ({{ $admin->email }})
@if (session()->has('message'))
{{ session('message') }}
@endif @unless($canEditSettings)
{{ __('You can view settings, but editing business details is disabled for your account.') }}
@endunless @php $canManageBranches = \App\Support\AdminAccess::can('branches') && ! session()->has('staff_id'); $packageExpired = ! $admin->hasValidPackage(); @endphp
@include('livewire.admin.settings.whatsapp')

{{ __('Receipt Customer Fields') }}

{{ __('Tick the customer details you want to show on POS receipts, then save your choices.') }}

@foreach ([ 'show_receipt_customer_name' => 'Customer Name', 'show_receipt_customer_phone' => 'Phone Number', 'show_receipt_customer_email' => 'Email', 'show_receipt_customer_address' => 'Address', 'show_receipt_customer_trn' => 'TRN (Tax Number)', 'show_receipt_customer_ntn' => 'NTN Number', 'show_receipt_customer_registration' => 'Registration Number', ] as $field => $label)
@error($field)
{{ $message }}
@enderror
@endforeach

{{ __('Business Details') }}

{{ __('Set the business name, phone number, address, and receipt terms that will appear on your slip and panel.') }}

@php $currentPackage = $admin->package; @endphp
{{ __('Package Status') }}
@if ($currentPackage) {{ $currentPackage->name }} @if ($admin->isPackageExpired()) {{ __('Expired') }} @else {{ __('Active') }} @endif @else {{ __('No package assigned') }} @endif
{{ __('Remaining Time') }}
{{ $this->packageRemainingTime() }}
@if ($currentPackage && $admin->package_expires_at)
{{ __('Expires on') }}: {{ $admin->package_expires_at->format('d M Y') }}
@endif
@error('shop_name')
{{ $message }}
@enderror
@error('shop_name_urdu')
{{ $message }}
@enderror
@error('phone')
{{ $message }}
@enderror
@error('address')
{{ $message }}
@enderror
@error('address_urdu')
{{ $message }}
@enderror
@error('receipt_terms')
{{ $message }}
@enderror
{{ __('These terms will appear on the printed receipt above the thank you line.') }}
@error('show_receipt_terms')
{{ $message }}
@enderror
@error('pos_receipt_size')
{{ $message }}
@enderror
{{ __('Choose the paper size used when printing POS sales receipts.') }}
{{ __('This data is saved only for your admin account and can be updated anytime.') }}
@if($canEditSettings)
@endif

{{ __('Current Package') }}

{{ $currentPackage?->name ?? __('No package assigned') }}
@if($currentPackage && $admin->package_expires_at)
{{ __('Expires on') }}
{{ $admin->package_expires_at->format('d M Y') }}
@endif
@if($pendingPackageRequest)
Your {{ $pendingPackageRequest->type }} request for {{ $pendingPackageRequest->package?->name }} is waiting for super admin review. @if($pendingPackageRequest->payment_proof_path) @endif
@else

{{ __('Compare package validity and included modules, then send a renewal or upgrade request.') }}

@forelse($availablePackages as $availablePackage)
@php $moduleCount = count($availablePackage->modules ?? []); @endphp
{{ $availablePackage->name }}
{{ $availablePackage->duration_label }}
@if($currentPackage?->id === $availablePackage->id){{ __('Current') }}@endif @if($availablePackage->show_price && $availablePackage->price !== null) PKR {{ number_format((float) $availablePackage->price, 2) }} @endif
@if($availablePackage->description)

{{ $availablePackage->description }}

@endif
{{ __('Included modules') }} {{ $moduleCount }}
@forelse($availablePackage->modules ?? [] as $moduleIndex => $moduleKey) {{ $packageModuleLabels[$moduleKey] ?? \Illuminate\Support\Str::headline($moduleKey) }} @empty {{ __('No modules listed') }} @endforelse
@if($moduleCount > 6) @endif
@empty
{{ __('No active packages are available right now.') }}
@endforelse
@endif
{{ __('Submit Package Request') }}

{{ __('Selected package') }}: {{ $requestedPackage?->name ?? __('Loading...') }}

@error('packagePaymentProof')
{{ $message }}
@enderror @error('requested_package_id')
{{ $message }}
@enderror
{{ __('Upload JPG, PNG, or PDF. Maximum size: 5 MB.') }}
{{ __('Uploading proof...') }}
@if($packagePaymentProof)
{{ __('Selected') }}: {{ $packagePaymentProof->getClientOriginalName() }}
@endif

{{ __('FBR Digital Invoicing') }}

{{ __('FBR settings are saved separately from business details for this business account.') }}

@if (! $admin->fbr_settings_pin)
{{ __('An FBR settings PIN has not been configured for this admin account. Please contact the super admin.') }}
@elseif (! $fbrSettingsUnlocked)
{{ __('Unlock FBR Settings') }}
{{ __('Enter the PIN issued for this admin account to edit FBR settings.') }}
@if ($canEditSettings)
@error('fbr_unlock_pin')
{{ $message }}
@enderror
@else
{{ __('You do not have permission to edit settings.') }}
@endif
@else
@endif
@error('tax_calculation_mode')
{{ $message }}
@enderror
@error('fbr_pos_id')
{{ $message }}
@enderror
@error('fbr_seller_ntn')
{{ $message }}
@enderror
{{ __('Leave blank to keep the already saved token.') }} @if ($has_platform_fbr_sandbox_auth_token && $fbr_environment === 'sandbox') {{ __('If no admin token is saved, the Super Admin default Sandbox token will be used.') }} @endif
@if($canEditFbrSettings)
@endif

{{ __('POS Receipt Logo') }}

{{ __('The main panel logo is controlled by the super admin. You can only manage the separate POS receipt logo here.') }}

@if ($new_pos_receipt_logo) New POS receipt logo preview

{{ __('Preview of the new POS receipt logo.') }}

@elseif ($current_pos_receipt_logo) Current POS receipt logo

{{ __('This POS receipt logo is currently active.') }}

@else Default POS receipt logo

{{ __('No separate POS receipt logo is set yet.') }}

@endif
@error('new_pos_receipt_logo')
{{ $message }}
@enderror
{{ __('Allowed file types: image only. Maximum size: 2MB.') }}
@error('show_pos_receipt_logo')
{{ $message }}
@enderror
{{ __('Tick it to show the separate POS logo on printed receipts.') }}
@if($canEditSettings)
@if ($current_pos_receipt_logo) @endif
@endif
{{ __('Uploading logo, please wait...') }}

{{ __('Reset Password') }}

{{ __('Use your current password first, then set a new one.') }}

@error('current_password')
{{ $message }}
@enderror
@error('new_password')
{{ $message }}
@enderror
@if($canEditSettings) @endif

{{ __('Language Settings') }}

{{ __('Select your preferred panel language. It will stay the same every time you log in.') }}

@error('locale')
{{ $message }}
@enderror
@if($canEditSettings)
@endif
@if ($canManageBranches)

{{ __('Branches') }}

{{ __('Create and manage your branches from here instead of the sidebar.') }}

{{ __('Manage Branches') }}
@endif