@extends('layouts.admin') @section('title', 'Calculation Log Details') @section('content')

Calculation Log Details

Calculation Information
Calculation ID #{{ $calculationLog->id }}
HS Code {{ $calculationLog->getInputValue('hs_code', 'N/A') }}
Country of Origin {{ $calculationLog->getInputValue('country_of_origin', 'N/A') }}
CIF Value {{ $calculationLog->getInputValue('currency', 'KES') }} {{ number_format($calculationLog->getInputValue('cif_value', 0), 2) }}
Total Taxes KES {{ number_format($calculationLog->total_payable, 2) }}
Calculated By {{ $calculationLog->user->name ?? 'System' }}
{{ $calculationLog->user->email ?? 'N/A' }}
Calculation Date {{ $calculationLog->created_at->format('M j, Y H:i:s') }}
HS Code Information
@php $hsCodeDetails = $calculationLog->getResultValue('hs_code_details', []); @endphp
HS Code {{ $hsCodeDetails['code'] ?? 'N/A' }}
Description {{ $hsCodeDetails['description'] ?? 'N/A' }}
Duty Type {{ ucfirst($hsCodeDetails['duty_type'] ?? 'N/A') }}
Duty Value {{ $hsCodeDetails['duty_value'] ?? 'N/A' }} @if(($hsCodeDetails['duty_type'] ?? '') === 'percentage')% @endif
Excise Applicable @if($hsCodeDetails['excise_applicable'] ?? false) Yes @else No @endif
Sensitive Goods @if($hsCodeDetails['sensitive'] ?? false) Yes @else No @endif
Tax Breakdown
@php $breakdown = $calculationLog->getResultValue('breakdown', []); $taxBase = $calculationLog->getResultValue('tax_base', []); @endphp
CIF Value

KES {{ number_format($taxBase['cif_value'] ?? 0, 2) }}

Benchmark Applied

@if($taxBase['benchmark_applied'] ?? false) Yes
KES {{ number_format($taxBase['benchmark_value'] ?? 0, 2) }} @else No @endif

Final Tax Base

KES {{ number_format($taxBase['final_tax_base'] ?? 0, 2) }}

@if(($breakdown['excise_duty'] ?? 0) > 0) @endif
Tax Type Amount (KES) Percentage of Total
Import Duty {{ number_format($breakdown['import_duty'] ?? 0, 2) }} {{ $calculationLog->total_payable > 0 ? number_format(($breakdown['import_duty'] ?? 0) / $calculationLog->total_payable * 100, 1) : 0 }}%
Excise Duty {{ number_format($breakdown['excise_duty'] ?? 0, 2) }} {{ $calculationLog->total_payable > 0 ? number_format(($breakdown['excise_duty'] ?? 0) / $calculationLog->total_payable * 100, 1) : 0 }}%
VAT {{ number_format($breakdown['vat'] ?? 0, 2) }} {{ $calculationLog->total_payable > 0 ? number_format(($breakdown['vat'] ?? 0) / $calculationLog->total_payable * 100, 1) : 0 }}%
IDF {{ number_format($breakdown['idf'] ?? 0, 2) }} {{ $calculationLog->total_payable > 0 ? number_format(($breakdown['idf'] ?? 0) / $calculationLog->total_payable * 100, 1) : 0 }}%
RDL {{ number_format($breakdown['rdl'] ?? 0, 2) }} {{ $calculationLog->total_payable > 0 ? number_format(($breakdown['rdl'] ?? 0) / $calculationLog->total_payable * 100, 1) : 0 }}%
Total Taxes Payable KES {{ number_format($calculationLog->total_payable, 2) }} 100%
Raw Data
Input Data
{{ json_encode($calculationLog->input, JSON_PRETTY_PRINT) }}
Result Data
{{ json_encode($calculationLog->result, JSON_PRETTY_PRINT) }}
@endsection @push('styles') @endpush