|
Lines 2631-2637
CREATE TABLE `aqorders` (
Link Here
|
| 2631 |
`listprice` decimal(28,6) default NULL, |
2631 |
`listprice` decimal(28,6) default NULL, |
| 2632 |
`totalamount` decimal(28,6) default NULL, |
2632 |
`totalamount` decimal(28,6) default NULL, |
| 2633 |
`datereceived` date default NULL, |
2633 |
`datereceived` date default NULL, |
| 2634 |
`booksellerinvoicenumber` mediumtext, |
2634 |
invoiceid int(11) default NULL, |
| 2635 |
`freight` decimal(28,6) default NULL, |
2635 |
`freight` decimal(28,6) default NULL, |
| 2636 |
`unitprice` decimal(28,6) default NULL, |
2636 |
`unitprice` decimal(28,6) default NULL, |
| 2637 |
`quantityreceived` smallint(6) NOT NULL default 0, |
2637 |
`quantityreceived` smallint(6) NOT NULL default 0, |
|
Lines 2663-2669
CREATE TABLE `aqorders` (
Link Here
|
| 2663 |
KEY `biblionumber` (`biblionumber`), |
2663 |
KEY `biblionumber` (`biblionumber`), |
| 2664 |
KEY `budget_id` (`budget_id`), |
2664 |
KEY `budget_id` (`budget_id`), |
| 2665 |
CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE, |
2665 |
CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE, |
| 2666 |
CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE |
2666 |
CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2667 |
CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE |
| 2667 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2668 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2668 |
|
2669 |
|
| 2669 |
|
2670 |
|
|
Lines 2680-2685
CREATE TABLE `aqorders_items` (
Link Here
|
| 2680 |
KEY `ordernumber` (`ordernumber`) |
2681 |
KEY `ordernumber` (`ordernumber`) |
| 2681 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2682 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2682 |
|
2683 |
|
|
|
2684 |
|
| 2685 |
-- |
| 2686 |
-- Table structure for table aqinvoices |
| 2687 |
-- |
| 2688 |
|
| 2689 |
DROP TABLE IF EXISTS aqinvoices; |
| 2690 |
CREATE TABLE aqinvoices ( |
| 2691 |
invoiceid int(11) NOT NULL AUTO_INCREMENT, -- ID of the invoice, primary key |
| 2692 |
invoicenumber mediumtext NOT NULL, -- Name of invoice |
| 2693 |
booksellerid int(11) NOT NULL, -- foreign key to aqbooksellers |
| 2694 |
shipmentdate date default NULL, -- date of shipment |
| 2695 |
billingdate date default NULL, -- date of billing |
| 2696 |
closedate date default NULL, -- invoice close date, NULL means the invoice is open |
| 2697 |
shipmentcost decimal(28,6) default NULL, -- shipment cost |
| 2698 |
shipmentcost_budgetid int(11) default NULL, -- foreign key to aqbudgets, link the shipment cost to a budget |
| 2699 |
PRIMARY KEY (invoiceid), |
| 2700 |
CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, |
| 2701 |
CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE |
| 2702 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 2703 |
|
| 2704 |
|
| 2683 |
-- |
2705 |
-- |
| 2684 |
-- Table structure for table `fieldmapping` |
2706 |
-- Table structure for table `fieldmapping` |
| 2685 |
-- |
2707 |
-- |