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

importers.csvbase: Add CreditOrDebit column type #155

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

dnicolodi
Copy link
Collaborator

This is useful to parse statements where credit (positive amounts) and debits (negative amounts) are placed in different columns.

This is useful to parse statements where credit (positive amounts) and
debits (negative amounts) are placed in different columns.
@dnicolodi dnicolodi force-pushed the csvbase-creditordebit branch from f3437d0 to 16b43cb Compare January 24, 2025 23:50
@dnicolodi dnicolodi merged commit edeed9e into beancount:master Jan 24, 2025
19 checks passed

def parse(self, credit, debit):
if credit and debit:
raise ValueError('credit and debit fields cannot be populated ar the same time')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ar -> at

def test_both_columns(self):
column = CreditOrDebit(0, 1)
func = column.getter(None)
with self.assertRaisesRegex(ValueError, 'credit and debit fields cannot be populated ar the same time'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ar -> at

@dnicolodi
Copy link
Collaborator Author

Thanks for spotting the typos @wzyboy! Fixing them now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants