fix - edi inventory entry
This commit is contained in:
@@ -58,7 +58,9 @@ class InventoryEntrySerializer(serializers.ModelSerializer):
|
|||||||
status.HTTP_403_FORBIDDEN
|
status.HTTP_403_FORBIDDEN
|
||||||
)
|
)
|
||||||
elif self.instance.weight != 0:
|
elif self.instance.weight != 0:
|
||||||
if total_entered_weight - self.instance.weight + attrs['weight'] > remaining_weight_to_enter:
|
if total_entered_weight - self.instance.weight + attrs[
|
||||||
|
'weight'] > remaining_weight_to_enter + total_entered_weight:
|
||||||
|
print(total_entered_weight, self.instance.weight)
|
||||||
raise WareHouseException(
|
raise WareHouseException(
|
||||||
"وزن وارد شده برای ورود به انبار نباید از باقیمانده سهمیه بیشتر باشد", # noqa
|
"وزن وارد شده برای ورود به انبار نباید از باقیمانده سهمیه بیشتر باشد", # noqa
|
||||||
status.HTTP_403_FORBIDDEN
|
status.HTTP_403_FORBIDDEN
|
||||||
|
|||||||
Reference in New Issue
Block a user