Skip to content

Commit

Permalink
Reversed ordering for amortization related txns
Browse files Browse the repository at this point in the history
  • Loading branch information
edelgm6 committed Aug 9, 2024
1 parent 2981681 commit a1091d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _round_down(n, decimals=2):
return math.floor(n * multiplier) / multiplier

def get_related_transactions(self):
return self.transactions.all().order_by('date')
return self.transactions.all().order_by('-date')

def get_remaining_periods(self):
related_transactions_count = len(self.get_related_transactions())
Expand Down

0 comments on commit a1091d7

Please sign in to comment.