fix agencie share on pos device - fix validation bug of free product pos
This commit is contained in:
@@ -141,29 +141,6 @@ class InventoryQuotaSaleTransactionViewSet(viewsets.ModelViewSet, DynamicSearchM
|
||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
return Response(serializer.errors, status=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
@action(
|
||||
methods=['get'],
|
||||
detail=False,
|
||||
url_path='transactions',
|
||||
url_name='transactions',
|
||||
name='transactions',
|
||||
)
|
||||
@transaction.atomic
|
||||
def transactions(self, request):
|
||||
""" pos transactions list """
|
||||
|
||||
# get device object
|
||||
device = self.get_pos_device()
|
||||
|
||||
queryset = self.queryset.filter(pos_device=device)
|
||||
queryset = self.filter_query(queryset)
|
||||
|
||||
# paginate & response
|
||||
page = self.paginate_queryset(queryset)
|
||||
if page is not None:
|
||||
serializer = self.get_serializer(page, many=True)
|
||||
return self.get_paginated_response(serializer.data)
|
||||
|
||||
|
||||
class QuotaPreSaleItemViewSet(viewsets.ModelViewSet, DynamicSearchMixin, POSDeviceMixin):
|
||||
queryset = warehouse_models.QuotaPreSaleItem.objects.all().select_related(
|
||||
|
||||
Reference in New Issue
Block a user