34 lines
840 B
Markdown
34 lines
840 B
Markdown
# Invoice Processing Script
|
|
|
|
This script extracts invoice data from PDFs and saves it to a CSV file.
|
|
|
|
## Setup
|
|
|
|
1. Install dependencies:
|
|
```bash
|
|
python3 -m venv venv
|
|
venv/bin/pip install pdfplumber
|
|
```
|
|
|
|
## Usage
|
|
|
|
1. Place unprocessed invoice PDFs in the `to_process/` folder
|
|
2. Run the script:
|
|
```bash
|
|
venv/bin/python process_invoices.py
|
|
```
|
|
|
|
The script will:
|
|
- Extract invoice data (Invoice Date, Services From, Services To, Invoice Number, Amount)
|
|
- Append the data to a CSV file named with today's date (e.g., `2026-03-18.csv`)
|
|
- Move processed PDFs to the `processed/` folder
|
|
|
|
## CSV Output
|
|
|
|
The CSV contains the following columns:
|
|
- **Invoice Date**: The date the invoice was issued
|
|
- **Services From**: First service date
|
|
- **Services To**: Last service date
|
|
- **Invoice Number**: The invoice number
|
|
- **Amount**: Total amount in AUD
|