Task 1: OCR u ERP/CRM — /api/ocr/upload + tab Računi (OCR)

- routers/ocr_router.py: POST /api/ocr/upload (Tesseract+pdf2image, regex field extraction)
- pgz_sport_api.py: mount ocr_router with try/except guard
- static/erp_full.html: nova tab "📷 OCR" + panel
- static/crm_v2.html: OCR upload modal/tab

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Damir Radulić
2026-05-05 18:28:22 +02:00
parent 8127e2ef22
commit f488623920
4 changed files with 615 additions and 1 deletions
+7
View File
@@ -1695,6 +1695,13 @@ try:
except Exception as e:
print(f'[ERP/OCR] router fail: {e}')
try:
from routers.ocr_router import router as ocr_router
app.include_router(ocr_router)
print('[startup] ocr_router mounted')
except Exception as e:
print(f'[startup] ocr_router skipped: {e}')
try:
from erp.putni_nalozi import router as erp_putni_router
app.include_router(erp_putni_router)