Add cutting workbook normalizer

This commit is contained in:
Cauê Faleiros
2026-07-07 14:41:35 -03:00
parent c881dd7dde
commit fedb1c88a8
2 changed files with 534 additions and 0 deletions

View File

@@ -52,6 +52,21 @@ The scheduled endpoint is API-key protected and returns a summary:
}
```
### Cutting Workbook Import
Manual cutting/replenishment workbooks can be normalized into JSON before they
are persisted or shown in the app:
```bash
python3 backend/scripts/normalize_cut_workbook.py "/path/to/NECESSIDADE DE CORTE.xlsx" --pretty -o /tmp/necessidade_corte_normalized.json
```
The output includes purchase need rows, production orders, finished stock,
stock plus OP availability, real purchase need, outside items, and cut-plan
sections by family (`BLCS`, `BLMC`, `BLOS`, `BLPM`). The importer reads cached
workbook values and reports broken formula references instead of making the app
depend on Excel formulas at runtime.
## Local Development
Start PostgreSQL: