@extends('layouts.main') @section('title', 'New AI Report Analysis') @section('container')

AI Report Builder — Upload Files

3 files, 3 roles:
① Input File — Your raw source data file containing all the actual rows to be processed (e.g. stock audit data, sales export, distributor data).
② Expected Output File — The Excel file you want the system to generate. It must contain the final columns, grouping and totals you expect in the report. The AI learns column mapping, grouping rules and calculations from this file.
③ Expected Report (Optional) — A design/layout reference for the final branded report (logo, header rows, merged cells). The AI uses this file only for formatting — not for data mapping. If your Expected Output File is already fully formatted (e.g. HCCB report), upload it here as well.
@csrf {{-- Analysis Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Step 1: Input File --}}
Your raw source data — the file containing all the rows that need to be processed. Example: stock audit export, sales data, distributor inventory file, etc.

Input File — raw source data with all rows

Excel (.xlsx, .xls) or CSV — max {{ number_format(config('ai_report_builder.upload.max_size_kb')/1024, 0) }} MB

@error('input_file')
{{ $message }}
@enderror
{{-- Step 2: Output File --}}
The Excel file you want the system to generate. It must contain the actual output columns — e.g. Product Type, Book Stock, Damaged Stock, Total etc. The AI learns column mapping and grouping rules from this file.
Example: a sample "Report Output.xlsx" with grouped rows and totals — dummy data is fine as long as the structure is correct.

Expected Output File — final columns + grouped rows + totals

Excel (.xlsx, .xls) or CSV — max {{ number_format(config('ai_report_builder.upload.max_size_kb')/1024, 0) }} MB

@error('output_file')
{{ $message }}
@enderror
{{-- Step 3: Report (optional) --}}
For design/formatting only — company logo, merged header rows, title rows, branded layout. The AI reads this file solely for the visual layout of the final report, not for data mapping.
Example: an HCCB branded report where rows 1–10 are the header section and data starts below. If your Expected Output File is already fully formatted, you can skip this field or upload the same file again.

Design Reference — formatted/branded report (Optional)

Logo, title rows, merged headers — used for layout only, not data mapping

@error('report_file')
{{ $message }}
@enderror

Back
@endsection