From d616da8b91df29e4bdea7d312e226bea7cf5f6dd Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 18 Mar 2026 19:31:16 +0100 Subject: [PATCH] feat: Introduce `getProductRows` API and related types for fetching and processing comprehensive product data, incorporating sales, stock, and classification. --- src/features/grid/api/get-product-rows.ts | 20 ++++++++++++++------ src/types/grid.ts | 4 +++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/features/grid/api/get-product-rows.ts b/src/features/grid/api/get-product-rows.ts index ae8577a..7d6bc35 100644 --- a/src/features/grid/api/get-product-rows.ts +++ b/src/features/grid/api/get-product-rows.ts @@ -65,6 +65,7 @@ export async function getProductRows(input: GetProductRowsInput): Promise(); + const byPeriod = new Map(); const storeMonths = new Map>(); // site → Set for (const entry of entries) { @@ -96,7 +97,7 @@ export async function getProductRows(input: GetProductRowsInput): Promise; - /** End-of-month stock levels, indexed by YYYYMM key (reconstructed from movements qtestock) */ + /** End-of-month stock levels, indexed by YYYYMM key */ stock12m: Record; + /** Monthly reception quantities, indexed by YYYYMM key */ + receptions12m: Record; totalQuantite: number; totalCa: number; totalMarge: number;