Handle Balancetransfer Adyen accountign record
authorMagnus Hagander <magnus@hagander.net>
Fri, 2 Nov 2018 10:32:22 +0000 (11:32 +0100)
committerMagnus Hagander <magnus@hagander.net>
Fri, 2 Nov 2018 10:32:22 +0000 (11:32 +0100)
This record shows up when we refund enough transactions that it takes
the data out of our deposit account, and not just out of other settled
transactions. Turns out this is the first time it's happend, but the
handling is straight forward.

postgresqleu/adyen/management/commands/process_adyen_reports.py

index c9fbabfb042d2185cba8b044c757c4f74ff9b56f..7c154e1c9606518f216419e534ef26fa084e4bda 100644 (file)
@@ -164,7 +164,7 @@ class Command(BaseCommand):
                        elif t == 'MerchantPayout':
                                # Amount directly into our checking account
                                acctrows.append((settings.ACCOUNTING_ADYEN_PAYOUT_ACCOUNT, accstr, -amount, None))
-                       elif t == 'DepositCorrection':
+                       elif t == 'DepositCorrection' or t == 'Balancetransfer':
                                # Modification of our deposit account - in either direction!
                                acctrows.append((settings.ACCOUNTING_ADYEN_MERCHANT_ACCOUNT, accstr, -amount, None))
                        elif t == 'InvoiceDeduction':