<?php

namespace App\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class DailySalesSummaryResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'company_id' => $this->company_id,
            'branch_id' => $this->branch_id,
            'summary_date' => $this->summary_date,
            'total_orders' => $this->total_orders,
            'total_items_sold' => $this->total_items_sold,
            'gross_sales' => $this->gross_sales,
            'total_discounts' => $this->total_discounts,
            'total_taxes' => $this->total_taxes,
            'net_sales' => $this->net_sales,
            'total_cost' => $this->total_cost,
            'gross_profit' => $this->gross_profit,
            'total_returns' => $this->total_returns,
            'cash_payments' => $this->cash_payments,
            'mpesa_payments' => $this->mpesa_payments,
            'card_payments' => $this->card_payments,
            'other_payments' => $this->other_payments,
            'total_expenses' => $this->total_expenses,
            'new_customers' => $this->new_customers,
        ];
    }
}
