namespace ERPCore.Dtos.Sales;

public sealed record SalesDailySummaryRowDto(
    DateOnly Date,
    int InvoiceCount,
    int SlipCount,
    decimal InvoiceSubtotal,
    decimal SlipSubtotal,
    decimal DiscountTotal,
    decimal FreeQtyTotal,
    decimal TaxTotal,
    decimal GrandTotal);

public sealed record SalesItemSummaryRowDto(
    int ItemId,
    string ItemName,
    decimal SoldQty,
    decimal FreeQty,
    decimal GrossAmount,
    decimal DiscountTotal,
    decimal TaxTotal,
    decimal NetAmount);

public sealed record SalesCustomerSummaryRowDto(
    int CustomerId,
    string CustomerName,
    int InvoiceCount,
    int SlipCount,
    decimal SoldQty,
    decimal FreeQty,
    decimal GrossAmount,
    decimal DiscountTotal,
    decimal TaxTotal,
    decimal NetAmount);

public sealed record SalesWarehouseSummaryRowDto(
    int WarehouseId,
    string WarehouseName,
    int InvoiceCount,
    int SlipCount,
    decimal SoldQty,
    decimal FreeQty,
    decimal GrossAmount,
    decimal DiscountTotal,
    decimal TaxTotal,
    decimal NetAmount);

public sealed record SalesDiscountSummaryRowDto(
    string DocumentType,
    string DocumentNo,
    DateTime DocumentDate,
    string CustomerName,
    decimal Subtotal,
    decimal DiscountTotal,
    decimal TaxTotal,
    decimal NetAmount);

public sealed record SalesFreeIssueSummaryRowDto(
    string DocumentType,
    string DocumentNo,
    DateTime DocumentDate,
    string CustomerName,
    int ItemId,
    string ItemName,
    decimal FreeQty,
    decimal FreeValue,
    int WarehouseId,
    string WarehouseName);
