----------- ERP_I_CUSTOMER -----------
ALTER TABLE ERP_I_CUSTOMER ADD (MINIMUMINVOICEAMOUNT NUMBER(15,6),
                                DAYSNOPREPCHARGE NUMBER,
                                NOPREPCHARGE1STINVOICE VARCHAR2(1) DEFAULT 'N' NOT NULL,
                                NOEMBLEMCHARGE1STINVOICE VARCHAR2(1) DEFAULT 'N' NOT NULL);

ALTER TABLE ERP_I_CUSTOMER
  ADD CONSTRAINT CHK_ERPI_CUS_NOPREPCHARGE1STINVOICE
  CHECK (NOPREPCHARGE1STINVOICE IN ('Y','N'));
ALTER TABLE ERP_I_CUSTOMER
  ADD CONSTRAINT CHK_ERPI_CUS_NOPREPCHARGE
  CHECK ((DAYSNOPREPCHARGE >0 AND NOPREPCHARGE1STINVOICE = 'N') OR (DAYSNOPREPCHARGE =0 AND NOPREPCHARGE1STINVOICE = 'N'));
ALTER TABLE ERP_I_CUSTOMER
  ADD CONSTRAINT CHK_ERPI_CUS_NOEMBLEMCHARGE1STINVOICE
  CHECK (NOEMBLEMCHARGE1STINVOICE  IN ('Y','N'));
