--Order 20014940.50

ALTER TABLE PACKINGNOTE
	ADD (CORRECTIONFORNOTE_ID NUMBER NULL);

ALTER TABLE PACKINGNOTE
	ADD (CORRECTCONSIGNMENTNOTE NUMBER  DEFAULT 0 NOT NULL CONSTRAINT CORRECTCONSNOTE_Valid1_1 CHECK (CORRECTCONSIGNMENTNOTE IN (0, 1)));

COMMENT ON COLUMN PACKINGNOTE.CORRECTIONFORNOTE_ID IS 'In case of a correction ticket this is filled with the delivery note. Not a FK. Addition to CorrectedNoteNumber.';

COMMENT ON COLUMN PACKINGNOTE.CORRECTCONSIGNMENTNOTE IS '0 = No correction
1 = Exclude corrected note from consignment note
';