Lines 823-828
CREATE TABLE `import_items` (
Link Here
|
823 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
823 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
824 |
|
824 |
|
825 |
-- |
825 |
-- |
|
|
826 |
-- Table structure for table 'invoice_adjustments' |
827 |
-- |
828 |
|
829 |
DROP TABLE IF EXISTS invoice_adjustments; |
830 |
CREATE TABLE IF NOT EXISTS invoice_adjustments ( |
831 |
adjustment_id int(11) NOT NULL AUTO_INCREMENT, -- primary key for adjustments |
832 |
invoiceid int(11) NOT NULL, -- foreign key to link an adjustment to an invoice |
833 |
adjustment decimal(28,6), -- amount of adjustment |
834 |
reason varchar(80) default NULL, -- reason for adjustment defined by authorised values in ADJ_REASON category |
835 |
note mediumtext default NULL, -- text to explain adjustment |
836 |
budget_id int(11) default NULL, -- optional link to budget to apply adjustment to |
837 |
encumber_open smallint(1) NOT NULL default 1, -- whether or not to encumber the finds when invoice is still open, 1 = yes, 0 = no |
838 |
timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- timestamp of last adjustment to adjustment |
839 |
PRIMARY KEY (adjustment_id), |
840 |
CONSTRAINT invoice_adjustments_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, |
841 |
CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE |
842 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
843 |
|
844 |
-- |
826 |
-- Table structure for table `issuingrules` |
845 |
-- Table structure for table `issuingrules` |
827 |
-- |
846 |
-- |
828 |
|
847 |
|
829 |
- |
|
|