diff --git a/conservancy_beancount/reports/accrual.py b/conservancy_beancount/reports/accrual.py index b46bbc1cd63859c8ef32e890349db26d6ea4e488..3b37372ad6756677b19fbca30171f5f15e7945fe 100644 --- a/conservancy_beancount/reports/accrual.py +++ b/conservancy_beancount/reports/accrual.py @@ -439,13 +439,20 @@ class OutgoingReport(BaseReport): ach = 'ACH' check = 'Check' creditcard = 'Credit Card' + credit_card = creditcard debitcard = 'Debit Card' + debit_card = debitcard echeck = 'E-Check' + e_check = echeck paypal = 'PayPal' + pay_pal = paypal vendorportal = 'Vendor Portal' + vendor_portal = vendorportal wire = 'Wire' fxwire = wire + fx_wire = fxwire uswire = wire + us_wire = uswire def __init__(self, rt_wrapper: rtutil.RT, out_file: TextIO) -> None: @@ -495,7 +502,7 @@ class OutgoingReport(BaseReport): self.logger.warning("%s invalid currency %r", log_prefix, currency) try: - method_enum = self.PaymentMethods[method_key] + method_enum = self.PaymentMethods[re.sub(r'[- ]', '_', method_key)] except KeyError: self.logger.warning("%s invalid method %r", log_prefix, method_key) diff --git a/setup.py b/setup.py index 820fd1161b0048c7a1d01b9d123940d8be16d057..1c67f55e0689e747d195990c3196b19467c2cb3e 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name='conservancy_beancount', description="Plugin, library, and reports for reading Conservancy's books", - version='1.5.12', + version='1.5.13', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+', diff --git a/tests/books/accruals.beancount b/tests/books/accruals.beancount index ef355a7c234ce7b417b92490ac47a36834243790..360992cdb52c0c7c672fce58aceb905917f0210c 100644 --- a/tests/books/accruals.beancount +++ b/tests/books/accruals.beancount @@ -76,7 +76,7 @@ contract: "rt:310/3100" invoice: "FIXME" ; still waiting on them to send it project: "Conservancy" - payment-method: "USD USWire" + payment-method: "USD US Wire" Liabilities:Payable:Accounts -200 USD Expenses:Travel 200 USD @@ -163,7 +163,7 @@ contract: "rt:520/5220" project: "Conservancy" Liabilities:Payable:Accounts -1,000 EUR {1.100 USD} - payment-method: "eur fxwire" + payment-method: "eur fx-wire" Expenses:FilingFees 1,000 EUR {1.100 USD} 2010-06-20 * "StateGov" "Business registration"