Fix a few errors on preview billing rework

Another WIP commit to sync with laptop, do not forget to rebase!
This commit is contained in:
fnux 2020-03-01 12:23:04 +01:00
commit be2b0a8855
4 changed files with 25 additions and 8 deletions

View file

@ -5,6 +5,8 @@ from rest_framework.viewsets import GenericViewSet
from django.db.models import Q
from .models import Bill, Payment, PaymentMethod, Order
from django.utils import timezone
from django.core.exceptions import ObjectDoesNotExist
from dateutil.relativedelta import relativedelta
def sum_amounts(entries):
return reduce(lambda acc, entry: acc + entry.amount, entries, 0)