CoolCMS API

OrderStockState
in package

Denormalized state of the order's stock reservations (`cms_mod_eshop_orders.stock_state`).

Written only by OrderStockManager from the results of Store calls; a new order starts with NONE.

The source of truth stays in Store (stock reservations and documents via SourceRef(4,'order',$orderId)); this is a quick readable copy for the admin grid and detail without a join into a foreign module.

Table of Contents

Constants

ALL  : array<int, string> = [self::NONE, self::RESERVED, self::PARTIAL, sel...
CONFIRMED  : mixed = 'CONFIRMED'
The issue document is confirmed (`confirm()`), the goods are physically written off.
NONE  : mixed = 'NONE'
No stock interaction (new or unedited order).
PARTIAL  : mixed = 'PARTIAL'
An active reservation covers only a part (`allowPartial`; `notInStock` on items).
RELEASED  : mixed = 'RELEASED'
Reservation released (cancellation or expiration).
RESERVED  : mixed = 'RESERVED'
An active reservation covers the full quantity.

Methods

isValid()  : bool

Constants

ALL

public array<int, string> ALL = [self::NONE, self::RESERVED, self::PARTIAL, self::CONFIRMED, self::RELEASED]

CONFIRMED

The issue document is confirmed (`confirm()`), the goods are physically written off.

public mixed CONFIRMED = 'CONFIRMED'

NONE

No stock interaction (new or unedited order).

public mixed NONE = 'NONE'

PARTIAL

An active reservation covers only a part (`allowPartial`; `notInStock` on items).

public mixed PARTIAL = 'PARTIAL'

RELEASED

Reservation released (cancellation or expiration).

public mixed RELEASED = 'RELEASED'

RESERVED

An active reservation covers the full quantity.

public mixed RESERVED = 'RESERVED'

Methods

isValid()

public static isValid(string $state) : bool
Parameters
$state : string
Return values
bool
On this page

Search results