Changeset - 68a0a9625c45
[Not reviewed]
0 1 0
Brett Smith - 6 years ago 2017-12-18 22:32:33
brettcsmith@brettcsmith.org
importers.stripe: Generate payment entries for refunded payments.

In order to be refunded, the payment had to be paid in the first place, so
we should still generate an entry for it.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
import2ledger/importers/stripe.py
Show inline comments
...
 
@@ -18,13 +18,13 @@ class PaymentImporter(_csv.CSVImporterBase):
 
        'id': 'payment_id',
 
    }
 
    TEMPLATE_KEY = 'template stripe payments'
 
    DATE_FMT = '%Y-%m-%d'
 

	
 
    def _read_row(self, row):
 
        if row['Status'] != 'Paid':
 
        if (row['Status'] != 'Paid') and (row['Status'] != 'Refunded'):
 
            return None
 
        else:
 
            return {
 
                'currency': row['Converted Currency'].upper(),
 
                'date': util.strpdate(row['Created (UTC)'].split(None, 1)[0], self.DATE_FMT),
 
                'fee': decimal.Decimal(row['Fee']),
0 comments (0 inline, 0 general)