Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SupplierDiscount.objects
- .filter(
- supplier_car__car=car,
- is_active=True,
- end_date__gte=timezone.now())
- .annotate(price=(F('supplier_car__price') * ((100 - F('discount')) / 100)))
- .aggregate(min_price=Min('price')))
Advertisement
Add Comment
Please, Sign In to add comment