How yixun06/invoice-statement-gathering-system works
Invoice Analytics System V1 is a Streamlit workflow for importing mixed-platform invoice PDFs, parsing and reviewing their order and product facts, then viewing and exporting batch analytics. A separate weekly-statement workflow stages Shopee workbook data for reconciliation; the repository also contains a historical-invoice storage subsystem. The README documents platform tabs, batch archives, duplicate handling, and review reports. Sampled excerpts do not expose every app-level call, so uncertain wiring—especially historical storage—is left unconnected.
Main entry points: app.py Streamlit application · batch_service.py Batch processing · weekly_billing.py Weekly billing UI · data_import.py Import wizard
Components 20
Import and parsing
- Streamlit application
app.py - Import wizard
src/invoice_app/ui/data_import.py - Batch processing
src/invoice_app/services/batch_service.py - Platform detection
src/invoice_app/detector.py - Invoice parsers
src/invoice_app/parsers - PDF extraction
src/invoice_app/pdf_document.py - Authentication
src/invoice_app/services/auth_service.py
Validation and review
- Shopee review policy
src/invoice_app/parsers/shopee_review_policy.py
Analytics and export
- Invoice analytics
src/invoice_app/services/analytics.py - Excel export
src/invoice_app/services/exporter.py
Weekly settlement
- Weekly billing UI
src/invoice_app/ui/weekly_billing.py - Statement staging
src/invoice_app/services/shopee_weekly_statement_service.py - Statement parser
src/invoice_app/parsers/shopee_weekly_statement_parser.py - Settlement test lab
src/invoice_app/ui/settlement_test_lab.py
Historical invoices
- Invoice repository
src/invoice_app/repositories/historical_invoice_repository.py - Sheets adapter
src/invoice_app/repositories/google_sheets_historical_invoice_repository.py
Other components
- Invoice operator
- Invoice PDFs
- Weekly workbook
- Google Sheets
Connections 18
- Invoice operator → Streamlit application: uses
- Invoice operator → Import wizard: selects source
- Invoice PDFs → Import wizard: uploads
- Weekly workbook → Weekly billing UI: uploads
- Streamlit application → Authentication: authenticates
- Streamlit application → Batch processing: processes batch
- Streamlit application → Invoice analytics: builds dashboards
- Streamlit application → Excel export: exports reports
- Import wizard → Batch processing: stages imports
- Batch processing → PDF extraction: extracts text
- Batch processing → Platform detection: detects platform
- Batch processing → Invoice parsers: dispatches parsing
- Invoice parsers → Shopee review policy: checks Shopee
- Weekly billing UI → Statement staging: stages statement
- Statement staging → Statement parser: parses workbook
- Weekly billing UI → Settlement test lab: offers testing
- Sheets adapter → Google Sheets: reads and writes
- Sheets adapter → Invoice repository: implements contract