@extends('layouts.app') @section('title','Focus Invoice Archive') @section('content')

Focus Invoice Archive

{{ $company->name }} — historical invoices are staged for review before any ERP posting

@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())@endif

Analyze a Focus XML export

The original file and its checksum are retained. Uploading the same file again does not duplicate it. Analysis never changes stock, balances, customer accounts or invoice sequences.

@csrf

Focus voucher types

Define each Focus voucher code only after checking a known document. Until mapped, imported transactions remain unclassified.

@csrf
@if($voucherMappings->isNotEmpty())

@foreach($voucherMappings as $mapping){{ $mapping->focus_voucher_type }} → {{ $mapping->document_type }}@if(!$loop->last) · @endif @endforeach

@endif
{{ $batches->total() }}
Unique Focus exports
{{ $transactions->count() }}
Latest 100
{{ $transactions->where('status','needs_mapping')->count() }}
No posting permitted
{{ $transactions->where('status','ready_for_review')->count() }}
Still not posted

Imported files

Exact source copy, transaction totals and mapping state.

@forelse($batches as $batch) @empty@endforelse
FileStatusTransactionsReadyNeeds mappingUploaded
{{ $batch->original_filename }}
{{ substr($batch->file_sha256,0,16) }}…
{{ ucwords(str_replace('_',' ',$batch->status)) }}{{ $batch->transaction_count }}{{ $batch->ready_count }}{{ $batch->unresolved_count }}{{ $batch->created_at }}
No Focus invoice files have been uploaded.
{{ $batches->links() }}

Historical transactions

Raw Focus values are preserved. Document type remains unassigned until voucher semantics are confirmed.

@forelse($transactions as $row)@empty@endforelse
DocumentDateVoucherAccount / customerSalespersonBookLinesRaw netStatus
{{ $row->document_number }}{{ $row->document_date ?: '—' }}{{ $row->voucher_type }}
{{ $row->document_type ? ucwords(str_replace('_',' ',$row->document_type)) : 'Unclassified' }}
{{ $row->focus_account_code ?: '—' }}@if($row->customer_name)
{{ $row->customer_name }}@endif
{{ $row->focus_salesperson_code ?: '—' }}@if($row->salesperson_name)
{{ $row->salesperson_name }}@endif
{{ $row->focus_book_code ?: '—' }}{{ $row->line_count }}{{ $row->net_raw }}{{ ucwords(str_replace('_',' ',$row->status)) }}
No historical Focus transactions analyzed.
@endsection