Refine transaction amount parsing in mock server:
- Ensure amounts include the ₽ currency symbol for accurate parsing.
This commit is contained in:
parent
ea576e6558
commit
257b307243
@ -230,7 +230,7 @@ def parse_ozon_rows(xml):
|
||||
continue
|
||||
if "Расход" in text or "Доход" in text:
|
||||
continue
|
||||
am = re.search(r"([+\-−])\s*(\d[\d\s\u202f]*(?:[,.]\d{1,2})?)", text)
|
||||
am = re.search(r"([+\-−])\s*(\d[\d\s\u202f]*(?:[,.]\d{1,2})?)\s*₽", text)
|
||||
if not am:
|
||||
continue
|
||||
sign = -1 if am.group(1) in ("-", "−") else 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user