add - WarehouseAllocationService

This commit is contained in:
2025-11-18 16:51:34 +03:30
parent 23e927a631
commit 4bf900a1e2
7 changed files with 152 additions and 2 deletions

View File

@@ -1,5 +1,22 @@
from rest_framework.exceptions import APIException
from rest_framework import status
from rest_framework.exceptions import APIException
class WareHouseException(APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = "مقدار ورد شده از انبار بیشتر از موجودی انبار میباشد" # noqa
default_code = 'error'
def __init__(self, message=None, code=None, status_code=None):
if status_code is not None:
self.status_code = status_code
detail = {
"message": message,
"status_code": status_code
}
super().__init__(detail)
class InventoryEntryWeightException(APIException):