--TD 11903 - route change is shown on the outscan screen


---------------------------CUSTOMER--------------------------


ALTER TABLE CUSTOMER
  ADD CONSTRAINT RETURNLINEN_valid  CHECK (RETURNLINEN IN (0,1, 2, 3, 4, 5, 6, 7, 8));


ALTER TABLE CUSTOMER
 ADD CONSTRAINT RETURNGARMENTS_valid  CHECK (RETURNGARMENTS IN (0,1, 2, 3, 4, 5, 6, 7, 8));

COMMENT ON COLUMN CUSTOMER.RETURNLINEN IS '1=next visit
2=next week same route
3=10 day delay
4=return route in route schedule
5=14 delay basis
6=28 delay basis
7=according to delivery scheme
8 = Next visit including same date';

COMMENT ON COLUMN CUSTOMER.RETURNGARMENTS IS '1=next visit
2=next week same route
3=10 day delay
4=return route in route schedule
5=14 delay basis
6=28 delay basis
7=according to delivery scheme
8 = Next visit including same date';


---------------------------PRODUCTLISTPERCUSTOMER--------------------------

BEGIN
EXECUTE IMMEDIATE ('ALTER TABLE PRODUCTLISTPERCUSTOMER DROP constraint DELAYEDEVENEXCHANGE_valid');
EXCEPTION WHEN OTHERS THEN NULL;
END;
/
ALTER TABLE PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT DELAYEDEVENEXCHANGE_valid  CHECK (DELAYEDEVENEXCHANGE IN (0, 1, 2, 3, 4, 5, 6, 7, 8));

COMMENT ON COLUMN PRODUCTLISTPERCUSTOMER.DELAYEDEVENEXCHANGE IS 'Defines the return method for delayed even
exchange.
0 = no delay,
1=next visit,
2=next week same day,
3=10 day delay,
4=return route in route schedule
5=14 delay basis
6=28 delay basis
7=according to delivery scheme
8 = Next visit including same date';

