Initial commit

This commit is contained in:
Alex
2026-10-07 19:57:07 +00:00
commit 6e6035c789
131 changed files with 23101 additions and 0 deletions
@@ -0,0 +1,73 @@
"""
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