This commit is contained in:
dzikafoczka 2024-12-21 21:59:59 +01:00
parent 720bf2f054
commit 73816593ef

View File

@ -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
}