/**
 * AP document type
 */
export const AccountPayableDocumentDocumentType = {
  "INVOICE": "INVOICE",
  "CREDIT_MEMO": "CREDIT_MEMO"
} as const;
export type AccountPayableDocumentDocumentType = (typeof AccountPayableDocumentDocumentType)[keyof typeof AccountPayableDocumentDocumentType];

/**
 * AP document lifecycle status
 */
export const AccountPayableDocumentStatus = {
  "DRAFT": "DRAFT",
  "REGISTERED": "REGISTERED",
  "CANCELLED": "CANCELLED",
  "POSTED": "POSTED"
} as const;
export type AccountPayableDocumentStatus = (typeof AccountPayableDocumentStatus)[keyof typeof AccountPayableDocumentStatus];

/**
 * Reason the payment hold was placed
 */
export const AccountPayableDocumentHoldReasonCode = {
  "INVOICE_UNIT_DIFFERS_FROM_PURCHASE_ORDER_UNIT": "INVOICE_UNIT_DIFFERS_FROM_PURCHASE_ORDER_UNIT",
  "INVOICE_UNIT_PRICE_DIFFERS_FROM_PURCHASE_ORDER_UNIT_PRICE": "INVOICE_UNIT_PRICE_DIFFERS_FROM_PURCHASE_ORDER_UNIT_PRICE",
  "INVOICE_QUANTITY_EXCEEDS_ORDERED_QUANTITY": "INVOICE_QUANTITY_EXCEEDS_ORDERED_QUANTITY",
  "INVOICE_QUANTITY_EXCEEDS_RECEIVED_QUANTITY": "INVOICE_QUANTITY_EXCEEDS_RECEIVED_QUANTITY"
} as const;
export type AccountPayableDocumentHoldReasonCode = (typeof AccountPayableDocumentHoldReasonCode)[keyof typeof AccountPayableDocumentHoldReasonCode];

/**
 * Whether the hold was produced by matching (SYSTEM) or placed by a user (MANUAL)
 */
export const AccountPayableDocumentHoldSource = {
  "SYSTEM": "SYSTEM",
  "MANUAL": "MANUAL"
} as const;
export type AccountPayableDocumentHoldSource = (typeof AccountPayableDocumentHoldSource)[keyof typeof AccountPayableDocumentHoldSource];

/**
 * Optional correction type for line-level AP corrections
 */
export const AccountPayableDocumentLineCorrectionType = {
  "PRICE": "PRICE",
  "QUANTITY": "QUANTITY",
  "AMOUNT": "AMOUNT"
} as const;
export type AccountPayableDocumentLineCorrectionType = (typeof AccountPayableDocumentLineCorrectionType)[keyof typeof AccountPayableDocumentLineCorrectionType];

/**
 * Optional AP line source type; PURCHASE_ORDER means purchaseOrderLineId is set
 */
export const AccountPayableDocumentLineSourceType = {
  "PURCHASE_ORDER": "PURCHASE_ORDER"
} as const;
export type AccountPayableDocumentLineSourceType = (typeof AccountPayableDocumentLineSourceType)[keyof typeof AccountPayableDocumentLineSourceType];
