Files
specs/app/services/procurement_flow_service_exceptions.py
2026-10-07 19:57:07 +00:00

74 lines
1.7 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
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