storing only valid prices
This commit is contained in:
parent
02cb08abf0
commit
03cd6b9af0
|
|
@ -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.
|
* **Required Fields:** Rows are skipped if the product code (`cikkszam`) or product name is missing.
|
||||||
* **Column Mapping Precedence:**
|
* **Column Mapping Precedence:**
|
||||||
* `BESZCIKKNEV`: Use `cikk_megnevezes_rovid`, falling back to `cikk_megnevezes`.
|
* `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
|
## 🗂️ Module Ownership
|
||||||
* **Schema Changes:** Always update struct definitions in `src/template/antares.rs` before making changes to data handling logic.
|
* **Schema Changes:** Always update struct definitions in `src/template/antares.rs` before making changes to data handling logic.
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ pub fn export_to_excel(items: &Antares, path_str: &str) -> Result<(), Box<dyn Er
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write row data
|
// Write row data
|
||||||
|
if unit_price == 0.0 {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
sheet.write_string(row, 0, &cikkszam)?;
|
sheet.write_string(row, 0, &cikkszam)?;
|
||||||
sheet.write_string(row, 1, &cikkszam)?;
|
sheet.write_string(row, 1, &cikkszam)?;
|
||||||
sheet.write_string(row, 2, &megnevezes)?;
|
sheet.write_string(row, 2, &megnevezes)?;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue