From 5f1315b4e4e1b509f6c26f9c6559f1be7cfad0b1 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 17 May 2023 22:39:44 +1000 Subject: [PATCH] Update Stripe importer to rename tax field This reflects the current CSV output from the "Export" button. --- import2ledger/importers/stripe.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/import2ledger/importers/stripe.py b/import2ledger/importers/stripe.py index 9a74513..dcf3b25 100644 --- a/import2ledger/importers/stripe.py +++ b/import2ledger/importers/stripe.py @@ -1,15 +1,14 @@ -import decimal - from . import _csv from .. import strparse + class PaymentImporter(_csv.CSVImporterBase): NEEDED_FIELDS = frozenset([ 'Converted Currency', 'Created (UTC)', 'Fee', 'Status', - 'Tax', + 'Taxes On Fee', ]) COPIED_FIELDS = { 'Card Name': 'payee', @@ -31,7 +30,7 @@ class PaymentImporter(_csv.CSVImporterBase): 'currency': row['Converted Currency'].upper(), 'date': strparse.date(date_s, self.DATE_FMT), 'fee': strparse.currency_decimal(row['Fee']), - 'tax': strparse.currency_decimal(row['Tax']), + 'tax': strparse.currency_decimal(row['Taxes On Fee']), }