@extends('layouts.app') @section('title', 'Import Historical Sales Data') @section('content')

📤 Import Historical Data

Upload your past sales data (2022-2024) via CSV or XLSX

@if(session('success'))

{{ session('success') }}

@endif @if(session('error'))

{{ session('error') }}

@endif @if(session('warning'))

{{ session('warning') }}

@if(session('errors') && count(session('errors')) > 0) @endif
@endif @if($errors->any())

Please fix the following errors:

@endif

Step 1: Download Template

Download the template file and fill in your historical sales data.

File Format

  • • Year: 4-digit year (e.g., 2022)
  • • Month: Number 1-12 (e.g., 1 for January)
  • • Revenue: Total revenue amount (e.g., 45000)
  • • Orders: Total number of orders (e.g., 280)
  • • Expenses: Total expenses for the month (e.g., 5000)
  • • Notes: Optional notes (e.g., "Chinese New Year")

Step 2: Upload Your File

@csrf

Supported formats: CSV, XLSX, XLS (max 10MB)

Cancel
@if($existingData->count() > 0)

Existing Imported Data

Data already in the system (will be updated if you re-import same period)

@foreach($existingData as $record) @endforeach
Period Revenue Expenses Net Profit Orders AOV Source
{{ $record->period }} RM {{ number_format($record->revenue, 2) }} RM {{ number_format($record->expenses, 2) }} RM {{ number_format($record->net_profit, 2) }} {{ number_format($record->orders) }} RM {{ number_format($record->aov, 2) }} {{ strtoupper($record->import_source) }}
@endif
@endsection