/*ALIAS>prop_db*/

/*SQLStart>2870*/
CREATE TABLE TRANSACTION_TAXORDER (
    TRT_TO_ID           INTEGER NOT NULL,
    TRT_TRANSACTION_ID  INTEGER NOT NULL,
    TRT_VALUE           NUMERIC(15,2)
);
/*SQLStop*/

/*SQLStart>2871*/
ALTER TABLE TRANSACTION_TAXORDER ADD CONSTRAINT FK_TRANS_TAXORDER FOREIGN KEY (TRT_TO_ID) REFERENCES TAXORDERS (TO_ID);
/*SQLStop*/

/*SQLStart>2872*/
ALTER TABLE TRANSACTION_TAXORDER ADD CONSTRAINT FK_TRT_TRANSACTION FOREIGN KEY (TRT_TRANSACTION_ID) REFERENCES TRANSACTIONS (TR_ID);
/*SQLStop*/

/*SQLStart>2873*/
GRANT ALL ON TRANSACTION_TAXORDER TO PUBLIC;
/*SQLStop*/

/*SQLStart>2874*/
CREATE TABLE TRANSACTION_INCOME (
    TRI_INCOME_ID           INTEGER NOT NULL,
    TRI_TRANSACTION_ID  INTEGER NOT NULL,
    TRI_VALUE           NUMERIC(15,2)
);
/*SQLStop*/

/*SQLStart>2875*/
ALTER TABLE TRANSACTION_INCOME ADD CONSTRAINT FK_TRANS_INCOME FOREIGN KEY (TRI_INCOME_ID) REFERENCES TAKING (T_ID);
/*SQLStop*/

/*SQLStart>2876*/
ALTER TABLE TRANSACTION_INCOME ADD CONSTRAINT FK_TRI_TRANSACTION FOREIGN KEY (TRI_TRANSACTION_ID) REFERENCES TRANSACTIONS (TR_ID);
/*SQLStop*/

/*SQLStart>2877*/
GRANT ALL ON TRANSACTION_INCOME TO PUBLIC;
/*SQLStop*/

/*SQLStart>2878*/
UPDATE system_strings SET sys_str = '6.7.243.1' WHERE sys_id = 1401;
/*SQLStop*/
