@extends('backEnd.layouts.master') @section('title', 'Daily Sales & Expense Reports') @push('styles') @include('backEnd.reports.partials.report-styles') @endpush @section('content') @php $exportParams = request()->only(['from_date','to_date','from','to','search','sales_basis','result_filter','approved_by','payment_method','courier_type','district','order_source','expense_category_id']); $activeExpenseCategory = isset($filters['expense_category_id']) && $filters['expense_category_id'] !== '' ? (int) $filters['expense_category_id'] : null; $todayStr = now()->format('Y-m-d'); $yesterdayStr = now()->copy()->subDay()->format('Y-m-d'); $last7From = now()->copy()->subDays(6)->format('Y-m-d'); $thisMonthFrom = now()->startOfMonth()->format('Y-m-d'); $lastMonthFrom = now()->copy()->subMonth()->startOfMonth()->format('Y-m-d'); $lastMonthTo = now()->copy()->subMonth()->endOfMonth()->format('Y-m-d'); $last90From = now()->copy()->subDays(89)->format('Y-m-d'); $activePreset = ''; if ($from === $to && $from === $todayStr) $activePreset = 'today'; elseif ($from === $to && $from === $yesterdayStr) $activePreset = 'yesterday'; elseif ($from === $last7From && $to === $todayStr) $activePreset = 'last7'; elseif ($from === $thisMonthFrom && $to === $todayStr) $activePreset = 'this_month'; elseif ($from === $lastMonthFrom && $to === $lastMonthTo) $activePreset = 'last_month'; elseif ($from === $last90From && $to === $todayStr) $activePreset = 'last90'; @endphp
@endsection @push('scripts') @endpush