Skip to content

Commit 7e7ee3f

Browse files
committed
fix investor parsing logic for new cas formats
1 parent a641f32 commit 7e7ee3f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

casparser/parsers/mupdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def parse_investor_info(page_dict, page_rect: fitz.Rect) -> InvestorInfo:
129129
else:
130130
if (
131131
re.search(
132-
r"Date\s+Transaction|Folio\s+No|^Date\s*$",
132+
r"Mutual\s+Fund|Date\s+Transaction|Folio\s+No|^Date\s*$",
133133
txt,
134134
re.I | re.MULTILINE,
135135
)

casparser/parsers/pdfminer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def parse_investor_info(layout, width, height) -> InvestorInfo:
4444
name = txt
4545
else:
4646
if (
47-
re.search(r"Date\s+Transaction|Folio\s+No|^Date\s*$", txt, re.I | re.MULTILINE)
47+
re.search(
48+
r"Portfolio\s+Summary|Mutual\s+Fund|Date\s+Transaction|Folio\s+No|^Date\s*$",
49+
txt,
50+
re.I | re.MULTILINE,
51+
)
4852
or mobile is not None
4953
):
5054
return InvestorInfo(

0 commit comments

Comments
 (0)