@extends('layouts.app') @section('content')
@php($etimsEnabled = ($settings['etims_mode'] ?? 'disabled') !== 'disabled')

eTIMS Setup

Configure demonstration, sandbox and future certified integrations without changing the selling workflow.
Back to Settings
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
Check the following:
@endif @if(($settings['etims_mode'] ?? 'disabled') === 'demo')
Demo Simulator is active. Generated references are demonstrations only and are not KRA fiscal invoices.
@endif @unless($etimsEnabled)
eTIMS is disabled. Its product fields, fiscal documents and receipt details are hidden throughout the system.
@endunless @if($etimsEnabled)
Accepted{{ number_format($summary['accepted']) }}
Pending{{ number_format($summary['pending']) }}
Failed{{ number_format($summary['failed']) }}
Products Missing HS Code{{ number_format($summary['missing_hs']) }}
@endif

Integration Configuration

Production remains protected until a certified connector is installed.
@if(auth()->user()->hasPermission('settings.etims_manage'))
@csrf
Stored encrypted and never displayed again.
Use the address other devices can reach, not localhost.
@else
You can view eTIMS status but do not have permission to change its configuration.
@endif
@if($etimsEnabled)

eTIMS Documents

{{ number_format($summary['missing_classification']) }} product(s) are missing KRA item classification codes.
@forelse($documents as $document) @empty @endforelse
DateBranchTypeInvoiceEnvironmentStatusControl Unit No.Receipt No.AttemptsMessageAction
{{ $document->created_at?->format('Y-m-d H:i') }} {{ $document->branch?->name ?: '-' }} {{ str($document->document_type)->replace('_',' ')->title() }} {{ $document->sale?->invoice_no ?: $document->local_reference }} {{ strtoupper($document->environment) }} {{ ucfirst($document->status) }} {{ $document->control_unit_invoice_no ?: '-' }} {{ $document->kra_receipt_no ?: '-' }} {{ $document->attempt_count }} {{ $document->error_message ?: ($document->environment === 'demo' ? 'Demo acknowledgement' : '-') }} @if($document->status !== 'accepted' && auth()->user()->hasPermission('settings.etims_retry'))
@csrf
@else - @endif
No eTIMS documents have been generated yet.
@if($documents->hasPages())
{{ $documents->links() }}
@endif
@endif
@endsection