Skip to content

Commit

Permalink
Removing decimal places from invoicing
Browse files Browse the repository at this point in the history
It doesn't necessarily seem to change the outcome any.
  • Loading branch information
thor committed Nov 21, 2017
1 parent b23ee43 commit 2e17503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spbm/apps/society/views/invoicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def get_context_data(self, **kwargs):
# Uses SUM over each invoices series of shifts hours and shift wages
invoices_with_cost_annotation = Invoice.objects.all().annotate(
total_cost=Sum(F('events__shifts__hours') * F('events__shifts__wage') * settings.SPBM.get('fee'),
output_field=models.DecimalField(decimal_places=2))).select_related()
output_field=models.DecimalField())).select_related()

unpaid_invoices_with_cost_annotation = Invoice.objects.filter(paid=False).annotate(
total_cost=Sum(F('events__shifts__hours') * F('events__shifts__wage'),
output_field=models.DecimalField(decimal_places=2))).select_related()
output_field=models.DecimalField())).select_related()

return {
'progress': (today - last_period) / (next_period - last_period),
Expand Down

0 comments on commit 2e17503

Please sign in to comment.