--ABS-72207
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_BILLINGMETHOD
  CHECK (BILLINGMETHOD IN (1, 2, 3, 4, 5));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_ALLOWRETURNTOSTOCK
  CHECK (ALLOWRETURNTOSTOCK IN (0,1,2,3,4));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_BM1FIXEDWEARERS
  CHECK (BM1FIXEDWEARERS IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_BUDGETUSAGE
  CHECK (BUDGETUSAGE IN (0,1,2));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CAUTOSOILPERC
  CHECK (AUTOSOILPERCENTAGE BETWEEN 0.0 AND 100.0);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHARGEEXCESS
  CHECK (CHARGEEXCESS IN (0,1,2));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHRWASHINACTSEASON
  CHECK (CHARGEWASHINACTIVESEASON IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CONTRACTCODE
  CHECK (CONTRACTCODE IS NULL OR CONTRACTCODE = UPPER(TRIM(CONTRACTCODE)));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERREPLACTQTY
  CHECK ((SRCCHARGERENT =1 AND DELIVERREPLACEMENTQTY ='Y') OR (SRCCHARGERENT = 0));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_FIXEDSTOCKROOM
  CHECK (FIXEDSTOCKROOM IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_FREEQTYFREQUENCY
  CHECK (FREEQTYFREQUENCY IN (0,1));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GARMEMB
  CHECK (GARMENTEMBLEM IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GARMENTSETUP
  CHECK (GARMENTSETUP IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GARMLOSS
  CHECK (GARMENTLOSS IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GARMMAIN
  CHECK (GARMENTMAINTENANCE IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GARMREPAIR
  CHECK (GARMENTREPAIR IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_GRMLOSSPERC
  CHECK (GARMENTLOSSPERCENTAGE BETWEEN 0 AND 100);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_LOSSCHARGEPERC
  CHECK (LOSSCHARGEPERCENTAGE BETWEEN 0.00 AND 999.99);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_MATERIALMAINPERC
  CHECK (MMPSPECIFICPERCENTAGE BETWEEN 0 AND 100);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_MBYOPPERCENTAGE
  CHECK (MBYOPPERCENTAGE BETWEEN 0.0 AND 100.0);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SEASONALRENT
  CHECK (SEASONALRENT IN (0,1,2));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SPECBULKP
  CHECK (SPECIFICBULKPACKINGTYPE IN (0,1,2));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SRCHARGEPERC
  CHECK (SRCHARGEPERCENTAGE BETWEEN 0.00 AND 999.99);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_STERILISATIONREQ
  CHECK (STERILISATIONREQUIRED IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_BILLMETHOD1
  CHECK (SIZECODE <> '*' OR CHANGESPERWEEK <> 'N' OR  BILLINGMETHOD <> 1);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_PLPC_DEPOSITSTOCKALLOWED
  CHECK ((DEPOSITSTOCKALLOWED = 'N') OR (DEPOSITSTOCKALLOWED='Y' AND BILLINGMETHOD=3));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELAYEVENEXCHANGE
  CHECK (DELAYEDEVENEXCHANGE BETWEEN 0 AND 7);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_INVBILLINGTYPE
  CHECK ((INVENTORYBILLINGTYPE = 0 AND BILLINGMETHOD <> 3) OR (BILLINGMETHOD=3 AND INVENTORYBILLINGTYPE IN (0, 1, 2, 3, 4)) OR
(BILLINGMETHOD=2 AND INVENTORYBILLINGTYPE IN (0, 1, 2)));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SOILCOUNT
  CHECK (SOILCOUNTMETHOD IN (1, 2, 3, 0));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SRCMETHOD
  CHECK (SRCMETHOD IN (1, 2, 3, 4, 0));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHARGEWASHESONLYFORCOG
  CHECK (CHARGEWASHESONLYFORCOG IN (0,1,2,3,4));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DEPOSITSTOCKALLOWED
  CHECK (DEPOSITSTOCKALLOWED IN ('N','Y'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DEPOSITSTOCKCHRPERC
  CHECK (DEPOSITSTOCKCHARGEPERCENTAGE BETWEEN 0 AND 100);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DATES_CHECK
  CHECK (DATEINACTIVE >= DATEACTIVE);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DDEDELIVERYSCHEMECODE
  CHECK ((DDEDELIVERYSCHEMECODE IS NULL) OR (DDEDELIVERYSCHEMECODE IS NOT NULL AND DELAYEDEVENEXCHANGE = 7));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELAYEDEVENEXCHANGE
  CHECK ((DELAYEDEVENEXCHANGE > 0 AND STRAIGHTEVENEXCHANGE = 'N') OR (DELAYEDEVENEXCHANGE = 0));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYFR
  CHECK (DELIVERYDAYFR IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYMO
  CHECK (DELIVERYDAYMO IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYSA
  CHECK (DELIVERYDAYSA IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYSU
  CHECK (DELIVERYDAYSU IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYTH
  CHECK (DELIVERYDAYTH IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYTU
  CHECK (DELIVERYDAYTU IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERYDAYWE
  CHECK (DELIVERYDAYWE IN ('D','B','P'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_MINIMUMFREQ
  CHECK ((MINIMUMFREQUENCY <> 5) OR (MINIMUMFREQUENCY=5 AND DELAYEDEVENEXCHANGE = 7));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_MINIMUM
  CHECK ((((MINIMUMQUANTITY = 0 AND MINIMUMTURNAROUND >= 0) OR
             (MINIMUMQUANTITY >= 0 AND MINIMUMTURNAROUND = 0)) AND BILLINGMETHOD = 2) OR
             BILLINGMETHOD <> 2);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_PRICEUSAGE
  CHECK (PRICEUSAGE BETWEEN 0 AND 4);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_RENTPRICEPERFREQ
  CHECK (RENTPRICEPERFREQUENCY IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_MINIMUMFREQUENCY
  CHECK (MINIMUMFREQUENCY BETWEEN 1 AND 5);
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SIZE_BILLING
  CHECK ((SIZECODE <> '*') OR (SIZECODE='*' AND BILLINGMETHOD IN (1,2,3,4,5)));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SPECIFICPUTUPTYPE
  CHECK (SPECIFICPUTUPTYPE IN (0, 1, 2, 3, 4, 5));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_SRCFREQUENCY
  CHECK (SRCFREQUENCY IN (0, 1, 2, 3));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_STRAIGHTEXHCANGE
  CHECK (STRAIGHTEVENEXCHANGE  IN ('Y','N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHARGEOVERUSE
  CHECK (CHARGEOVERUSE IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHANGESPERWEEK
  CHECK (CHANGESPERWEEK IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_ONSITEINVENTORYCOUNT
  CHECK (ONSITEINVENTORYCOUNT IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CODEUNIQUELY
  CHECK (CODEUNIQUELY IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CHARGESTOCKROOMINVENTORY
  CHECK (CHARGESTOCKROOMINVENTORY IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_DELIVERREPLACEMENTQTY
  CHECK (DELIVERREPLACEMENTQTY IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_CLEANCOUNT
  CHECK (CLEANCOUNT IN ('Y', 'N'));
ALTER TABLE ERP_I_PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT CHK_ERP_I_PLPC_RETURNSTOCKALLOWED
  CHECK (RETURNSTOCKALLOWED IN ('Y','N'));
