update KillHouseFreeBarInformationViewSet
This commit is contained in:
@@ -11828,12 +11828,13 @@ class KillHouseFreeBarInformationViewSet(viewsets.ModelViewSet):
|
||||
free_bar.acceptor_rejector = user.fullname
|
||||
if 'killer_key' in request.data.keys() and request.data['killer_key'] != None and request.data[
|
||||
'killer_key'] != '':
|
||||
pre_kill_house = free_bar.input_warehouse
|
||||
if (pre_kill_house.total_input_warehouse_free_weight - free_bar.weight_of_carcasses) - pre_kill_house.total_selling_warehouse_free_weight < 0 :
|
||||
return Response(
|
||||
{"result": "به علت عدم موجودی کشتارکن امکان جابجایی وجود ندارد! "},
|
||||
status=status.HTTP_403_FORBIDDEN)
|
||||
pre_product = RolesProducts.objects.filter(kill_house=pre_kill_house, trash=False, name='مرغ گرم').first()
|
||||
if free_bar.input_warehouse:
|
||||
pre_kill_house = free_bar.input_warehouse
|
||||
if (pre_kill_house.total_input_warehouse_free_weight - free_bar.weight_of_carcasses) - pre_kill_house.total_selling_warehouse_free_weight < 0 :
|
||||
return Response(
|
||||
{"result": "به علت عدم موجودی کشتارکن امکان جابجایی وجود ندارد! "},
|
||||
status=status.HTTP_403_FORBIDDEN)
|
||||
pre_product = RolesProducts.objects.filter(kill_house=pre_kill_house, trash=False, name='مرغ گرم').first()
|
||||
exclusive_killer = KillHouse.objects.filter(trash=False, key=request.data['killer_key']).first()
|
||||
if exclusive_killer.killer and exclusive_killer.type == 'public':
|
||||
if not free_bar.public_killer:
|
||||
|
||||
Reference in New Issue
Block a user