Table testsql_comments.aqorders Generated by
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
Column Type Size Nulls Auto Default Children Parents Comments
ordernumber int 10  √ 
aqorders_items.ordernumber aqorders_items_ibfk_1 C
aqorders_transfers.ordernumber_from aqorders_transfers_ordernumber_from N
aqorders_transfers.ordernumber_to aqorders_transfers_ordernumber_to N
primary key and unique identifier assigned by Koha to each line
biblionumber int 10  √  null
biblio.biblionumber aqorders_ibfk_2 N
links the order to the biblio being ordered (biblio.biblionumber)
entrydate date 10  √  null the date the bib was added to the basket
quantity smallint 5  √  null the quantity ordered
currency varchar 3  √  null the currency used for the purchase
listprice decimal 28,6  √  null the vendor price for this line item
totalamount decimal 28,6  √  null not used? always NULL
datereceived date 10  √  null the date this order was received
invoiceid int 10  √  null
aqinvoices.invoiceid aqorders_ibfk_3 N
id of invoice
freight decimal 28,6  √  null shipping costs (not used)
unitprice decimal 28,6  √  null the actual cost entered when receiving this line item
quantityreceived smallint 5 0 the quantity that have been received so far
datecancellationprinted date 10  √  null the date the line item was deleted
cancellationreason text 65535  √  null reason of cancellation
order_internalnote mediumtext 16777215  √  null notes related to this order line, made for staff
order_vendornote mediumtext 16777215  √  null notes related to this order line, made for vendor
supplierreference mediumtext 16777215  √  null not used? always NULL
purchaseordernumber mediumtext 16777215  √  null not used? always NULL
basketno int 10  √  null
aqbasket.basketno aqorders_ibfk_1 C
links this order line to a specific basket (aqbasket.basketno)
timestamp timestamp 19 CURRENT_TIMESTAMP the date and time this order line was last modified
rrp decimal 13,2  √  null the replacement cost for this line item
ecost decimal 13,2  √  null the estimated cost for this line item
gstrate decimal 6,4  √  null the tax rate for this line item
discount float 6,4  √  null the discount for this line item
budget_id int 10
aqbudgets.budget_id Implied Constraint R
the fund this order goes against (aqbudgets.budget_id)
budgetgroup_id int 10 not used? always zero
budgetdate date 10  √  null not used? always NULL
sort1 varchar 80  √  null statistical field
sort2 varchar 80  √  null second statistical field
sort1_authcat varchar 10  √  null
sort2_authcat varchar 10  √  null
uncertainprice bit 0  √  null was this price uncertain (1 for yes, 0 for no)
claims_count int 10  √  0 count of claim letters generated
claimed_date date 10  √  null last date a claim was generated
subscriptionid int 10  √  null
subscription.subscriptionid aqorders_subscriptionid C
links this order line to a subscription (subscription.subscriptionid)
parent_ordernumber int 10  √  null ordernumber of parent order line, or same as ordernumber if no parent
orderstatus varchar 16  √  new the current status for this line item. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'

Table contained 0 rows at Tue Dec 27 18:01 NZDT 2016

Column(s) Type Sort Constraint Name
ordernumber Primary key Asc PRIMARY
invoiceid Performance Asc aqorders_ibfk_3
subscriptionid Performance Asc aqorders_subscriptionid
basketno Performance Asc basketno
biblionumber Performance Asc biblionumber
budget_id Performance Asc budget_id

Close relationships  within of separation: