feat: add server-side API for fetching and processing comprehensive product data for the grid.

This commit is contained in:
Michael committed 2026-03-23 14:00:27 +01:00
1 parent 99954fb001
commit 53b85381fa
7 files changed
+152 -59

No files matched your search

+10
View File
@@ -52,6 +52,16 @@ export interface ProductRow {
stock12m: Record<string, number>;
/** Monthly reception quantities, indexed by YYYYMM key */
receptions12m: Record<string, number>;
/** Per-store breakdown (site → YYYYMM → qty) — always present even in TOTAL mode */
sales12mByStore?: Record<string, Record<string, number>>;
/** Per-store stock breakdown (site → YYYYMM → stock) */
stock12mByStore?: Record<string, Record<string, number>>;
/** Per-store CA totals */
caByStore?: Record<string, number>;
/** Per-store quantity totals */
quantiteByStore?: Record<string, number>;
/** Per-store margin totals */
margeByStore?: Record<string, number>;
totalQuantite: number;
totalCa: number;
totalMarge: number;