create table USR_IMPSERV
(
    CDFILIAL         VARCHAR2(4)            not null,
    NRLANCTONF       VARCHAR2(10)           not null,
    CDIMPOSTO        VARCHAR2(2)            not null,
    VRALIQ           FLOAT                  null    ,
    VRIMPOSTO        FLOAT                  null    ,
    constraint PK_IMPSERV primary key (CDFILIAL, NRLANCTONF, CDIMPOSTO)
)
/

create table USR_DESPESADIV
(
    CDFILIAL         VARCHAR2(4)            not null,
    CDDESPESA        VARCHAR2(5)            not null,
    NMDESPESA        VARCHAR2(50)           not null, 
    DTDESPESA        DATE                   not null,
    VRDESPESA        FLOAT                  not null,
    IDFATURA         VARCHAR2(1)            default 'N' null,
    IDFRETCONS       VARCHAR2(1)            default '' null,
        constraint DES_21523470 check (IDFRETCONS is null or (IDFRETCONS in ('O','F','R'))),
    IDDESPMASS       VARCHAR2(1)            default 'D' null    
        constraint DES_21523471 check (IDDESPMASS is null or (IDDESPMASS in ('D','M'))),
    constraint PK_DESPESADIV primary key (CDFILIAL, CDDESPESA, DTDESPESA)
)
/

create table USR_FATURADMIN
(
    CDFILIAL         VARCHAR2(4)            not null,
    TXFATUADMIN      FLOAT                  null,
    VRFATURFIXO      FLOAT                  null, 
    constraint PK_FATURADMIN primary key (CDFILIAL)
)
/
