order

package
v0.0.0-...-a011eca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2022 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 7 Imported by: 0

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

func GetOrderDetails

func GetOrderDetails(comp *wtype.Liquid) (orderDetails Details, err error)

GetOrderDetails returns order Details for a component.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL