JEI_Import_Documents-App/scripts
Mavis 006a324081 feat: OCR scanned PDFs and capture all 11 missing stock codes
- Installed Tesseract OCR via winget
- Added scripts/ocr_invoices.py to OCR all PDFs via PyMuPDF
- Updated extract_invoices.py to fall back to OCR text for scanned pages
- Fixed stock-code regex to match "qty + code" pairs only (avoids spurious
  matches like bare TCT in invoice headers)
- Added merge step to combine multi-page proformas into single invoice records
- All 11 previously-missing codes now in PB:
  JEITCS12, JEITCS18, JEITCS22, JEITCL22, JEITCL92,
  JEICS17, JEICS19, JEICS27, JEICS30, JEICS34, JEICS14-P1
- Only JEITCS50 remains unlisted (genuinely never ordered)

PB now: 19 invoices, 158 stock codes, 281 line items
2026-09-18 06:12:30 +02:00
..
cleanup_lines.py fix: cleanup 6x duplicate lines + bogus JEISA000 stock code 2026-09-18 00:41:26 +02:00
create_collections.py feat: working JEI invoice tracker with PB import + UI on port 6002 2026-09-17 23:07:56 +02:00
debug_invoices.mjs fix: avoid PB SDK filter=undefined serialization (caused 400 errors) 2026-09-17 23:17:58 +02:00
debug_pb_fields.mjs fix: bypass Next.js fetch-cache for PB SDK calls 2026-09-17 23:59:13 +02:00
extract_invoices.py feat: OCR scanned PDFs and capture all 11 missing stock codes 2026-09-18 06:12:30 +02:00
import_to_pb.py fix: cleanup 6x duplicate lines + bogus JEISA000 stock code 2026-09-18 00:41:26 +02:00
ocr_invoices.py feat: OCR scanned PDFs and capture all 11 missing stock codes 2026-09-18 06:12:30 +02:00
patch_collections.py fix: dashboard autocancellation - single invoice fetch + clearer error 2026-09-17 23:11:55 +02:00
pb_snapshot.txt fix: dashboard autocancellation - single invoice fetch + clearer error 2026-09-17 23:11:55 +02:00
price_lookup.py feat: capture stock-code descriptions from PDF line text 2026-09-17 23:49:54 +02:00
test_pair_re.py feat: OCR scanned PDFs and capture all 11 missing stock codes 2026-09-18 06:12:30 +02:00
test_pb_sdk.js fix: dashboard autocancellation - single invoice fetch + clearer error 2026-09-17 23:11:55 +02:00
test_pb_select.js fix: dashboard autocancellation - single invoice fetch + clearer error 2026-09-17 23:11:55 +02:00