Skip to content

Commit

Permalink
- fixed crash when processing refunds due
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rkw committed May 18, 2024
1 parent a9c25b1 commit 0a60d73
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 13 additions & 4 deletions monzo_utils/lib/monzo_payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0a60d73

Please sign in to comment.