From 03cd6b9af02ceb8fbeccbf6f0430ad04bef87848 Mon Sep 17 00:00:00 2001 From: kvillers Date: Mon, 4 May 2026 13:40:07 +0200 Subject: [PATCH] storing only valid prices --- AGENTS.md | 2 +- src/tools/excel.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 9917040..723be8b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,7 +23,7 @@ The Excel sheet does not use a simple JSON dump; it implements specific business * **Required Fields:** Rows are skipped if the product code (`cikkszam`) or product name is missing. * **Column Mapping Precedence:** * `BESZCIKKNEV`: Use `cikk_megnevezes_rovid`, falling back to `cikk_megnevezes`. - * `EGYSEGAR`: Prefer `netto_kisker_ar`. If zero, check the product description (`cikk_jellemzok`) for an entry matching `"Alap ár"`. + * **Export Filter:** Rows are skipped if the unit price (`EGYSEGAR`) is zero after applying business logic. ## 🗂️ Module Ownership * **Schema Changes:** Always update struct definitions in `src/template/antares.rs` before making changes to data handling logic. diff --git a/src/tools/excel.rs b/src/tools/excel.rs index 45d5eeb..dafd0d6 100644 --- a/src/tools/excel.rs +++ b/src/tools/excel.rs @@ -88,6 +88,9 @@ pub fn export_to_excel(items: &Antares, path_str: &str) -> Result<(), Box