Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ofx support for treasury T-Bill #187

Merged
merged 18 commits into from
Jul 15, 2023
Prev Previous commit
Next Next commit
Add sellother
  • Loading branch information
zhou13 committed Apr 4, 2023
commit e197749a83406f68b13507f63f2d37e4e4ee687b
6 changes: 3 additions & 3 deletions beancount_import/source/ofx.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ def get_securities(soup: bs4.BeautifulSoup) -> List[SecurityInfo]:

STOCK_BUY_SELL_TYPES = set(
['BUYMF', 'SELLMF', 'SELLSTOCK', 'BUYSTOCK', 'REINVEST', 'BUYDEBT',
'SELLDEBT'])
SELL_TYPES = set(['SELLMF', 'SELLSTOCK', 'SELLDEBT'])
'SELLDEBT', 'SELLOTHER'])
SELL_TYPES = set(['SELLMF', 'SELLSTOCK', 'SELLDEBT', 'SELLOTHER'])

RELATED_ACCOUNT_KEYS = ['aftertax_account', 'pretax_account', 'match_account']

Expand Down Expand Up @@ -653,7 +653,7 @@ def __init__(self, seen_fitids, filename, securities_map, org, stmtrs):
for invtranlist in stmtrs.find_all(re.compile('invtranlist|banktranlist')):
for tran in invtranlist.find_all(
re.compile(
'^(buymf|sellmf|reinvest|buystock|sellstock|buyopt|sellopt|buydebt|selldebt|transfer|income|invbanktran|stmttrn)$'
'^(buymf|sellmf|reinvest|buystock|sellstock|buyopt|sellopt|buydebt|selldebt|sellother|transfer|income|invbanktran|stmttrn)$'
)):
fitid = find_child(tran, 'fitid')
date = parse_ofx_time(
Expand Down