Refine transaction amount parsing in mock server:
- Ensure amounts include the ₽ currency symbol for accurate parsing.
This commit is contained in:
parent
d854da3e8f
commit
efc2da5cd0
@ -230,7 +230,7 @@ def parse_ozon_rows(xml):
|
|||||||
continue
|
continue
|
||||||
if "Расход" in text or "Доход" in text:
|
if "Расход" in text or "Доход" in text:
|
||||||
continue
|
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:
|
if not am:
|
||||||
continue
|
continue
|
||||||
sign = -1 if am.group(1) in ("-", "−") else 1
|
sign = -1 if am.group(1) in ("-", "−") else 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user