some apis of pos

This commit is contained in:
2025-08-20 16:12:49 +03:30
parent 20e4bfad75
commit f271c908c9
4 changed files with 49 additions and 6 deletions

View File

@@ -143,14 +143,9 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
""" check national code & existence of rancher """
rancher = self.queryset.filter(national_code=request.data['national_code'])
inventory = InventoryEntry.objects.get(id=43)
# get rancher live stocks information ant total quota for rancher
rancher_quota_by_live_stock = rancher_quota_weight(rancher.first(), inventory)
if rancher.exists():
serializer = self.serializer_class(rancher.first())
return Response(serializer.data, status=status.HTTP_200_OK)
else:
return Response({