faktury
This commit is contained in:
parent
720bf2f054
commit
73816593ef
@ -32,12 +32,12 @@ def extract_invoice_data(text):
|
|||||||
seller_name = seller_match.group(1).strip() if seller_match else None
|
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)
|
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)
|
total = extract_total(text)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"vat_id": vat_id,
|
"seller_nip": seller_nip,
|
||||||
"seller_name": seller_name,
|
"seller_name": seller_name,
|
||||||
"total": total
|
"total": total
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user