jabajke

Untitled

Feb 7th, 2023
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. SupplierDiscount.objects
  2. .filter(
  3. supplier_car__car=car,
  4. is_active=True,
  5. end_date__gte=timezone.now())
  6. .annotate(price=(F('supplier_car__price') * ((100 - F('discount')) / 100)))
  7. .aggregate(min_price=Min('price')))
  8.  
Advertisement
Add Comment
Please, Sign In to add comment