AllProductsTransportViewSet
This commit is contained in:
@@ -2589,7 +2589,10 @@ def all_products_transport_excel(request):
|
|||||||
filters['product'] = product_type
|
filters['product'] = product_type
|
||||||
|
|
||||||
if destination_province and destination_province != 'undefined':
|
if destination_province and destination_province != 'undefined':
|
||||||
filters['destination_province'] = destination_province
|
if destination_province == 'مرکزی':
|
||||||
|
filters['destination_province'] = 'مركزي'
|
||||||
|
else:
|
||||||
|
filters['destination_province'] = destination_province
|
||||||
|
|
||||||
if date1 and date2 and date1 != 'undefined' and date2 != 'undefined':
|
if date1 and date2 and date1 != 'undefined' and date2 != 'undefined':
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -4775,10 +4775,11 @@ class AllProductsTransportDashboardView(APIView):
|
|||||||
bars = queryset.filter(jihadi_origin__in=kill_house_codes)
|
bars = queryset.filter(jihadi_origin__in=kill_house_codes)
|
||||||
|
|
||||||
if destination_province and destination_province != 'undefined':
|
if destination_province and destination_province != 'undefined':
|
||||||
bars = bars.filter(destination_province=destination_province)
|
|
||||||
if destination_province=='مرکزی':
|
if destination_province=='مرکزی':
|
||||||
bars = bars.filter(destination_province='مركزي')
|
bars = bars.filter(destination_province='مركزي')
|
||||||
|
|
||||||
|
else:
|
||||||
|
bars = bars.filter(destination_province=destination_province)
|
||||||
|
|
||||||
aggregation = bars.aggregate(
|
aggregation = bars.aggregate(
|
||||||
total=Sum('quantity'),
|
total=Sum('quantity'),
|
||||||
@@ -4839,10 +4840,12 @@ class AllProductsTransportDashboardView(APIView):
|
|||||||
).order_by('-modify_date')
|
).order_by('-modify_date')
|
||||||
|
|
||||||
if destination_province and destination_province != 'undefined':
|
if destination_province and destination_province != 'undefined':
|
||||||
bars = bars.filter(destination_province=destination_province)
|
|
||||||
if destination_province=='مرکزی':
|
if destination_province == 'مرکزی':
|
||||||
bars = bars.filter(destination_province='مركزي')
|
bars = bars.filter(destination_province='مركزي')
|
||||||
|
|
||||||
|
else:
|
||||||
|
bars = bars.filter(destination_province=destination_province)
|
||||||
aggregation = bars.aggregate(
|
aggregation = bars.aggregate(
|
||||||
total=Sum('quantity'),
|
total=Sum('quantity'),
|
||||||
input_total=Sum('quantity', filter=Q(out=False)),
|
input_total=Sum('quantity', filter=Q(out=False)),
|
||||||
|
|||||||
Reference in New Issue
Block a user