Skip to main content

stocktransactions

Module: inventory

Inventory stock movements with serial and charge tracking.

NameTypeNullableDefault ValueNotes
PKID
bigintStock transaction ID
creator
integerCreator user ID (defaults to authenticated user on creation)
creationdate
bigintdate_part('epoch', now())Creation date and time as a Unix timestamp (defaults to current date and time on creation)
lastmodified
bigintdate_part('epoch', now())Last modification date and time as a Unix timestamp (auto-reset on modification)
item
items.ID
integerItem ID (**dependency**)
storage
storages.ID
integerStorage ID
transaction
transactions.ID
integerTransaction ID
transfer
stocktransactions.ID
bigintTransfer stock transaction ID; must be distinct from `ID` and `null` for RESERVED
flag
smallint0Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)
date
bigintdate_part('epoch', now())Designated date and time as a Unix timestamp (defaults to current date and time on creation)
chargenum
text''Charge (lot) number
location
text''Physical location (e.g. shelf identification)
reference
text''Reference identification
amount
double precisionAmount (quantity); must not be zero (greater than zero if `transfer` is not `null`)
sellingprice
double precision0Selling price per unit
purchaseprice
double precision0Purchase price per unit
serials
text[]Array-encoded serial numbers
subtransactions
bigint[]Array-encoded sub-transaction IDs
NameUniqueNulls DistinctPrimaryPartialMethodKeys
fk_stocktransactions_itembtreeitem
fk_stocktransactions_storageginstorage
fk_stocktransactions_transactionbtreetransaction
i_stocktransactions_datebtreedate
i_stocktransactions_reservationsbtreetransaction
i_stocktransactions_serialsginserials
pk_stocktransactionsbtreeID
s_stocktransactions_chargenumginchargenum
s_stocktransactions_referenceginreference
s_stocktransactions_serialsginf_safe_array_to_string(serials, ' ')
u_stocktransactions_transferbtreetransfer
NameType
c_stocktransactions_transfercheck
dc_stocktransactions_amountcheck
dc_stocktransactions_chargenumcheck
dc_stocktransactions_flagcheck
dc_stocktransactions_locationcheck
dc_stocktransactions_referencecheck
fk_stocktransactions_itemforeign_key
fk_stocktransactions_storageforeign_key
fk_stocktransactions_transactionforeign_key
fk_stocktransactions_transferforeign_key
pk_stocktransactionsprimary_key
NameTypeEventsFunctionDefinition
td_stocktransactions_serialsbeforedeleteftd_stocktransactions_serials
ti_stocktransactions_itembeforeinsertftiu_stocktransactions_item
ti_stocktransactions_serialsbeforeinsertfti_stocktransactions_serials
ti_stocktransactions_subtransactionsbeforeinsertftiu_stocktransactions_subtransactions
ti_stocktransactions_transferbeforeinsertfti_stocktransactions_transfer
tu_stocktransactions_itembeforeupdateftiu_stocktransactions_item
tu_stocktransactions_serialsbeforeupdateftu_stocktransactions_serials
tu_stocktransactions_subtransactionsbeforeupdateftiu_stocktransactions_subtransactions
tu_stocktransactions_transferbeforeupdateftu_stocktransactions_transfer
Loading...