-- ABS-94024
ALTER TABLE ERP_I_CONTRACTCOMPONENT ADD
(GARMENTLOSSPERCENTAGE NUMBER DEFAULT 100 NOT NULL 
  CONSTRAINT ERP_I_CONTRCOMP_GRMLOSPER CHECK (GARMENTLOSSPERCENTAGE BETWEEN 0 AND 100),
 GARMENTEMBLEM VARCHAR2(1) NULL
  CONSTRAINT ERP_I_CONTRCOMP_GRMEMBLEM CHECK (GARMENTEMBLEM IN ('Y', 'N')));
  
ALTER TABLE ERP_I_CONTRACTPRODUCT ADD
(IMAGECARE NUMBER NULL
  CONSTRAINT ERP_I_CONTRPROD_IMAGECARE CHECK (IMAGECARE BETWEEN 0 AND 7),
 COMPLIANCYRULEORDERDELIVERY NUMBER NULL
  CONSTRAINT ERP_I_CONTRPROD_CMPRORDEL CHECK (COMPLIANCYRULEORDERDELIVERY IN (0,1,2)),
 COMPLIANCYRULEIMAGECARE NUMBER NULL
  CONSTRAINT ERP_I_CONTRPROD_CMPRIMAGE CHECK (COMPLIANCYRULEIMAGECARE IN (0,1,2)),
 COMPLIANCYRULEBILLING NUMBER NULL
  CONSTRAINT ERP_I_CONTRPROD_CMPRBILL CHECK (COMPLIANCYRULEBILLING IN (0,1,2)),
 COMPLIANCYRULEBGPROTECTION NUMBER NULL
  CONSTRAINT ERP_I_CONTRPROD_CMPRBGPRT CHECK (COMPLIANCYRULEBGPROTECTION IN (0,1,2)),
 GARMENTLOSSPERCENTAGE NUMBER DEFAULT 100 NOT NULL 
  CONSTRAINT ERP_I_CONTRPROD_GRMLOSPER CHECK (GARMENTLOSSPERCENTAGE BETWEEN 0 AND 100));

COMMENT ON COLUMN ERP_I_CONTRACTPRODUCT.IMAGECARE
  IS '0 = Not charged 1 = For repairs 2 = For Loss Charges 3 = For Repairs and Loss Charges 4 = For Residual Value 5 = For Repair and Residual Value 6 = For Residual Value and Loss Charge 7 = For Repairs and Loss Charges and Residual Value';
COMMENT ON COLUMN ERP_I_CONTRACTPRODUCT.COMPLIANCYRULEORDERDELIVERY
  IS '0 = Contract suggested, can be overruled 1 = Contract enforced, can only be overruled by maintenance user 2 = Contract enforced No default (Null = no compliancy rule)';
COMMENT ON COLUMN ERP_I_CONTRACTPRODUCT.COMPLIANCYRULEIMAGECARE
  IS '0 = Contract suggested, can be overruled 1 = Contract enforced, can only be overruled by maintenance user 2 = Contract enforced No default (Null = no compliancy rule)';
COMMENT ON COLUMN ERP_I_CONTRACTPRODUCT.COMPLIANCYRULEBILLING
  IS '0 = Contract suggested, can be overruled 1 = Contract enforced, can only be overruled by maintenance user 2 = Contract enforced No default (Null = no compliancy rule)';
COMMENT ON COLUMN ERP_I_CONTRACTPRODUCT.COMPLIANCYRULEBGPROTECTION
  IS '0 = Contract suggested, can be overruled 1 = Contract enforced, can only be overruled by maintenance user 2 = Contract enforced No default (Null = no compliancy rule)';
