From 73816593ef821cd03af3824c56e3e69c1e01f830 Mon Sep 17 00:00:00 2001 From: dzikafoczka Date: Sat, 21 Dec 2024 21:59:59 +0100 Subject: [PATCH] faktury --- invoice_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoice_service.py b/invoice_service.py index 51c4aab..b2e3a40 100644 --- a/invoice_service.py +++ b/invoice_service.py @@ -32,12 +32,12 @@ def extract_invoice_data(text): seller_name = seller_match.group(1).strip() if seller_match else None nip_match = re.search(r'(?i)Sprzedawca:.*?NIP:\s*(\d+)', text, re.DOTALL) - vat_id = nip_match.group(1) if nip_match else None + seller_nip = nip_match.group(1) if nip_match else None total = extract_total(text) return { - "vat_id": vat_id, + "seller_nip": seller_nip, "seller_name": seller_name, "total": total }