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 _csv
|
||||||
from .. import strparse
|
from .. import strparse
|
||||||
|
|
||||||
class DonationsImporter(_csv.CSVImporterBase):
|
class Donations2018Importer(_csv.CSVImporterBase):
|
||||||
|
ENTRY_SEED = {
|
||||||
|
'ledger template': 'benevity donations ledger entry',
|
||||||
|
}
|
||||||
HEADER_FIELDS = {
|
HEADER_FIELDS = {
|
||||||
'Currency': 'currency',
|
'Currency': 'currency',
|
||||||
'Disbursement ID': 'disbursement_id',
|
'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"]
|
amount: !!python/object/apply:decimal.Decimal ["-.08"]
|
||||||
currency: USD
|
currency: USD
|
||||||
|
|
||||||
- source: Benevity.csv
|
- source: Benevity2018.csv
|
||||||
importer: benevity.DonationsImporter
|
importer: benevity.Donations2018Importer
|
||||||
expect:
|
expect:
|
||||||
- date: !!python/object/apply:datetime.date [2017, 10, 28]
|
- date: !!python/object/apply:datetime.date [2017, 10, 28]
|
||||||
currency: USD
|
currency: USD
|
||||||
|
@ -289,6 +289,7 @@
|
||||||
comment: ""
|
comment: ""
|
||||||
frequency: One-time
|
frequency: One-time
|
||||||
transaction_id: 67890QWERT
|
transaction_id: 67890QWERT
|
||||||
|
ledger template: benevity donations ledger entry
|
||||||
- date: !!python/object/apply:datetime.date [2017, 10, 30]
|
- date: !!python/object/apply:datetime.date [2017, 10, 30]
|
||||||
currency: USD
|
currency: USD
|
||||||
disbursement_id: ABCDE12345
|
disbursement_id: ABCDE12345
|
||||||
|
@ -301,6 +302,7 @@
|
||||||
comment: ""
|
comment: ""
|
||||||
frequency: One-time
|
frequency: One-time
|
||||||
transaction_id: 67890WERTY
|
transaction_id: 67890WERTY
|
||||||
|
ledger template: benevity donations ledger entry
|
||||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
currency: USD
|
currency: USD
|
||||||
disbursement_id: ABCDE12345
|
disbursement_id: ABCDE12345
|
||||||
|
@ -313,6 +315,7 @@
|
||||||
comment: ""
|
comment: ""
|
||||||
frequency: Unknown
|
frequency: Unknown
|
||||||
transaction_id: 67890ERTYU
|
transaction_id: 67890ERTYU
|
||||||
|
ledger template: benevity donations ledger entry
|
||||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
currency: USD
|
currency: USD
|
||||||
disbursement_id: ABCDE12345
|
disbursement_id: ABCDE12345
|
||||||
|
@ -325,6 +328,7 @@
|
||||||
comment: ""
|
comment: ""
|
||||||
frequency: Unknown
|
frequency: Unknown
|
||||||
transaction_id: 67890RTYUI
|
transaction_id: 67890RTYUI
|
||||||
|
ledger template: benevity donations ledger entry
|
||||||
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
- date: !!python/object/apply:datetime.date [2017, 10, 19]
|
||||||
currency: USD
|
currency: USD
|
||||||
disbursement_id: ABCDE12345
|
disbursement_id: ABCDE12345
|
||||||
|
@ -337,6 +341,7 @@
|
||||||
comment: ""
|
comment: ""
|
||||||
frequency: Recurring
|
frequency: Recurring
|
||||||
transaction_id: 67890TYUIO
|
transaction_id: 67890TYUIO
|
||||||
|
ledger template: benevity donations ledger entry
|
||||||
|
|
||||||
- source: BrightFunds.xls
|
- source: BrightFunds.xls
|
||||||
importer: brightfunds.DonorReportImporter
|
importer: brightfunds.DonorReportImporter
|
||||||
|
|
Loading…
Reference in a new issue