forked from uncloud/uncloud
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:
parent
e319d1d151
commit
be2b0a8855
4 changed files with 25 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue