Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
/** What happens to units still in flight when a shipped transfer is called off. */
export const IN_TRANSIT_RESOLUTIONS = ['restock', 'write_off'] as const
export type InTransitResolution = (typeof IN_TRANSIT_RESOLUTIONS)[number]
/** A transfer whose units have left the source but not all arrived. */
export function isInFlight(status: string): boolean {
return status === 'in_transit' || status === 'partially_received'
}
/** Nothing more will arrive on a document in one of these. */
export function isClosed(status: string): boolean {
return status === 'received' || status === 'over_received' || status === 'canceled'
}