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

Split amounts should use '$' for their line code #45

Merged
merged 1 commit into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quiffen/core/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def to_qif(
if self.date:
qif += f'D{self.date.strftime(date_format)}\n'
if self.amount:
qif += f'T{self.amount}\n'
qif += f'${self.amount}\n'
if self.memo:
qif += f'E{self.memo}\n'
if self.cleared:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_to_qif():
split = Split(amount=100, memo='Test Memo')
assert split.to_qif() == (
'S\n'
'T100\n'
'$100\n'
'ETest Memo\n'
)

Expand All @@ -83,7 +83,7 @@ def test_to_qif():
assert split2.to_qif() == (
'STest Category\n'
'D2019-01-01\n'
'T100\n'
'$100\n'
'ETest Memo\n'
'CTrue\n'
'L[Test Account]\n'
Expand Down
10 changes: 5 additions & 5 deletions tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ def test_to_qif_with_splits_no_classes():
'LTest Category\n'
'N1\n'
'STest Split Category\n'
'T100\n'
'$100\n'
'ETest Memo\n'
'S\n'
'T200\n'
'$200\n'
'ETest Memo 2\n'
)

Expand Down Expand Up @@ -523,10 +523,10 @@ def test_to_qif_with_splits_with_classes():
'LTest Parent:Test Child/Test Class\n'
'N1\n'
'STest Split Category/Test Class\n'
'T100\n'
'$100\n'
'ETest Memo\n'
'S\n'
'T200\n'
'$200\n'
'ETest Memo 2\n'
)

Expand Down Expand Up @@ -604,7 +604,7 @@ def test_from_list_with_splits_no_classes():
'LTest Category', # No brackets denote category
'STest Split Category 1',
'ETest Split Memo',
'T100',
'$100',
'STest Split Category 2',
'EMemo',
'$100',
Expand Down