fix agencie share on pos device - fix validation bug of free product pos

This commit is contained in:
2025-10-05 17:01:21 +03:30
parent f36d767e1c
commit c3f745f5d0
11 changed files with 263 additions and 62 deletions

View File

@@ -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(