|
Lines 2715-2721
CREATE TABLE `aqorders` (
Link Here
|
| 2715 |
`listprice` decimal(28,6) default NULL, |
2715 |
`listprice` decimal(28,6) default NULL, |
| 2716 |
`totalamount` decimal(28,6) default NULL, |
2716 |
`totalamount` decimal(28,6) default NULL, |
| 2717 |
`datereceived` date default NULL, |
2717 |
`datereceived` date default NULL, |
| 2718 |
`booksellerinvoicenumber` mediumtext, |
2718 |
invoiceid int(11) default NULL, |
| 2719 |
`freight` decimal(28,6) default NULL, |
2719 |
`freight` decimal(28,6) default NULL, |
| 2720 |
`unitprice` decimal(28,6) default NULL, |
2720 |
`unitprice` decimal(28,6) default NULL, |
| 2721 |
`quantityreceived` smallint(6) NOT NULL default 0, |
2721 |
`quantityreceived` smallint(6) NOT NULL default 0, |
|
Lines 2747-2753
CREATE TABLE `aqorders` (
Link Here
|
| 2747 |
KEY `biblionumber` (`biblionumber`), |
2747 |
KEY `biblionumber` (`biblionumber`), |
| 2748 |
KEY `budget_id` (`budget_id`), |
2748 |
KEY `budget_id` (`budget_id`), |
| 2749 |
CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE, |
2749 |
CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE, |
| 2750 |
CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE |
2750 |
CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2751 |
CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE |
| 2751 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2752 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2752 |
|
2753 |
|
| 2753 |
|
2754 |
|
|
Lines 2764-2769
CREATE TABLE `aqorders_items` (
Link Here
|
| 2764 |
KEY `ordernumber` (`ordernumber`) |
2765 |
KEY `ordernumber` (`ordernumber`) |
| 2765 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2766 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2766 |
|
2767 |
|
|
|
2768 |
|
| 2769 |
-- |
| 2770 |
-- Table structure for table aqinvoices |
| 2771 |
-- |
| 2772 |
|
| 2773 |
DROP TABLE IF EXISTS aqinvoices; |
| 2774 |
CREATE TABLE aqinvoices ( |
| 2775 |
invoiceid int(11) NOT NULL AUTO_INCREMENT, -- ID of the invoice, primary key |
| 2776 |
invoicenumber mediumtext NOT NULL, -- Name of invoice |
| 2777 |
booksellerid int(11) NOT NULL, -- foreign key to aqbooksellers |
| 2778 |
shipmentdate date default NULL, -- date of shipment |
| 2779 |
billingdate date default NULL, -- date of billing |
| 2780 |
closedate date default NULL, -- invoice close date, NULL means the invoice is open |
| 2781 |
shipmentcost decimal(28,6) default NULL, -- shipment cost |
| 2782 |
shipmentcost_budgetid int(11) default NULL, -- foreign key to aqbudgets, link the shipment cost to a budget |
| 2783 |
PRIMARY KEY (invoiceid), |
| 2784 |
CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, |
| 2785 |
CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE |
| 2786 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2787 |
|
| 2788 |
|
| 2767 |
-- |
2789 |
-- |
| 2768 |
-- Table structure for table `fieldmapping` |
2790 |
-- Table structure for table `fieldmapping` |
| 2769 |
-- |
2791 |
-- |