Lines 2961-2966
CREATE TABLE aqinvoices (
Link Here
|
2961 |
|
2961 |
|
2962 |
|
2962 |
|
2963 |
-- |
2963 |
-- |
|
|
2964 |
-- Table structure for table 'aqcreditnotes' |
2965 |
-- |
2966 |
|
2967 |
DROP TABLE IF EXISTS aqcreditnotes; |
2968 |
CREATE TABLE aqcreditnotes ( |
2969 |
`creditnote_id` int(11) NOT NULL AUTO_INCREMENT, -- ID of the creditnote, primary key |
2970 |
`booksellerid` int(11) NOT NULL, -- foreign key to aqbooksellers |
2971 |
`invoiceid` int(11) NOT NULL, -- foreign key to aqinvoices |
2972 |
`vendorrefid` varchar(20) NOT NULL, -- Vendorreferenceid |
2973 |
`budget_id` int(11) NOT NULL, -- foreign key to aqbudgets |
2974 |
`amountcredit` decimal(28,6) default NULL, -- amountcredit cost |
2975 |
`creditdate` date default NULL, -- date of amountcredit |
2976 |
`notes` mediumtext, -- notes of amountcredit |
2977 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched |
2978 |
PRIMARY KEY (creditnote_id), |
2979 |
CONSTRAINT aqcreditnotes_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, |
2980 |
CONSTRAINT aqcreditnotes_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, |
2981 |
CONSTRAINT aqcreditnotes_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE |
2982 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
2983 |
|
2984 |
-- |
2964 |
-- Table structure for table `fieldmapping` |
2985 |
-- Table structure for table `fieldmapping` |
2965 |
-- |
2986 |
-- |
2966 |
|
2987 |
|