Add Inventory Report

This commit is contained in:
Aditya Siregar
2025-08-14 00:38:26 +07:00
parent bb9a81c7c1
commit 7adba2c8f5
9 changed files with 177 additions and 85 deletions
+6
View File
@@ -70,6 +70,8 @@ type InventoryReportSummary struct {
LowStockIngredients int `json:"low_stock_ingredients"`
ZeroStockProducts int `json:"zero_stock_products"`
ZeroStockIngredients int `json:"zero_stock_ingredients"`
TotalSoldProducts float64 `json:"total_sold_products"`
TotalSoldIngredients float64 `json:"total_sold_ingredients"`
OutletID uuid.UUID `json:"outlet_id"`
OutletName string `json:"outlet_name"`
GeneratedAt time.Time `json:"generated_at"`
@@ -90,6 +92,7 @@ type InventoryProductDetail struct {
ReorderLevel int `json:"reorder_level"`
UnitCost float64 `json:"unit_cost"`
TotalValue float64 `json:"total_value"`
TotalSold float64 `json:"total_sold"`
IsLowStock bool `json:"is_low_stock"`
IsZeroStock bool `json:"is_zero_stock"`
UpdatedAt time.Time `json:"updated_at"`
@@ -104,6 +107,7 @@ type InventoryIngredientDetail struct {
ReorderLevel int `json:"reorder_level"`
UnitCost float64 `json:"unit_cost"`
TotalValue float64 `json:"total_value"`
TotalSold float64 `json:"total_sold"`
IsLowStock bool `json:"is_low_stock"`
IsZeroStock bool `json:"is_zero_stock"`
UpdatedAt time.Time `json:"updated_at"`
@@ -117,4 +121,6 @@ type InventoryReportFilter struct {
Search *string `json:"search"`
Limit *int `json:"limit"`
Offset *int `json:"offset"`
DateFrom *time.Time `json:"date_from"`
DateTo *time.Time `json:"date_to"`
}