From 0a60d73fde6b5d1aa74b8e978695c0061558c758 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 18 May 2024 20:49:36 +0100 Subject: [PATCH] - fixed crash when processing refunds due --- CHANGELOG.md | 4 ++++ monzo_utils/lib/monzo_payments.py | 17 +++++++++++++---- setup.py | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bc44cb..ff7ab2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.0.99 - 18/05/2024 + +- fixed crash when processing refunds due + ## 0.0.98 - 18/05/2024 - always use the reserve amount for next month's total diff --git a/monzo_utils/lib/monzo_payments.py b/monzo_utils/lib/monzo_payments.py index e46735d..6499a82 100755 --- a/monzo_utils/lib/monzo_payments.py +++ b/monzo_utils/lib/monzo_payments.py @@ -163,10 +163,19 @@ def main(self): self.next_month += total_due_next_month if 'refunds_due' in self.config and self.config['refunds_due']: - self.display_payment_list({ - 'type': 'Refund', - 'payments': self.config['refunds_due'] - }, False) + due, total_due_this_month, total_due_next_month, payments = self.process_payment_list( + { + 'type': 'Refund', + 'payments': self.config['refunds_due'] + }, + False + ) + + payment_lists['monthly'] += payments + + self.due += due + self.total_this_month += total_due_this_month + self.next_month += total_due_next_month if 'pot' in self.config: pot = self.account.get_pot(self.config['pot']) diff --git a/setup.py b/setup.py index 61e88a8..1090ffb 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name='monzo-utils', - version='0.0.98', + version='0.0.99', description='Monzo Utils', author='Mark Wadham', url='https://github.com/m4rkw/monzo-utils',