/**
 * Inventory execution type such as GOODS_RECEIPT or GOODS_ISSUE
 */
export const InventoryExecutionExecutionType = {
  "GOODS_RECEIPT": "GOODS_RECEIPT",
  "GOODS_ISSUE": "GOODS_ISSUE",
  "STOCK_ADJUSTMENT": "STOCK_ADJUSTMENT"
} as const;
export type InventoryExecutionExecutionType = (typeof InventoryExecutionExecutionType)[keyof typeof InventoryExecutionExecutionType];

/**
 * Posting status. DRAFT does not affect stock; POSTED does.
 */
export const InventoryExecutionStatus = {
  "DRAFT": "DRAFT",
  "CANCELLED": "CANCELLED",
  "POSTED": "POSTED"
} as const;
export type InventoryExecutionStatus = (typeof InventoryExecutionStatus)[keyof typeof InventoryExecutionStatus];

/**
 * Optional source document type such as PURCHASE_ORDER
 */
export const InventoryExecutionSourceDocumentType = {
  "PURCHASE_ORDER": "PURCHASE_ORDER",
  "SALES_ORDER": "SALES_ORDER",
  "TRANSFER_ORDER": "TRANSFER_ORDER",
  "MANUFACTURING_ORDER": "MANUFACTURING_ORDER",
  "STOCK_ADJUSTMENT": "STOCK_ADJUSTMENT"
} as const;
export type InventoryExecutionSourceDocumentType = (typeof InventoryExecutionSourceDocumentType)[keyof typeof InventoryExecutionSourceDocumentType];

/**
 * IN or OUT stock direction for this execution line
 */
export const InventoryExecutionLineDirection = {
  "IN": "IN",
  "OUT": "OUT"
} as const;
export type InventoryExecutionLineDirection = (typeof InventoryExecutionLineDirection)[keyof typeof InventoryExecutionLineDirection];

/**
 * Stock type affected by this execution line
 */
export const InventoryExecutionLineStockType = {
  "AVAILABLE": "AVAILABLE",
  "BLOCKED": "BLOCKED",
  "IN_TRANSIT": "IN_TRANSIT"
} as const;
export type InventoryExecutionLineStockType = (typeof InventoryExecutionLineStockType)[keyof typeof InventoryExecutionLineStockType];

/**
 * Debit/Credit indicator (DR or CR) for accounting integration
 */
export const InventoryLedgerDcIndicator = {
  "DR": "DR",
  "CR": "CR"
} as const;
export type InventoryLedgerDcIndicator = (typeof InventoryLedgerDcIndicator)[keyof typeof InventoryLedgerDcIndicator];

/**
 * Stock type affected by this ledger row: AVAILABLE, BLOCKED, or IN_TRANSIT
 */
export const InventoryLedgerStockType = {
  "AVAILABLE": "AVAILABLE",
  "BLOCKED": "BLOCKED",
  "IN_TRANSIT": "IN_TRANSIT"
} as const;
export type InventoryLedgerStockType = (typeof InventoryLedgerStockType)[keyof typeof InventoryLedgerStockType];

/**
 * Source document type: PURCHASE_ORDER, TRANSFER_ORDER, MANUFACTURING_ORDER
 */
export const InventorySupplyPlanSourceType = {
  "PURCHASE_ORDER": "PURCHASE_ORDER",
  "TRANSFER_ORDER": "TRANSFER_ORDER",
  "MANUFACTURING_ORDER": "MANUFACTURING_ORDER"
} as const;
export type InventorySupplyPlanSourceType = (typeof InventorySupplyPlanSourceType)[keyof typeof InventorySupplyPlanSourceType];

/**
 * Projection lifecycle status: OPEN while expected supply remains, CLOSED when it no longer contributes open supply
 */
export const InventorySupplyPlanStatus = {
  "OPEN": "OPEN",
  "CLOSED": "CLOSED"
} as const;
export type InventorySupplyPlanStatus = (typeof InventorySupplyPlanStatus)[keyof typeof InventorySupplyPlanStatus];

/**
 * Consumption status: ACTIVE or FULLY_CONSUMED
 */
export const LotStatus = {
  "ACTIVE": "ACTIVE",
  "FULLY_CONSUMED": "FULLY_CONSUMED"
} as const;
export type LotStatus = (typeof LotStatus)[keyof typeof LotStatus];

/**
 * Lifecycle status: AVAILABLE, ISSUED, RETURNED, SCRAPPED
 */
