不检验也可入库
This commit is contained in:
parent
277a1419b6
commit
0ddb860f20
|
@ -149,9 +149,9 @@ class FIFOViewSet(ListModelMixin, GenericViewSet):
|
|||
审核通过
|
||||
"""
|
||||
obj = self.get_object()
|
||||
for i in FIFOItem.objects.filter(fifo=obj):
|
||||
if not i.is_testok:
|
||||
raise APIException('未检验通过, 不可审核')
|
||||
# for i in FIFOItem.objects.filter(fifo=obj):
|
||||
# if not i.is_testok:
|
||||
# raise APIException('未检验通过, 不可审核')
|
||||
if obj.is_audited:
|
||||
raise APIException('该入库记录已审核通过')
|
||||
with transaction.atomic():
|
||||
|
|
|
@ -92,8 +92,8 @@ class PickSerializer(serializers.Serializer):
|
|||
spp = SubProductionProgress.objects.get(material=i['material'], subproduction_plan=sp, type=SubprodctionMaterial.SUB_MA_TYPE_IN)
|
||||
spp.count_pick = spp.count_pick + i['count']
|
||||
spp.save()
|
||||
if spp.count_pick > spp.count:
|
||||
raise exceptions.APIException('超过计划需求数')
|
||||
# if spp.count_pick > spp.count:
|
||||
# raise exceptions.APIException('超过计划需求数')
|
||||
if isLowLevel:
|
||||
# 更新半成品表
|
||||
wids = IProduct.objects.filter(pk__in=[x.id for x in iproducts]).values_list('wproduct', flat=True)
|
||||
|
|
Loading…
Reference in New Issue