View | Details | Raw Unified | Return to bug 6716
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-35 / +34 lines)
Lines 2734-2775 CREATE TABLE `aqorderdelivery` ( Link Here
2734
--
2734
--
2735
2735
2736
DROP TABLE IF EXISTS `aqorders`;
2736
DROP TABLE IF EXISTS `aqorders`;
2737
CREATE TABLE `aqorders` (
2737
CREATE TABLE `aqorders` ( --information related to the basket line items
2738
  `ordernumber` int(11) NOT NULL auto_increment,
2738
  `ordernumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier assigned by Koha to each line
2739
  `biblionumber` int(11) default NULL,
2739
  `biblionumber` int(11) default NULL, -- links the order to the biblio being ordered (biblio.biblionumber)
2740
  `entrydate` date default NULL,
2740
  `entrydate` date default NULL, -- the date the bib was added to the basket
2741
  `quantity` smallint(6) default NULL,
2741
  `quantity` smallint(6) default NULL, -- the quantity ordered
2742
  `currency` varchar(3) default NULL,
2742
  `currency` varchar(3) default NULL, -- the currency used for the purchase
2743
  `listprice` decimal(28,6) default NULL,
2743
  `listprice` decimal(28,6) default NULL, -- the vendor price for this line item
2744
  `totalamount` decimal(28,6) default NULL,
2744
  `totalamount` decimal(28,6) default NULL, -- not used? always NULL
2745
  `datereceived` date default NULL,
2745
  `datereceived` date default NULL, -- the date this order was received
2746
  `booksellerinvoicenumber` mediumtext,
2746
  `booksellerinvoicenumber` mediumtext, -- the invoice number this line item was received on
2747
  `freight` decimal(28,6) default NULL,
2747
  `freight` decimal(28,6) default NULL, -- shipping costs (not used)
2748
  `unitprice` decimal(28,6) default NULL,
2748
  `unitprice` decimal(28,6) default NULL, -- the actual cost entered when receiving this line item
2749
  `quantityreceived` smallint(6) NOT NULL default 0,
2749
  `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far
2750
  `cancelledby` varchar(10) default NULL,
2750
  `cancelledby` varchar(10) default NULL, -- not used? always NULL
2751
  `datecancellationprinted` date default NULL,
2751
  `datecancellationprinted` date default NULL, -- the date the line item was deleted
2752
  `notes` mediumtext,
2752
  `notes` mediumtext, -- notes related to this order line
2753
  `supplierreference` mediumtext,
2753
  `supplierreference` mediumtext, -- not used? always NULL
2754
  `purchaseordernumber` mediumtext,
2754
  `purchaseordernumber` mediumtext, -- not used? always NULL
2755
  `subscription` tinyint(1) default NULL,
2755
  `subscription` tinyint(1) default NULL, -- not used? always NULL
2756
  `serialid` varchar(30) default NULL,
2756
  `serialid` varchar(30) default NULL, -- not used? always NULL
2757
  `basketno` int(11) default NULL,
2757
  `basketno` int(11) default NULL, -- links this order line to a specific basket (aqbasket.basketno)
2758
  `biblioitemnumber` int(11) default NULL,
2758
  `biblioitemnumber` int(11) default NULL, -- links this order line the biblioitems table (biblioitems.biblioitemnumber)
2759
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2759
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order line was last modified
2760
  `rrp` decimal(13,2) default NULL,
2760
  `rrp` decimal(13,2) default NULL, -- the replacement cost for this line item
2761
  `ecost` decimal(13,2) default NULL,
2761
  `ecost` decimal(13,2) default NULL, -- the estimated cost for this line item
2762
  `gst` decimal(13,2) default NULL,
2762
  `gst` decimal(13,2) default NULL, -- the tax rate for this line item
2763
  `budget_id` int(11) NOT NULL,
2763
  `budget_id` int(11) NOT NULL, -- the fund this order goes against (aqbudgets.budget_id)
2764
  `budgetgroup_id` int(11) NOT NULL,
2764
  `budgetgroup_id` int(11) NOT NULL, -- not used? always zero
2765
  `budgetdate` date default NULL,
2765
  `budgetdate` date default NULL, -- not used? always NULL
2766
  `sort1` varchar(80) default NULL,
2766
  `sort1` varchar(80) default NULL, -- statistical field 
2767
  `sort2` varchar(80) default NULL,
2767
  `sort2` varchar(80) default NULL, -- second statistical field
2768
  `sort1_authcat` varchar(10) default NULL,
2768
  `sort1_authcat` varchar(10) default NULL,
2769
  `sort2_authcat` varchar(10) default NULL,
2769
  `sort2_authcat` varchar(10) default NULL,
2770
  `uncertainprice` tinyint(1),
2770
  `uncertainprice` tinyint(1), -- was this price uncertain (1 for yes, 0 for no)
2771
  `claims_count` int(11) default 0,
2771
  `claims_count` int(11) default 0, -- count of claim letters generated
2772
  `claimed_date` date default NULL,
2772
  `claimed_date` date default NULL, -- last date a claim was generated
2773
  PRIMARY KEY  (`ordernumber`),
2773
  PRIMARY KEY  (`ordernumber`),
2774
  KEY `basketno` (`basketno`),
2774
  KEY `basketno` (`basketno`),
2775
  KEY `biblionumber` (`biblionumber`),
2775
  KEY `biblionumber` (`biblionumber`),
2776
- 

Return to bug 6716