--ABS-168354

--PACKINGNOTE TABLE

COMMENT ON COLUMN PACKINGNOTE.ORIGIN IS '0 = Generated based on Order 1 = Manually added 2 = Generated based on Outscan 3 = Quantity Correction Ticket 4 = Stock Delivery Note 5 = Special Order 6 = Bulk Note 7 = Bin Note 8 = Transfer Weights 9 = Import from DW 10 = Mounting Order 11 = Sales Order 12 = Credit Note 13 = Residential Delivery Note 14 = MultiReadShipment 15 = Charge To Product Process 16 = Customer Packing Note 17 = Curtain outscan 18 = Cabinet Service 19 = BM6 Packing Note 20 = Truck Replenishment 21 = Rejects 22 = Exchange Cart Assistant';

ALTER TABLE PACKINGNOTE DROP CONSTRAINT CHK_PACKINGNOTE_ORIGIN;

ALTER TABLE PACKINGNOTE ADD CONSTRAINT CHK_PACKINGNOTE_ORIGIN CHECK (ORIGIN IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22));

--PACKINGNOTELINE TABLE

COMMENT ON COLUMN PACKINGNOTELINE.ORIGIN IS '0 = Generated based on Order 1 = Manually added 2 = Generated based on Outscan 3 = Quantity Correction Ticket 4 = Stock Delivery Note 9 = Import from DW 10 = Mounting Order 11 = Sales Order 12 = Credit Note 13 = Residential Delivery Note 15 = Charge To Product Process 16 = BM6 Ordering 17 = Truck Replenishment 21 = Rejects 22 = Exchange Cart Assistant';

ALTER TABLE PACKINGNOTELINE DROP CONSTRAINT CHK_PACKINGNOTELINE_ORIGIN;

ALTER TABLE PACKINGNOTELINE ADD CONSTRAINT CHK_PACKINGNOTELINE_ORIGIN CHECK (ORIGIN IN (0,1,2,3,4,9,10,11,12,13,15,16,17,21,22));
