distribution list by pre sakle & free sale
This commit is contained in:
@@ -7,7 +7,7 @@ ENV_NAME=DEV
|
|||||||
# Database secrets
|
# Database secrets
|
||||||
DB_HOST=31.7.78.133
|
DB_HOST=31.7.78.133
|
||||||
DB_PORT=14352
|
DB_PORT=14352
|
||||||
DB_NAME=Production
|
DB_NAME=Development
|
||||||
DB_USERNAME=postgres
|
DB_USERNAME=postgres
|
||||||
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV
|
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV
|
||||||
|
|
||||||
|
|||||||
@@ -62,11 +62,9 @@ class QuotaDistributionViewSet(viewsets.ModelViewSet, DynamicSearchMixin, POSDev
|
|||||||
|
|
||||||
# get distributions with open quota
|
# get distributions with open quota
|
||||||
distributions = self.queryset.filter(
|
distributions = self.queryset.filter(
|
||||||
Q(assigned_organization=organization),
|
assigned_organization=organization,
|
||||||
Q(quota__is_closed=False),
|
quota__is_closed=False,
|
||||||
(
|
warehouse_entry__gt=0
|
||||||
Q(pre_sale=True) | Q(free_sale=True) | Q(warehouse_entry__gt=0)
|
|
||||||
)
|
|
||||||
).order_by('-create_date')
|
).order_by('-create_date')
|
||||||
|
|
||||||
queryset = self.filter_query(distributions) # return by search param or all objects
|
queryset = self.filter_query(distributions) # return by search param or all objects
|
||||||
@@ -93,9 +91,11 @@ class QuotaDistributionViewSet(viewsets.ModelViewSet, DynamicSearchMixin, POSDev
|
|||||||
|
|
||||||
# get distributions with open quota
|
# get distributions with open quota
|
||||||
distributions = self.queryset.filter(
|
distributions = self.queryset.filter(
|
||||||
assigned_organization=organization,
|
Q(assigned_organization=organization),
|
||||||
quota__is_closed=False,
|
Q(quota__is_closed=False),
|
||||||
warehouse_entry__gt=0
|
(
|
||||||
|
Q(pre_sale=True) | Q(free_sale=True) | Q(warehouse_entry__gt=0)
|
||||||
|
)
|
||||||
).order_by('-create_date')
|
).order_by('-create_date')
|
||||||
|
|
||||||
# check quota distributions for rancher
|
# check quota distributions for rancher
|
||||||
|
|||||||
Reference in New Issue
Block a user