@extends('backend.app') @section('title', 'Daily Profit Report') @section('content') {{-- Premium Custom CSS --}}
{{-- Success Message --}} @if(session('success')) @endif {{-- 1. Date Filter Section --}}
{{-- 2. Summary Cards Section --}}
Total Sales

৳ {{ number_format($totalSales, 2) }}

Total Orders: {{ $orders->count() }}
Gross Profit

৳ {{ number_format($grossProfit, 2) }}

Net Sales - Cost
Total Costs

৳ {{ number_format($totalAdCost + $totalOtherExpense, 2) }}

Ad + Expenses
Final Net Profit

৳ {{ number_format($finalNetProfit, 2) }}

Gross - Total Costs
{{-- 3. Ad Costs & Other Expenses Input Section --}}
{{-- Ad Cost Form & Table --}}
Ad Costs {{ \Carbon\Carbon::parse($date)->format('d M') }}
@forelse($adCosts as $ad) @empty @endforelse
Platform USD ($) Rate (৳) Total (৳)
@if($ad->platform == 'Facebook') @elseif($ad->platform == 'Google') @elseif($ad->platform == 'TikTok') @else @endif {{ $ad->platform }} ${{ $ad->usd_amount }} ৳{{ $ad->dollar_rate }} ৳{{ $ad->total_cost }}
No Ad Costs recorded.
Total Ad Cost: ৳{{ number_format($totalAdCost, 2) }}
{{-- Other Expenses Form & Table --}}
Other Expenses {{ \Carbon\Carbon::parse($date)->format('d M') }}
@forelse($otherExpenses as $exp) @empty @endforelse
Details Amount (৳)
{{ $exp->details }} ৳{{ $exp->amount }}
No other expenses recorded.
Total Other Expenses: ৳{{ number_format($totalOtherExpense, 2) }}
{{-- ================= MODALS ================= --}} {{-- Add Ad Cost Modal --}} {{-- Add Other Expense Modal --}} @endsection