Created
November 12, 2020 21:55
-
-
Save blackmann/15f128e6021d3835767211590377e7cd to your computer and use it in GitHub Desktop.
Hahahahaha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data.append({ | |
'title': 'Revenue', | |
'value': models.Order.objects.filter(valid=True).annotate(total=ExpressionWrapper((F('vehicle_rate__rate') + F('driver_rate__rate')) * F('days'), DecimalField())).values('total').aggregate(Sum('total'))['total__sum'], | |
'prefix': 'GHS' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment