--ABS-57622 / ABS-79320
-------- CONSIGNMENTNOTE --------

ALTER TABLE CONSIGNMENTNOTE ADD (EDISTATUS NUMBER DEFAULT 0 NOT NULL
                                 CONSTRAINT EDISTATUS_VALID1 CHECK (EDISTATUS BETWEEN 0 AND 2));
COMMENT ON COLUMN CONSIGNMENTNOTE.EDISTATUS IS '0=Not Applicable
1=Not exported
3=Exported';

CREATE INDEX XIE1CONSIGNMENTNOTE ON CONSIGNMENTNOTE(BUSINESSUNIT_ID ASC, EMAILSTATUS ASC);
CREATE INDEX XIE2CONSIGNMENTNOTE ON CONSIGNMENTNOTE(BUSINESSUNIT_ID ASC, EDISTATUS ASC);


-------- INVOICEHEADER --------
 
ALTER TABLE INVOICEHEADER ADD (EDISTATUS NUMBER DEFAULT 0 NOT NULL
                               CONSTRAINT EDISTATUS_VALID2 CHECK (EDISTATUS BETWEEN 0 AND 2));
COMMENT ON COLUMN CONSIGNMENTNOTE.EDISTATUS IS '0=Not Applicable
1=Not exported
3=Exported';

CREATE INDEX XIE9INVOICEHEADER ON INVOICEHEADER(INVOICEBUSINESSUNIT_ID ASC, EMAILSTATUS ASC);
CREATE INDEX XIE10INVOICEHEADER ON INVOICEHEADER(INVOICEBUSINESSUNIT_ID ASC, EDISTATUS ASC);
                             