export const SerialNumberStatus = {
  "AVAILABLE": "AVAILABLE",
  "ISSUED": "ISSUED",
  "RETURNED": "RETURNED",
  "SCRAPPED": "SCRAPPED"
} as const;
export type SerialNumberStatus = (typeof SerialNumberStatus)[keyof typeof SerialNumberStatus];

/**
 * Adjustment type: CORRECTION, SCRAP, BLOCK, UNBLOCK
 */
export const StockAdjustmentAdjustmentType = {
  "CORRECTION": "CORRECTION",
  "SCRAP": "SCRAP",
  "BLOCK": "BLOCK",
  "UNBLOCK": "UNBLOCK"
} as const;
export type StockAdjustmentAdjustmentType = (typeof StockAdjustmentAdjustmentType)[keyof typeof StockAdjustmentAdjustmentType];

/**
 * Lifecycle status: DRAFT, SUBMITTED, REJECTED, CONFIRMED, CANCELLED
 */
export const StockAdjustmentStatus = {
  "DRAFT": "DRAFT",
  "SUBMITTED": "SUBMITTED",
  "CANCELLED": "CANCELLED",
  "CONFIRMED": "CONFIRMED",
  "REJECTED": "REJECTED"
} as const;
export type StockAdjustmentStatus = (typeof StockAdjustmentStatus)[keyof typeof StockAdjustmentStatus];

/**
 * Direction of stock adjustment (required for CORRECTION): INCREASE or DECREASE
 */
export const StockAdjustmentLineAdjustmentDirection = {
  "INCREASE": "INCREASE",
  "DECREASE": "DECREASE"
} as const;
export type StockAdjustmentLineAdjustmentDirection = (typeof StockAdjustmentLineAdjustmentDirection)[keyof typeof StockAdjustmentLineAdjustmentDirection];

/**
 * Source stock category (only used for SCRAP): AVAILABLE (default) or BLOCKED for scrapping blocked stock
 */
export const StockAdjustmentLineFromStockCategory = {
  "AVAILABLE": "AVAILABLE",
  "BLOCKED": "BLOCKED"
} as const;
export type StockAdjustmentLineFromStockCategory = (typeof StockAdjustmentLineFromStockCategory)[keyof typeof StockAdjustmentLineFromStockCategory];

/**
 * Current stock type: AVAILABLE, BLOCKED, or IN_TRANSIT
 */
export const StockLevelStockType = {
  "AVAILABLE": "AVAILABLE",
  "BLOCKED": "BLOCKED",
  "IN_TRANSIT": "IN_TRANSIT"
} as const;
export type StockLevelStockType = (typeof StockLevelStockType)[keyof typeof StockLevelStockType];

/**
 * Source document type: SALES_ORDER, TRANSFER_ORDER, MANUFACTURING_ORDER
 */
export const StockReservationSourceType = {
  "SALES_ORDER": "SALES_ORDER",
  "TRANSFER_ORDER": "TRANSFER_ORDER",
  "MANUFACTURING_ORDER": "MANUFACTURING_ORDER"
} as const;
export type StockReservationSourceType = (typeof StockReservationSourceType)[keyof typeof StockReservationSourceType];

/**
 * Reservation lifecycle status: OPEN while reservation demand remains, CLOSED when it no longer contributes to ATP
 */
export const StockReservationStatus = {
  "OPEN": "OPEN",
  "CLOSED": "CLOSED"
} as const;
export type StockReservationStatus = (typeof StockReservationStatus)[keyof typeof StockReservationStatus];

/**
 * Lifecycle status
 */
export const StorageLocationStatus = {
  "ACTIVE": "ACTIVE",
  "INACTIVE": "INACTIVE"
} as const;
export type StorageLocationStatus = (typeof StorageLocationStatus)[keyof typeof StorageLocationStatus];

/**
 * Document-control status: DRAFT, OPEN, or CLOSED
 */
export const TransferOrderStatus = {
  "DRAFT": "DRAFT",
  "OPEN": "OPEN",
  "CLOSED": "CLOSED"
} as const;
export type TransferOrderStatus = (typeof TransferOrderStatus)[keyof typeof TransferOrderStatus];

/**
 * Costing method: FIFO, AVCO, or STANDARD_COST
 */
export const ValuationPolicyCostingMethod = {
  "FIFO": "FIFO",
  "AVCO": "AVCO",
  "STANDARD_COST": "STANDARD_COST"
} as const;
export type ValuationPolicyCostingMethod = (typeof ValuationPolicyCostingMethod)[keyof typeof ValuationPolicyCostingMethod];
