// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const PoNotFoundError = createDomainError( "PoNotFoundError", "PURCHASE_PO_NOT_FOUND", (identifier: string) => `Target purchase order does not exist: ${identifier}`, ); export const PoNotOrderedError = createDomainError( "PoNotOrderedError", "PURCHASE_PO_NOT_ORDERED", (identifier: string) => `Purchase order is not in ORDERED status: ${identifier}`, ); export const EmptyAmendmentChangesError = createDomainError( "EmptyAmendmentChangesError", "PURCHASE_EMPTY_AMENDMENT_CHANGES", (identifier: string) => `Amendment contains no header or line changes: ${identifier}`, ); export const LineNotFoundError = createDomainError( "LineNotFoundError", "PURCHASE_LINE_NOT_FOUND", (identifier: string) => `Referenced line does not exist on the target order: ${identifier}`, ); export const ModifyQuantityBelowReceivedError = createDomainError( "ModifyQuantityBelowReceivedError", "PURCHASE_MODIFY_QUANTITY_BELOW_RECEIVED", (identifier: string) => `UPDATE reduces quantity below the line's received quantity projection: ${identifier}`, ); export const ModifyQuantityBelowBilledError = createDomainError( "ModifyQuantityBelowBilledError", "PURCHASE_MODIFY_QUANTITY_BELOW_BILLED", (identifier: string) => `UPDATE reduces quantity below the line's billed quantity: ${identifier}`, ); export const RemoveLineHasReceiptsError = createDomainError( "RemoveLineHasReceiptsError", "PURCHASE_REMOVE_LINE_HAS_RECEIPTS", (identifier: string) => `REMOVE targets a line with posted receipt quantity: ${identifier}`, ); export const RemoveLineHasBillsError = createDomainError( "RemoveLineHasBillsError", "PURCHASE_REMOVE_LINE_HAS_BILLS", (identifier: string) => `REMOVE targets a line with billed quantity: ${identifier}`, ); export const EmptyPurchaseOrderLinesError = createDomainError( "EmptyPurchaseOrderLinesError", "PURCHASE_EMPTY_PURCHASE_ORDER_LINES", (identifier: string) => `Purchase order has no lines: ${identifier}`, ); export const ItemNotFoundError = createDomainError( "ItemNotFoundError", "PURCHASE_ITEM_NOT_FOUND", (identifier: string) => `Referenced item does not exist: ${identifier}`, ); export const ItemNotActiveError = createDomainError( "ItemNotActiveError", "PURCHASE_ITEM_NOT_ACTIVE", (identifier: string) => `Referenced item is not in ACTIVE status: ${identifier}`, ); export const ItemNotPurchasableError = createDomainError( "ItemNotPurchasableError", "PURCHASE_ITEM_NOT_PURCHASABLE", (identifier: string) => `Referenced item holds no purchasing record and cannot be purchased: ${identifier}`, ); export const InvalidQuantityError = createDomainError( "InvalidQuantityError", "PURCHASE_INVALID_QUANTITY", (identifier: string) => `Quantity is zero or negative: ${identifier}`, ); export const InvalidUnitPriceError = createDomainError( "InvalidUnitPriceError", "PURCHASE_INVALID_UNIT_PRICE", (identifier: string) => `Unit price is negative or otherwise invalid: ${identifier}`, ); export const ReceivingSiteNotFoundError = createDomainError( "ReceivingSiteNotFoundError", "PURCHASE_RECEIVING_SITE_NOT_FOUND", (identifier: string) => `Referenced receiving site does not exist: ${identifier}`, ); export const ReceivingSiteRequiredError = createDomainError( "ReceivingSiteRequiredError", "PURCHASE_RECEIVING_SITE_REQUIRED", (identifier: string) => `A physical-receipt line has no receiving site: ${identifier}`, ); export const PurchaseOrderNotFoundError = createDomainError( "PurchaseOrderNotFoundError", "PURCHASE_PURCHASE_ORDER_NOT_FOUND", (identifier: string) => `Referenced purchase order does not exist: ${identifier}`, ); export const PurchaseOrderNotSubmittedError = createDomainError( "PurchaseOrderNotSubmittedError", "PURCHASE_PURCHASE_ORDER_NOT_SUBMITTED", (identifier: string) => `Purchase order is not in SUBMITTED status: ${identifier}`, ); export const SupplierNotActiveError = createDomainError( "SupplierNotActiveError", "PURCHASE_SUPPLIER_NOT_ACTIVE", (identifier: string) => `Referenced supplier is not in ACTIVE status: ${identifier}`, ); export const SupplierAccountCompanyMismatchError = createDomainError( "SupplierAccountCompanyMismatchError", "PURCHASE_SUPPLIER_ACCOUNT_COMPANY_MISMATCH", (identifier: string) => `Supplier account belongs to another company: ${identifier}`, ); export const PurchaseOrderNotCancellableError = createDomainError( "PurchaseOrderNotCancellableError", "PURCHASE_PURCHASE_ORDER_NOT_CANCELLABLE", (identifier: string) => `Purchase order status does not allow cancellation: ${identifier}`, ); export const PurchaseOrderAlreadyFulfilledError = createDomainError( "PurchaseOrderAlreadyFulfilledError", "PURCHASE_PURCHASE_ORDER_ALREADY_FULFILLED", (identifier: string) => `Posted receipts or billed quantity already exists against the order: ${identifier}`, ); export const PurchaseOrderNotClosableError = createDomainError( "PurchaseOrderNotClosableError", "PURCHASE_PURCHASE_ORDER_NOT_CLOSABLE", (identifier: string) => `Purchase order status does not allow closure: ${identifier}`, ); export const OpenQuantityRemainsError = createDomainError( "OpenQuantityRemainsError", "PURCHASE_OPEN_QUANTITY_REMAINS", (identifier: string) => `Remaining quantity is not fulfilled or explicitly written off: ${identifier}`, ); export const CloseReasonRequiredError = createDomainError( "CloseReasonRequiredError", "PURCHASE_CLOSE_REASON_REQUIRED", (identifier: string) => `Residual open quantity exists but no write-off reason was provided: ${identifier}`, ); export const CompanyNotFoundError = createDomainError( "CompanyNotFoundError", "PURCHASE_COMPANY_NOT_FOUND", (identifier: string) => `Referenced company does not exist: ${identifier}`, ); export const CurrencyMismatchError = createDomainError( "CurrencyMismatchError", "PURCHASE_CURRENCY_MISMATCH", (identifier: string) => `Currency is not the company's base currency: ${identifier}`, ); export const DuplicatePurchaseItemError = createDomainError( "DuplicatePurchaseItemError", "PURCHASE_DUPLICATE_PURCHASE_ITEM", (identifier: string) => `Referenced item already holds a purchasing record: ${identifier}`, ); export const SupplierNotFoundError = createDomainError( "SupplierNotFoundError", "PURCHASE_SUPPLIER_NOT_FOUND", (identifier: string) => `Referenced supplier partner does not exist: ${identifier}`, ); export const NegativeBilledQuantityError = createDomainError( "NegativeBilledQuantityError", "PURCHASE_NEGATIVE_BILLED_QUANTITY", (identifier: string) => `Supplied billed quantity is negative: ${identifier}`, ); export const PurchaseOrderLineNotFoundError = createDomainError( "PurchaseOrderLineNotFoundError", "PURCHASE_PURCHASE_ORDER_LINE_NOT_FOUND", (identifier: string) => `Referenced purchase-order line does not exist: ${identifier}`, ); export const NegativeReceivedQuantityError = createDomainError( "NegativeReceivedQuantityError", "PURCHASE_NEGATIVE_RECEIVED_QUANTITY", (identifier: string) => `Supplied received-quantity delta is negative: ${identifier}`, ); export const RejectionReasonRequiredError = createDomainError( "RejectionReasonRequiredError", "PURCHASE_REJECTION_REASON_REQUIRED", (identifier: string) => `No rejection reason was provided: ${identifier}`, ); export const PurchaseOrderNotDraftError = createDomainError( "PurchaseOrderNotDraftError", "PURCHASE_PURCHASE_ORDER_NOT_DRAFT", (identifier: string) => `Purchase order is not in DRAFT status: ${identifier}`, );