Documentation ¶
Overview ¶
pacakge order deals with adding order details to an LHComponent.
Index ¶
Constants ¶
View Source
const OrderDetails = "ORDERDETAILS"
Key to look up order details from a wtype.Liquid.
Variables ¶
This section is empty.
Functions ¶
func SetOrderDetails ¶
func SetOrderDetails(comp *wtype.Liquid, orderDetails Details, options ...Option) (*wtype.Liquid, error)
SetOrderDetails adds order details to a wtype.Liquid. An error will be returned if order details are already encountered unless the ForceUpdate option is used as an Option argument in the function. In which case any existing order details will be overwritten.
Types ¶
type Details ¶
type Details struct { // Name of Manufacturer. Manufacturer string // The catalogue number of the item for ordering. LotID string // The specific batch number of this instance of the item. BatchID string // The expiry date ExpiryDate time.Time // Any restrictions for storage of the item. StorageRequirements StorageConditions }
Details stores the order details of a wtype.Liquid
type Option ¶
type Option string
Option is a type for use as an argument in the SetOrderInfo function.
const ( // Force overwriting of Order Details of a wtype.Liquid in the SetOrderInfo function. ForceUpdate Option = "FORCEUPDATE" )
type StorageConditions ¶
type StorageConditions struct { // Minimum Temperature recommended for storage. MinTemp wunit.Temperature // Maximum Temperature recommended for storage. MaxTemp wunit.Temperature // Is the Item sensitive to light. LightSensitive bool // Is the Item sensitive to moisture. MoistureSensistive bool // Is the Item sensitive to oxygen. OxygenSensistive bool // Is the Item sensitive to Freeze thaws. FreezeThawSensitive bool }
StorageConditions stores any restrictions.
func (StorageConditions) String ¶
func (s StorageConditions) String() string
String returns a summary of any storage restrictions.
Click to show internal directories.
Click to hide internal directories.