benevity: Version the current importer.
The report format has changed slightly in 2019.
This commit is contained in:
parent
4e048eccf1
commit
8326bd68d9
3 changed files with 11 additions and 3 deletions
|
@ -1,7 +1,10 @@
|
|||
from . import _csv
|
||||
from .. import strparse
|
||||
|
||||
class DonationsImporter(_csv.CSVImporterBase):
|
||||
class Donations2018Importer(_csv.CSVImporterBase):
|
||||
ENTRY_SEED = {
|
||||
'ledger template': 'benevity donations ledger entry',
|
||||
}
|
||||
HEADER_FIELDS = {
|
||||
'Currency': 'currency',
|
||||
'Disbursement ID': 'disbursement_id',
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 4.
|
|
@ -274,8 +274,8 @@
|
|||
amount: !!python/object/apply:decimal.Decimal ["-.08"]
|
||||
currency: USD
|
||||
|
||||
- source: Benevity.csv
|
||||
importer: benevity.DonationsImporter
|
||||
- source: Benevity2018.csv
|
||||
importer: benevity.Donations2018Importer
|
||||
expect:
|
||||
- date: !!python/object/apply:datetime.date [2017, 10, 28]
|
||||
currency: USD
|
||||
|
@ -289,6 +289,7 @@
|
|||
comment: ""
|
||||
frequency: One-time
|
||||
transaction_id: 67890QWERT
|
||||
ledger template: benevity donations ledger entry
|
||||
- date: !!python/object/apply:datetime.date [2017, 10, 30]
|
||||
currency: USD
|
||||
disbursement_id: ABCDE12345
|
||||
|
@ -301,6 +302,7 @@
|
|||
comment: ""
|
||||
frequency: One-time
|
||||
transaction_id: 67890WERTY
|
||||
ledger template: benevity donations ledger entry
|
||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||
currency: USD
|
||||
disbursement_id: ABCDE12345
|
||||
|
@ -313,6 +315,7 @@
|
|||
comment: ""
|
||||
frequency: Unknown
|
||||
transaction_id: 67890ERTYU
|
||||
ledger template: benevity donations ledger entry
|
||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||
currency: USD
|
||||
disbursement_id: ABCDE12345
|
||||
|
@ -325,6 +328,7 @@
|
|||
comment: ""
|
||||
frequency: Unknown
|
||||
transaction_id: 67890RTYUI
|
||||
ledger template: benevity donations ledger entry
|
||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||
currency: USD
|
||||
disbursement_id: ABCDE12345
|
||||
|
@ -337,6 +341,7 @@
|
|||
comment: ""
|
||||
frequency: Recurring
|
||||
transaction_id: 67890TYUIO
|
||||
ledger template: benevity donations ledger entry
|
||||
|
||||
- source: BrightFunds.xls
|
||||
importer: brightfunds.DonorReportImporter
|
||||
|
|
Loading…
Reference in a new issue