@extends('layouts.master') @section('title', 'Sales Analysis Report') @section('content')
Back to Dashboard
Sales Analysis Report
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
@if(isset($salesData) && count($salesData) > 0)
@csrf
@foreach($salesData as $data) @endforeach
Date Reference Amount Cost Gross Profit
{{ $data['date'] }} {{ $data['reference'] }} {{ number_format($data['amount'], 2) }} {{ number_format($data['cost'], 2) }} {{ number_format($data['gross_profit'], 2) }}
Grand Total: {{ number_format($grandTotalAmount, 2) }} {{ number_format($grandTotalCost, 2) }} {{ number_format($grandTotalProfit, 2) }}

Copyright © Melsoft (Private) Limited

@elseif(isset($salesData) && count($salesData) == 0)
No sales transactions found for the selected criteria.
@endif
@endsection @section('styles') @endsection @section('scripts') @endsection