CREATE TABLE mov_cancelacionfacturasnomina
(
  idu_foliomovto integer NOT NULL,
  num_empleadocancela integer NOT NULL,
  clv_rfcempresa character varying(13) NOT NULL,
  fol_uuid character varying(36) NOT NULL,
  des_respuestapac text NOT NULL,
  fec_movto timestamp without time zone NOT NULL,
  imp_total integer NOT NULL,
  imp_subtotal integer NOT NULL,
  imp_descuento integer NOT NULL,
  CONSTRAINT pk_mov_cancelacionfacturasnomina_idu_foliomovto PRIMARY KEY (idu_foliomovto ),
  CONSTRAINT fk_mov_cancelacionfacturasnomina_clv_rfcempresa FOREIGN KEY (clv_rfcempresa)
      REFERENCES cat_empresasnomina (clv_rfc) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk_mov_cancelacionfacturasnomina_fol_uuid FOREIGN KEY (fol_uuid)
      REFERENCES mov_facturasnomina (fol_uuid) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk_mov_cancelacionfacturasnomina_idu_foliomovto FOREIGN KEY (idu_foliomovto)
      REFERENCES mov_facturasnomina (idu_foliomovto) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
);
ALTER TABLE mov_cancelacionfacturasnomina
  OWNER TO sysfacturaelectronicaadmin;
