CREATE TABLE MOVTOFRANQUIA 
(
   CDFILIALFRAN  VARCHAR2(4)  NOT NULL,
   NMFILIALFRAN  VARCHAR2(30) NOT NULL,	
   DTFECHAFRANQ  DATE         NOT NULL,
   IDTPTAXAROYA  VARCHAR2(1)  DEFAULT '1' NOT NULL
       CONSTRAINT CKC_IDTPTAXAROYA_MOVTOFRANQUIA CHECK (IDTPTAXAROYA IN ('1','2','3')),
   IDTPTAXAMARK  VARCHAR2(1)  DEFAULT '1' NOT NULL
       CONSTRAINT CKC_IDTPTAXAMARK_MOVTOFRANQUIA CHECK (IDTPTAXAMARK IN ('1','2','3')),
   IDSITUNOTA    VARCHAR2(1)  DEFAULT 'P' NOT NULL
       CONSTRAINT CKC_IDSITUNOTA_MOVTOFRANQUIA CHECK (IDSITUNOTA IN ('P','A','G')),
   DTINIPERTAXA  DATE         NOT NULL, 
   DTFIMPERTAXA  DATE         NOT NULL,
   VRFATBRUTO    FLOAT        NULL,
   VRPERCROYALT  FLOAT        NULL,
   VRFIXOROYALT  FLOAT        NULL,
   VRBOLEROYALT  FLOAT        NULL,
   VRPERCMARKET  FLOAT        NULL,
   VRFIXOMARKET  FLOAT        NULL,
   VRNOTAMARKET  FLOAT        NULL,   
   DTVENCTONF    DATE         NOT NULL,
   DTHRAPURTAXA  DATE         NOT NULL,   
   DTHRGERANF    DATE         NULL,
   CDCLIFRAN     VARCHAR2(21) NULL,
   NMRAZSOCCLIEFRAN  VARCHAR2(50) NULL,
   CDFILIALNF     VARCHAR2(4)  NULL,
   NRLANCTONFROYA VARCHAR2(10) NULL,
   NRLANCTONFMARK VARCHAR2(10) NULL,	
   CONSTRAINT PK_MOVTOFRANQUIA PRIMARY KEY (CDFILIALFRAN,DTFECHAFRANQ)
)