CREATE TABLE CUSTOSUPRELACOL
(
    CDFILIAL            VARCHAR2(4)            NOT NULL,
    CDFILIALOL          VARCHAR2(4)            NOT NULL,
    CDPRODUTO           VARCHAR2(10)           NOT NULL,
    DTCUSTOSUP          DATE                   NOT NULL,
    VRCUSPRLISTP        FLOAT                  NULL,
    VRCUSPRLISM1        FLOAT                  NULL,
    VRCUSPRLISM2        FLOAT                  NULL,
    VRPRCUSTOAF         FLOAT                  NULL,
    VRPRCUSAFM1         FLOAT                  NULL,
    VRPRCUSAFM2         FLOAT                  NULL,
    VRHISPRLISTP        FLOAT                  NULL,
    CDFILCOTACOR        VARCHAR2(4)            NULL,
    NRCOLEPRACOR        VARCHAR2(10)           NULL,
    CDMARCAACOR         VARCHAR2(5)            NULL,
    CDREGIAOACOR        VARCHAR2(3)            NULL,
    CDFORNECACOR        VARCHAR2(21)           NULL,
    CDPRODACOR          VARCHAR2(10)           NULL,
    CDFILCOTLIST        VARCHAR2(4)            NULL,
    NRCOLEPRLIST        VARCHAR2(10)           NULL,
    CDMARCALIST         VARCHAR2(5)            NULL,
    CDREGIAOLIST        VARCHAR2(3)            NULL,
    CDFORNECLIST        VARCHAR2(21)           NULL,
    CDPRODLIST          VARCHAR2(10)           NULL,
    DTFINCUSTSUP        DATE                   NULL,
    CDFILCENTCMP        VARCHAR2(4)            NULL,
    NRLISTINFLAC        VARCHAR2(10)           NULL,
    VRPERLISINFL        FLOAT                  NULL,
    CDFILIALORIG        VARCHAR2(4)            NULL,
    CDPRODORIG          VARCHAR2(10)           NULL,
    DTCUSTSUPORI        DATE                   NULL,
    IDCUSLISTINF        VARCHAR2(1)            DEFAULT 'N' NULL,
    VRCUSLIPRIMP        FLOAT                  NULL,
    CDPRODCUSTAF        VARCHAR2(10)           NULL,
    CDFORNCUSTAF        VARCHAR2(21)           NULL,
    NRORG               NUMBER                 DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
    IDATIVO             VARCHAR2(1)            DEFAULT 'S',
    DTINCLUSAO          DATE                   DEFAULT SYSDATE,
    DTULTATU            DATE                   DEFAULT SYSDATE,
    NRORGINCLUSAO       NUMBER                 DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
    CDOPERINCLUSAO      VARCHAR2(12)           DEFAULT '1',
    NRORGULTATU         NUMBER                 DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
    CDOPERULTATU        VARCHAR2(12)           DEFAULT '1',
		CONSTRAINT CKC_IDCUSLISTINF CHECK (IDCUSLISTINF IS NULL OR (IDCUSLISTINF IN ('S','N'))),
		CONSTRAINT CKC_IDATIVO_CUSTOSUPRELACOL CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT PK_CUSTOSUPRELACOL PRIMARY KEY (CDFILIAL, CDFILIALOL, CDPRODUTO, DTCUSTOSUP)
)
/