74 lines
1.7 KiB
Python
74 lines
1.7 KiB
Python
"""
|
||
Procurement Flow Service Exceptions
|
||
"""
|
||
|
||
|
||
class ProcurementFlowError(Exception):
|
||
"""Base exception for procurement flow errors"""
|
||
pass
|
||
|
||
|
||
class InvoiceNotFoundError(ProcurementFlowError):
|
||
"""Invoice не существует"""
|
||
pass
|
||
|
||
|
||
class PurchaseNotFoundError(ProcurementFlowError):
|
||
"""Purchase не существует"""
|
||
pass
|
||
|
||
|
||
class SpecificationNotFoundError(ProcurementFlowError):
|
||
"""Specification не существует"""
|
||
pass
|
||
|
||
|
||
class ModuleNotFoundError(ProcurementFlowError):
|
||
"""Module не существует"""
|
||
pass
|
||
|
||
|
||
class ProjectNotFoundError(ProcurementFlowError):
|
||
"""Project не существует"""
|
||
pass
|
||
|
||
|
||
class ProjectMismatchError(ProcurementFlowError):
|
||
"""Purchase/Specification относится к другому Project"""
|
||
pass
|
||
|
||
|
||
class SpecificationNotLinkedToPurchaseError(ProcurementFlowError):
|
||
"""Specification не связана с Purchase через PurchaseSpecification"""
|
||
pass
|
||
|
||
|
||
class ModuleNotInPurchaseError(ProcurementFlowError):
|
||
"""Module отсутствует в PurchaseItem закупки"""
|
||
pass
|
||
|
||
|
||
class OrderedQuantityExceededError(ProcurementFlowError):
|
||
"""Превышено ordered quantity для Module"""
|
||
pass
|
||
|
||
|
||
class SpecificationItemNotFoundError(ProcurementFlowError):
|
||
"""SpecificationItem отсутствует для Module в Specification"""
|
||
pass
|
||
|
||
|
||
class SpecificationQuantityExceededError(ProcurementFlowError):
|
||
"""Превышено quantity SpecificationItem (over-fulfillment)"""
|
||
pass
|
||
|
||
|
||
class InvalidQuantityError(ProcurementFlowError):
|
||
"""quantity ≤ 0"""
|
||
pass
|
||
|
||
|
||
class IntegrityError(ProcurementFlowError):
|
||
"""Database integrity violation (transaction rolled back)"""
|
||
pass
|