Spaces:
Running
Running
Andre
deploy: snapshot c96b9ab -- Inventory Journals (Lagerforandringsjournal) na Contabilidade (v1.3.61)
77db408 Download backend/scripts/check_lines.py from inwave-gateway/hub: direct link, hf CLI and curl.
- Browser
- Download file 782 Bytes
-
https://huggingface.co/spaces/inwave-gateway/hub/resolve/main/backend/scripts/check_lines.py
- Command line
-
hf download hf://spaces/inwave-gateway/hub/backend/scripts/check_lines.py
-
curl -L -o check_lines.py https://huggingface.co/spaces/inwave-gateway/hub/resolve/main/backend/scripts/check_lines.py
782 Bytes
| import csv | |
| import io | |
| import os | |
| def check_lines(f): | |
| if not os.path.exists(f): | |
| print(f"File {f} not found.") | |
| return | |
| with open(f, 'rb') as file: | |
| content = file.read().decode('utf-8-sig') | |
| reader = csv.DictReader(io.StringIO(content), delimiter=';') | |
| count = 0 | |
| for row in reader: | |
| if row.get('Currency_Code') == 'EUR' and row.get('Invoice_Date', '') >= '2024-01-01': | |
| print(f"Inv: {row.get('Invoice_Number')} | CCY: {row.get('Currency_Code')} | FX: {row.get('Revenue_FX')} | SEK_ERP: {row.get('Revenue_SEK_ERP')} | SEK_Final: {row.get('Revenue_SEK_Final')}") | |
| count += 1 | |
| if count >= 5: break | |
| if __name__ == "__main__": | |
| check_lines("assets/fact_invoice_lines.csv") | |