-- ABS-93102 B - Curtains per M2/KG/Piece changes/ABS-99383

---------------WEIGHINGCATEGORY ----------
ALTER TABLE WEIGHINGCATEGORY ADD (CHARGEUNIT NUMBER DEFAULT 0 NOT NULL CONSTRAINT CHK_WEIGHCAT_CHARGEUNIT CHECK (CHARGEUNIT IN (0, 1, 2)));

COMMENT ON COLUMN WEIGHINGCATEGORY.CHARGEUNIT
IS '0 = Weight
1 = Size
2 = Piece
This attribute is only used for module CURTAINS. Option 1 and 2 are only set if WeighingUse = 1.
';

UPDATE WEIGHINGCATEGORY W
SET W.CHARGEUNIT = 1
WHERE W.WEIGHINGUSE = 1 AND W.EXTRAINPUT ='Y';

COMMIT;



