Adição de historico

master
Fabio Faria 2022-11-29 14:01:44 -03:00
commit 9746d0d277
1401 changed files with 25270 additions and 325 deletions

View File

@ -1,26 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 6.x Runtime"/>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/VENDA">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

12
.gitignore vendored
View File

@ -1,12 +0,0 @@
.classpath
.project
org.eclipse.jdt.core.prefs
org.eclipse.m2e.core.prefs
org.eclipse.wst.common.component
org.eclipse.wst.common.project.facet.core.xml
org.eclipse.wst.validation.prefs
org.jboss.ide.eclipse.as.core.prefs
/target/
/.settings/
target
.settings

View File

@ -15,6 +15,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
@ -30,17 +35,12 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
<nature>org.jboss.tools.cdi.core.cdinature</nature>

View File

@ -1,15 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Flyway">
<wb-resource deploy-path="/" source-path="/src"/>
</wb-module>
</project-modules>

View File

@ -1,2 +0,0 @@
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=\n

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<distributionManagement>
<repository>
@ -36,21 +36,25 @@
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ojdbc14</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE COMISSAO RENAME COLUMN RECEITA_OUTROS TO RECEITA_OUTROS_OLD';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE COMISSAO ADD RECEITA_OUTROS NUMBER(7,2)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'UPDATE COMISSAO SET RECEITA_OUTROS = RECEITA_OUTROS_OLD';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,
FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.NEXTVAL, 1,''ADM > RELATORIOS >> BAIXAS VENDAS INTERNET'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOBAIXASVENDASINTERNET'',1,SYSDATE,-1)';
exception when others then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE OCD_PARAM ADD INDSEMPREGERARAPAGAR NUMBER(1,0)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,43 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430 );
begin
execute immediate 'ALTER TABLE BOLETO ADD (PONTUACAOFRAUDE NUMBER(3))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430 );
begin
execute immediate 'ALTER TABLE CAJA ADD (PONTUACAOFRAUDE NUMBER(3))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA ADD (PONTUACAOFRAUDEINI NUMBER(3))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430 );
begin
execute immediate 'ALTER TABLE EMPRESA ADD (PONTUACAOFRAUDEFIM NUMBER(3))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430 );
begin
execute immediate 'ALTER TABLE EMPRESA ADD (INDFIDELIDADE NUMBER(1) DEFAULT 0)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FOLIO_PREIMPRESO ADD (AIDF_ID NUMBER(15))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA MODIFY (PREFIXO VARCHAR2(16))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,26 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE HIST_PUNTOVENTA(
"HIST_PUNTOVENTA_ID" NUMBER(15,0) NOT NULL ENABLE,
"IND_BLOQUEIO" NUMBER (1,0),
"FEC_BLOQUEIO" DATE,
"PUNTOVENTA_ID" NUMBER(15,0),
"ACTIVO" NUMBER(1,0),
"FECMODIF" DATE,
"USUARIO_ID" NUMBER(7,0),
CONSTRAINT "PK_HIST_PUNTOVENDA" PRIMARY KEY ("HIST_PUNTOVENTA_ID"),
CONSTRAINT "FK_HIST_PUNTOVENDA_PUNTOVENDA" FOREIGN KEY("PUNTOVENTA_ID") REFERENCES PUNTO_VENTA("PUNTOVENTA_ID")
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE HIST_PUNTOVENTA_SEQ START WITH 1';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PTOVTA_COMISSAO ADD (INDRETERCOMISSAO NUMBER(1))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,15 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA MODIFY (PREFIXO VARCHAR2(20))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA MODIFY (PREFIXOAUXILIAR VARCHAR2(20))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA ADD (FECVENTADIGITA DATE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD (FECVENTADIGITA DATE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DIGITA_ITEM ADD (FECVENTADIGITA DATE)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,
FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.NEXTVAL, 1,''ENTREGAR BOLETO FORA DO INTERVALO'',
''COM.RJCONSULTORES.VENTABOLETOS.ENTREGARBOLETOALEMINTERVALO'',1,SYSDATE,-1)';
exception when others then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FOLIO_PREIMPRESO ADD (ESTACIONIMPRESORA_ID NUMBER(7,0))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,24 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE PARADA_COD_ORGAOCONCEDENTE (
PARADACODORGAOCONCEDENTE_ID NUMBER(7),
PARADA_ID NUMBER(7),
ORGAOCONCEDENTE_ID NUMBER(7),
CODIGO VARCHAR2(5),
CONSTRAINT FK_PARADACODORGCONC_PARADA FOREIGN KEY (PARADA_ID) REFERENCES PARADA (PARADA_ID),
CONSTRAINT FK_PARADACODORGCONC_ORGAO FOREIGN KEY (ORGAOCONCEDENTE_ID) REFERENCES ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE PARADA_CODORGAOCONCEDENTE_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,8 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA_SECUENCIA ADD (CANTKMENTRADASAIDA NUMBER(7,2))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,17 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE PRECIO_FIXO_PEDAGIO (PRECIOFIXO_ID NUMBER(15) NOT NULL, PRACA_PEDAGIO_ID NUMBER(15) NOT NULL, ORGAO_CONCEDENTE_ID NUMBER(15), CLASSE_SERVICO_ID NUMBER(15), VALOR_FIXO NUMBER(7,2) NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE PRECIO_FIXO_PEDAGIO_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER';
exception when object_exists then null;
end;

View File

@ -0,0 +1,8 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'INSERT INTO TIPO_OPERACION_CC (TIPOOPERACIONCC_ID, DESCTIPO, CVETIPO, INDCREDITO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (5, ''COMISSAO'', ''CM'', 1, 1, SYSDATE, 99)';
exception when dup_val_on_index then null;
end;

View File

@ -0,0 +1,96 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate '
CREATE TABLE ESQUEMA_CORRIDA_EMBRQ_DESEMBRQ (
ESQUEMACORRIDAEMBRQDESEMBRQ_ID NUMBER(7,0) NOT NULL,
ESQUEMACORRIDA_ID NUMBER(7,0) NOT NULL,
PARADA_ID NUMBER(7,0) NOT NULL,
ACTIVO NUMBER(1,0),
FECMODIF DATE,
USUARIO_ID NUMBER(7,0),
CONSTRAINT PK_ESQ_CORR_EMBRQ_DESEMBRQ PRIMARY KEY(ESQUEMACORRIDAEMBRQDESEMBRQ_ID),
CONSTRAINT FK_ESQ_CORR_EMBRQ_DESEMBRQ_COR FOREIGN KEY (ESQUEMACORRIDA_ID) REFERENCES ESQUEMA_CORRIDA(ESQUEMACORRIDA_ID),
CONSTRAINT FK_ESQ_CORR_EMBRQ_DESEMBRQ_PAR FOREIGN KEY (PARADA_ID) REFERENCES PARADA(PARADA_ID),
CONSTRAINT FK_ESQ_CORR_EMBRQ_DESEMBRQ_USU FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO(USUARIO_ID)
)
';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate '
CREATE TABLE RUTA_EMBRQ_DESEMBRQ (
RUTAEMBRQDESEMBRQ_ID NUMBER(7,0) NOT NULL,
RUTA_ID NUMBER(7,0) NOT NULL,
PARADA_ID NUMBER(7,0) NOT NULL,
ACTIVO NUMBER(1,0),
FECMODIF DATE,
USUARIO_ID NUMBER(7,0),
CONSTRAINT PK_RUTA_EMBRQ_DESEMBRQ PRIMARY KEY(RUTAEMBRQDESEMBRQ_ID),
CONSTRAINT FK_RUTA_EMBRQ_DESEMBRQ_RUTA FOREIGN KEY (RUTA_ID) REFERENCES RUTA(RUTA_ID),
CONSTRAINT FK_RUTA_EMBRQ_DESEMBRQ_PARADA FOREIGN KEY (PARADA_ID) REFERENCES PARADA(PARADA_ID),
CONSTRAINT FK_RUTA_EMBRQ_DESEMBRQ_USUARIO FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO(USUARIO_ID)
)
';
exception when object_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD EMBARQUE_ID NUMBER(7,0) CONSTRAINT FK_BOLETO_EMBARQUE REFERENCES PARADA(PARADA_ID)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD DESEMBARQUE_ID NUMBER(7,0) CONSTRAINT FK_BOLETO_DESEMBARQUE REFERENCES PARADA(PARADA_ID)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA ADD EMBARQUE_ID NUMBER(7,0) CONSTRAINT FK_CAJA_EMBARQUE REFERENCES PARADA(PARADA_ID)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA ADD DESEMBARQUE_ID NUMBER(7,0) CONSTRAINT FK_CAJA_DESEMBARQUE REFERENCES PARADA(PARADA_ID)';
exception when column_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE "RUTA_EMBRQ_DESEMBRQ_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE "ESQUEMA_CORRIDA_EMB_DESEM_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRICING_ESPECIFICO_OCUPACION ADD (DESCUENTO NUMBER(5,2))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,40 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE PTOVTA_EMPRESA_CONTABANCARIA (
PTOVTAEMPRESACONTABANCARIA_ID NUMBER(7) NOT NULL,
PTOVTAEMPRESA_ID NUMBER(7) NOT NULL,
EMPRESACONTABANCARIA_ID NUMBER(7) NOT NULL,
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
CONSTRAINT PTOVTAEMPCONBAN_PK PRIMARY KEY (PTOVTAEMPRESACONTABANCARIA_ID) ENABLE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE PTOVTAEMPCONBAN_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate
'insert into PTOVTA_EMPRESA_CONTABANCARIA (PTOVTAEMPRESACONTABANCARIA_ID, PTOVTAEMPRESA_ID, EMPRESACONTABANCARIA_ID, ACTIVO, FECMODIF, USUARIO_ID)
select PTOVTAEMPCONBAN_SEQ.nextval, PTOVTAEMPRESA_ID, EMPRESACONTABANCARIA_ID, ACTIVO, FECMODIF, USUARIO_ID from (
select PTOVTAEMPRESA_ID, EMPRESACONTABANCARIA_ID, ACTIVO, FECMODIF, USUARIO_ID from PTOVTA_EMPRESA where EMPRESACONTABANCARIA_ID is not null)';
exception when dup_val_on_index then null;
end;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -02275);
begin
execute immediate 'ALTER TABLE PTOVTA_EMPRESA_CONTABANCARIA ADD FOREIGN KEY (EMPRESACONTABANCARIA_ID) REFERENCES EMPRESA_CONTABANCARIA (EMPRESACONTABANCARIA_ID)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -02260);
begin
execute immediate 'ALTER TABLE PTOVTA_EMPRESA ADD CONSTRAINT PTOVTA_EMPRESA_PK PRIMARY KEY (PTOVTAEMPRESA_ID)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -02275);
begin
execute immediate 'ALTER TABLE PTOVTA_EMPRESA_CONTABANCARIA ADD FOREIGN KEY (PTOVTAEMPRESA_ID) REFERENCES PTOVTA_EMPRESA (PTOVTAEMPRESA_ID)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,23 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE CATEGORIA_BLOQ_IMPPOSTERIOR (
CATBLOQUEIOIMPPOSTERIOR_ID NUMBER(7) NOT NULL,
PUNTOVENTA_ID NUMBER(7) NOT NULL,
CATEGORIA_ID NUMBER(7) NOT NULL,
PRIMARY KEY (CATBLOQUEIOIMPPOSTERIOR_ID),
CONSTRAINT FK_CATBLOQIMPPOSTERIOR_PTOVTA FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID),
CONSTRAINT FK_CATBLOQIMPPOSTERIOR_CATEG FOREIGN KEY (CATEGORIA_ID) REFERENCES CATEGORIA (CATEGORIA_ID) )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE CAT_BLOQ_IMPPOSTERIOR_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,16 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRICING_ESPECIFICO ADD (EXIBEVENDA NUMBER(1,0))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRICING ADD (EXIBEVENDA NUMBER(1,0))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,24 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARJETA_CREDITO ADD (EMPRESA_ID NUMBER(7))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
begin
execute immediate 'ALTER TABLE TARJETA_CREDITO ADD CONSTRAINT TARJETA_CREDITO_FK_EMPRESA FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA (EMPRESA_ID) ENABLE';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
end;

View File

@ -0,0 +1,102 @@
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO RENAME COLUMN PRECIOFIXO_ID TO PRECIOFIXOPEDAGIO_ID';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO RENAME COLUMN PRACA_PEDAGIO_ID TO PRACAPEDAGIO_ID';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO RENAME COLUMN ORGAO_CONCEDENTE_ID TO ORGAOCONCEDENTE_ID';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO RENAME COLUMN CLASSE_SERVICO_ID TO CLASSESERVICO_ID';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO RENAME COLUMN VALOR_FIXO TO VALORFIXO';
exception
when object_exists then null;
when except_00957 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO ADD (ACTIVO NUMBER(1))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO ADD (FECMODIF DATE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PRECIO_FIXO_PEDAGIO ADD (USUARIO_ID NUMBER(7))';
exception when object_exists then null;
end;
/

View File

@ -0,0 +1,8 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD (FOLIORMD VARCHAR2(20))';
exception when column_exists then null;
end;
/

View File

@ -0,0 +1,52 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD (VIGENCIATARIFA_ID NUMBER(7) )';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD CONSTRAINT TARIFA_MINIMA_FK_VIGENCIA FOREIGN KEY (VIGENCIATARIFA_ID ) REFERENCES VIGENCIA_TARIFA( VIGENCIATARIFA_ID ) ENABLE';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD (RUTA_ID NUMBER(7) )';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD CONSTRAINT TARIFA_MINIMA_FK_RUTA FOREIGN KEY (RUTA_ID ) REFERENCES RUTA (RUTA_ID) ENABLE';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD (REGIONMETROPOLITANA_ID NUMBER(7) )';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD CONSTRAINT TARIFA_MINIMA_FK_REGION FOREIGN KEY (REGIONMETROPOLITANA_ID) REFERENCES REGION_METROPOLITANA (REGIONMETROPOLITANA_ID) ENABLE';
exception when others then null;
end;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE
TABLE PRICING_ESP_PUNTO_VENTA (
PRICINGESPPUNTOVENTA_ID NUMBER(15) NOT NULL,
PUNTOVENTA_ID NUMBER(15) NOT NULL,
PRICINGESPECIFICO_ID NUMBER(15) NOT NULL ,
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
CONSTRAINT PRICINGESPPUNTOVENTA_PK PRIMARY KEY (PRICINGESPPUNTOVENTA_ID) ENABLE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE PRICING_ESP_PUNTOV_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER';
exception when object_exists then null;
end;

View File

@ -0,0 +1,55 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDSEGUNDA NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDTERCA NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDQUARTA NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDQUINTA NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDSEXTA NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDSABADO NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDDOMINGO NUMBER(1) DEFAULT 1)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,176 @@
declare
except_04043 exception;
pragma exception_init (except_04043, -04043);
begin
execute immediate 'DROP FUNCTION FN_ARREDONDAMENTO_TARIFA';
exception
when except_04043 then null;
end;
/
create or replace FUNCTION "FN_ARREDONDAMENTO_TARIFA"(pTarifa IN NUMBER,
pOrgaoConcedenteId IN NUMBER,
pImporteSeguro IN NUMBER,
pImporteTaxaEmbarque IN NUMBER,
pImportePedagio IN NUMBER,
pImporteOutros IN NUMBER,
pTxEmbarque IN INTEGER)
RETURN NUMBER AS
lStrPrecoTotal VARCHAR(15);
lUltimoNumero NUMBER;
lStrPenlultimoNumero VARCHAR(2);
lStrParteInteira VARCHAR(10);
lPrecoTotallArredondado NUMBER;
lPrecoTotal NUMBER;
lDiferencaArredondamento NUMBER;
lCentavos NUMBER;
lDoisUltimos NUMBER;
lTresUltimos NUMBER;
lStrAntePenlultimoNumero NUMBER;
BEGIN
IF pTxEmbarque = 1
THEN
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImporteTaxaEmbarque, 0) +
coalesce(pImportePedagio, 0) + coalesce(pImporteOutros, 0);
ELSE
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImportePedagio, 0) +
coalesce(pImporteOutros, 0);
END IF;
lPrecoTotallArredondado := lPrecoTotal;
lStrPrecoTotal := to_char(lPrecoTotal, '99999.99');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrPenlultimoNumero := substr(lStrPrecoTotal, length(lStrPrecoTotal) - 1, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 3));
lCentavos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
-- SINFRA - MA - tarifas arredondadas a cada R$ 0,50 - com a seguinte regra, de 0,01 a 0,24 e de 0,51 a 0,74, arredonda para baixo, e de 0,25 a 0,49 e de 0,75 a 0,99, arredonda para cima.
IF pOrgaoConcedenteId = 17
THEN
IF lCentavos BETWEEN 1 AND 24
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99');
END IF;
IF (lCentavos BETWEEN 51 AND 74) OR (lCentavos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '50', '99999.99');
END IF;
IF lCentavos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
END IF;
END IF;
-- SETRANS - PI - tarifas arredondadas a cada R$ 0,10 - sendo de 0,01 a 0,04 arredonda para baixo, de 0,05 a 0,09, arredonda para cima.
IF pOrgaoConcedenteId = 18 OR pOrgaoConcedenteId = 10
THEN
IF lUltimoNumero BETWEEN 1 AND 4
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
IF lUltimoNumero BETWEEN 5 AND 9
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0', '99999.99') + 0.1;
END IF;
END IF;
--DER-MG -- DER-PB e DETRAN-CE: mesma regra para os dois, tarifas arredondadas a cada R$ 0,05, sendo de 0,01 a 0,024 e 0,051 a 0,074 arredonda para baixo e de 0,025 a 0,049 e de 0,075 a 0,099 arredonda para cima.
IF pOrgaoConcedenteId = 19 OR pOrgaoConcedenteId = 20 OR pOrgaoConcedenteId = 6
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.999');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -3, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 4));
lDoisUltimos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
IF lDoisUltimos BETWEEN 10 AND 24
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999');
END IF;
IF (lDoisUltimos BETWEEN 51 AND 74) OR (lDoisUltimos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '50', '99999.999');
END IF;
IF lDoisUltimos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999') + 0.1;
END IF;
END IF;
--ARTESP
IF pOrgaoConcedenteId = 21
THEN
--regra 1
IF lUltimoNumero BETWEEN 1 AND 2
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
--regras 2 e 3
IF (lUltimoNumero BETWEEN 3 AND 4) OR (lUltimoNumero BETWEEN 6 AND 7)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '5',
'99999.99');
END IF;
--regra 5
IF lCentavos BETWEEN 98 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
--regra 4
ELSIF lUltimoNumero BETWEEN 8 AND 9
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || (to_number(substr(lCentavos, -2, 1), '9') + 1),
'99999.99');
END IF;
END IF;
IF pOrgaoConcedenteId= 9 or pOrgaoConcedenteId = 22
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.9999');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -4, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 5));
lTresUltimos := to_number(substr(lStrPrecoTotal, -3, 3), '999');
IF lTresUltimos BETWEEN 001 and 254
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 255 AND 754
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '500', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 755 AND 999
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999') + 0.1;
END IF;
END IF;
lDiferencaArredondamento := lPrecoTotallArredondado - lPrecoTotal;
RETURN pTarifa + ldiferencaarredondamento;
END FN_ARREDONDAMENTO_TARIFA;
/

View File

@ -0,0 +1,8 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE PUNTO_VENTA ADD(TAXACONVENIENCIAPORC NUMBER(7,2),
MAXIMOTAXACONVENIENCIA NUMBER(7,2))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,16 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD (COEFICIENTETARIFA_ID NUMBER(7) )';
exception when others then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_MINIMA ADD CONSTRAINT TARIFA_MINIMA_FK_COEFICIENTE FOREIGN KEY (COEFICIENTETARIFA_ID) REFERENCES COEFICIENTE_TARIFA (COEFICIENTETARIFA_ID) ENABLE';
exception when others then null;
end;

View File

@ -0,0 +1,47 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE SECRETARIA ADD (INDSERIESUBSERIE NUMBER(1,0) DEFAULT NULL)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CUPON_SECRETARIA ADD (SERIE VARCHAR(30) DEFAULT NULL)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CUPON_SECRETARIA ADD (SUBSERIE VARCHAR(30) DEFAULT NULL)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA_DET_PAGO ADD (SERIESUBSERIE VARCHAR2(30) DEFAULT NULL)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA_DET_PAGO ADD (CAJADIVERSOS_ID NUMBER(15,0) DEFAULT NULL)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA_DET_PAGO ADD (CAJADIVERSOSPAGO_ID NUMBER(15,0) DEFAULT NULL)';
exception when column_exists then null;
end;

View File

@ -0,0 +1,35 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE TIPO_EVENTO_EXTRA ADD( CVESISTEMA VARCHAR2(30))';
exception when column_exists then null;
end;
/
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate 'alter table TIPO_EVENTO_EXTRA add constraint uniq_cvesistema unique("CVESISTEMA")';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;
/
declare
begin
execute immediate 'alter session set nls_numeric_characters = '',.'' ';
execute immediate 'Insert into TIPO_EVENTO_EXTRA (TIPOEVENTOEXTRA_ID,PARAMARTICULO_ID,INDTIPO,IMPMAX,INDVALIDACORTE,INDVALIDADOCUMENTO,INDCONTRAPARTIDA,INDBOLETO,INDORDENSERVICIO,PORCIVA,FORMAPAGO_ID,USUARIO_ID,FECMODIF,ACTIVO,PARAMARTICULO2_ID,INDTIPO2,FORMAPAGO2_ID,INDOPERACION,DESCTIPOEVENTO,PROVEEDOR,IMPFISCALNUMOPERACAO,NATUREZA,CONTACONTABIL,INDCONFERENCIAFISICACOMISSAO,CVETIPOEVENTO,CVESISTEMA)
values (TIPO_EVENTO_EXTRA_SEQ.nextval,null,''1'',''99999,99'',null,''0'',null,''0'',null,''0'',null,''1'',sysdate,''1'',null,null,null,''1'',''TAXA DE CONVENIENCIA TARIFA'',null,null,''RECEITA'',null,null,null,''TAXA_CONVENIENCIA_TARIFA'')';
exception when others then null;
end;

View File

@ -0,0 +1,16 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE ESQUEMA_CORRIDA_EMBRQ_DESEMBRQ ADD (EMBARQUE NUMBER(1,0), DESEMBARQUE NUMBER(1,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA_EMBRQ_DESEMBRQ ADD (EMBARQUE NUMBER(1,0), DESEMBARQUE NUMBER(1,0))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,23 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_BLOQ_IMPPOSTERIOR ADD (ACTIVO NUMBER(1) DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_BLOQ_IMPPOSTERIOR ADD (FECMODIF DATE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_BLOQ_IMPPOSTERIOR ADD (USUARIO_ID NUMBER(7))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE USUARIO ADD (TEMPODEVOLUCAOPASSAGEM NUMBER(7))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,8 @@
declare
begin
execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 2, ''VTA>SITEFF>>ACESSO_MENU_SITEF'',
''ACESSO_MENU_INTERATIVO_SITEF'', 1,
current_date, NULL)';
exception when others then null;
end;

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,
FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.NEXTVAL, 1,''ALTERAR EMBARQUE DESEMBARQUE'',
''COM.RJCONSULTORES.VENTABOLETOS.ALTERAREMBARQUEDESEMBARQUE'',1,SYSDATE,-1)';
exception when others then null;
end;

View File

@ -0,0 +1,27 @@
declare
table_exists exception;
pragma exception_init (table_exists , -00955);
begin
execute immediate'
CREATE TABLE MOTIVO_DEVOLUCAO_BILHETE
(
MOTIVODEVOLUCAOBILHETE_ID NUMBER(15) PRIMARY KEY NOT NULL,
DESCMOTIVO VARCHAR2(50) NULL,
ACTIVO NUMBER(1) NULL,
USUARIO_ID NUMBER(7) NULL,
FECMODIF DATE NULL
)';
exception when table_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE MOTIVO_DEVOLUCAO_BILHETE_SEQ
MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1
START WITH 1 CACHE 20 NOORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,6 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
values (FUNCION_SISTEMA_SEQ.NEXTVAL,1,''ADM >> CONFIG COMERCIAL > MOTIVO DEVOLUCAO BILHETE'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGO.MENU.MOTIVOSDELADEVOLUCAOBILHETE'',1,SYSDATE,1)';
exception when others then null;
end;

View File

@ -0,0 +1,6 @@
declare
begin
execute immediate 'INSERT INTO PRICING_ESP_PUNTO_VENTA pe ( pe.PRICINGESPPUNTOVENTA_ID, pe.PUNTOVENTA_ID, pe.PRICINGESPECIFICO_ID, pe.ACTIVO, pe.FECMODIF, pe.USUARIO_ID )
SELECT PRICING_ESP_PUNTOV_SEQ.nextval ,-1, p.PRICINGESPECIFICO_ID,1,sysdate,1 FROM PRICING_ESPECIFICO p WHERE ACTIVO=1';
exception when others then null;
end;

View File

@ -0,0 +1,27 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'alter table control_efectivo modify (controlefectivo_id number(8,0))';
exception when column_exists then null;
end;
/
declare
except_02289 exception;
pragma exception_init (except_02289, -02289);
begin
execute immediate 'drop sequence CONTROL_EFECTIVO_SEQ';
exception when except_02289 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
valor_atual number := 0;
begin
execute immediate 'select coalesce(max(controlefectivo_id),0)+1 from CONTROL_EFECTIVO' INTO valor_atual;
execute immediate 'CREATE SEQUENCE CONTROL_EFECTIVO_SEQ MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH ' || valor_atual || ' CACHE 20 NOORDER NOCYCLE' ;
exception when object_exists then null;
end;

View File

@ -0,0 +1,12 @@
declare
begin
begin
execute immediate 'INSERT INTO CONSTANTE(CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
VALUES(CONSTANTE_SEQ.nextval,''AUDITAR_SISTEMA'',''Auditoria do sistema'',1,''false'',1,1,sysdate,1)';
exception when others then null;
end;
begin
execute immediate 'UPDATE CONSTANTE SET VALORCONSTANTE = ''false'' WHERE NOMBCONSTANTE = ''AUDITAR_SISTEMA''';
exception when others then null;
end;
end;

View File

@ -0,0 +1,16 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'alter table CONTA_CORRENTE_PTOVTA MODIFY ( IMPORTE number(12,2),
IMPORTETARIFA number(12,2),
IMPORTEPEDAGIO number(12,2),
IMPORTETAXAEMBARQUE number(12,2),
IMPORTESEGURO number(12,2),
IMPORTEINGRESO number(12,2),
IMPORTEEGRESO number(12,2),
IMPORTEDEVOLUCION number(12,2),
IMPORTETROCA number(12,2),
IMPORTETOTALEFECTIVO number(12,2))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,15 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'UPDATE USUARIO SET TEMPODEVOLUCAOPASSAGEM = 0 WHERE TEMPODEVOLUCAOPASSAGEM IS NULL';
exception when dup_val_on_index then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE USUARIO MODIFY (TEMPODEVOLUCAOPASSAGEM DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD (MOTIVODEVOLUCAOBILHETE_ID NUMBER(7))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE MOTIVO_DEVOLUCAO_BILHETE ADD (TXTRELATORIO VARCHAR2(100))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,59 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE MD_CONTA (
CONTA_ID NUMBER(7) NOT NULL,
CVECONTA VARCHAR2(50),
NOME VARCHAR2(100),
TIPO VARCHAR2(1),
CODIGOCONTABIL NUMBER(5),
DOCASSOCIADO NUMBER(1),
CANCELAMENTO NUMBER(1),
STATUS NUMBER(1),
ORIGEM VARCHAR2(2),
REFERENCIA VARCHAR2(100),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (CONTA_ID)
)';
execute immediate
'CREATE SEQUENCE MDCONTA_SEQ INCREMENT BY 1 START WITH 50 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE MD_TOTALIZADOR (
TOTALIZADOR_ID NUMBER(12) NOT NULL,
FECCORTE DATE,
PUNTOVENTA_ID NUMBER(7),
EMPRESA_ID NUMBER(7),
CONTA_ID NUMBER(7),
IMPORTE NUMBER(12,2),
PRIMARY KEY (TOTALIZADOR_ID)
)';
execute immediate
'CREATE SEQUENCE MDTOTALIZADOR_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -02275);
begin
execute immediate 'ALTER TABLE MD_TOTALIZADOR ADD FOREIGN KEY (CONTA_ID) REFERENCES MD_CONTA (CONTA_ID)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE MD_TOTALIZADOR ADD (ACTIVO NUMBER(1))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE MD_TOTALIZADOR ADD (USUARIO_ID NUMBER(7))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE MD_TOTALIZADOR ADD (FECMODIF DATE)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,30 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE MD_RESUMO_ECF (
RESUMOECF_ID NUMBER(12) NOT NULL,
DATAMOV VARCHAR2(8),
PUNTOVENTA_ID NUMBER(7),
SERIE VARCHAR2(6),
SUBSERIE VARCHAR2(3),
TOTAL NUMBER(12,2),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (RESUMOECF_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE MDRESUMOECF_SEQ INCREMENT BY 1 START WITH 50 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE EVENTO_EXTRA ADD (SERIEIMPFISCAL VARCHAR2(6))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,
FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.NEXTVAL, 1,''ADM > CATALOGOS >> CONTAS MD'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGOS.CONTASMD'',1,SYSDATE,-1)';
exception when others then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE OCD ADD(INDPUNTOVENTAESTORNO NUMBER(1,0) DEFAULT 0)';
exception when column_exists then null;
end;

View File

@ -0,0 +1,38 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'update ocd set INDPUNTOVENTAESTORNO = 1 where ocd_id in(select OCD.OCD_ID FROM
BOLETO B
INNER JOIN OCD OCD
ON
OCD.BOLETO_ID = B.BOLETO_ID
INNER JOIN MARCA M
ON
M.MARCA_ID = B.MARCA_ID
INNER JOIN EMPRESA E
ON
E.EMPRESA_ID = M.EMPRESA_ID
LEFT JOIN OCD_PARAM op
ON
op.EMPRESA_ID = E.EMPRESA_ID
AND op.ACTIVO = 1
LEFT JOIN OCD_PTOVTA_PARAM opp
ON
opp.OCDPARAM_ID = op.OCDPARAM_ID
AND opp.ACTIVO = 1
WHERE
OCD.FECINC >= to_date(''01/06/2017'',''dd/MM/yyyy'')
AND
(
B.PTOVTAVENTA_ID = (select VALORCONSTANTE from CONSTANTE where NOMBCONSTANTE = ''PUNTO_VENTA_J3'')
OR B.PUNTOVENTA_ID = (select VALORCONSTANTE from CONSTANTE where NOMBCONSTANTE = ''PUNTO_VENTA_J3'')
OR
(
B.PTOVTAVENTA_ID = opp.PUNTOVENTA_ID
OR B.PUNTOVENTA_ID = opp.PUNTOVENTA_ID
)
))';
exception when dup_val_on_index then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA ADD (INDVALIDADESCONTOTARIFA NUMBER(1,0) DEFAULT 0)';
exception when column_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PTOVTA_CAT_IND ADD (USUARIOBLOQUEADO_ID NUMBER(7) DEFAULT -1) ';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
ja_existe exception;
pragma exception_init (ja_existe , -00001);
begin
execute immediate 'INSERT INTO USUARIO (USUARIO_ID, NOMBUSUARIO, CVEUSUARIO, activo) VALUES (-1, ''TODOS'', ''TODOS'', 1)';
exception when ja_existe then null;
end;

View File

@ -0,0 +1,12 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE PTOVTA_COMISSAO
ADD (
INDBILHETESTROCADOS NUMBER (1,0) DEFAULT 1,
INDBILHETESTRANSFERIDOS NUMBER (1,0) DEFAULT 1,
INDBILHETESDEVCANORIGEM NUMBER (1,0)
)';
exception when column_exists then null;
end;

View File

@ -0,0 +1,8 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD (INDBLOQUEIOPTA NUMBER(1,0))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,8 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) values (CONSTANTE_SEQ.NEXTVAL,''FECHAMENTO_CONTA_CORRENTE_FIXO'',''FECHAMENTO_CONTA_CORRENTE_FIXO'',''1'',''-1'',''1'',''1'',to_date(''21-03-2015 10:24:00'',''DD-MM-YYYY HH24:MI:SS''),''1'')';
exception when dup_val_on_index then null;
end;

View File

@ -0,0 +1,111 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indSegunda = 1 where indSegunda is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indTerca = 1 where indTerca is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indQuarta = 1 where indQuarta is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indQuinta = 1 where indQuinta is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indSexta = 1 where indSexta is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indSabado = 1 where indSabado is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update CATEGORIA_DESCUENTO set indDomingo = 1 where indDomingo is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSEGUNDA NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDTERCA NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDQUARTA NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDQUINTA NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSEXTA NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSABADO NOT NULL)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01442);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDDOMINGO NOT NULL)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE USUARIO ADD (INDEXPIRASENHA NUMBER(1) DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,161 @@
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''-1'',''TODOS'',''0'',''0'',to_date(''22-12-2012 18:10:18'',''DD-MM-YYYY HH24:MI:SS''),''1'',''1'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''1'',''DER/SP'',''0'',''0'',to_date(''24-03-2015 15:51:45'',''DD-MM-YYYY HH24:MI:SS''),''1'',''462'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''2'',''DER/PR'',''0'',''0'',to_date(''28-09-2015 14:07:00'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''3'',''ANTT'',''0'',''0'',to_date(''04-07-2017 16:40:36'',''DD-MM-YYYY HH24:MI:SS''),''1'',''462'',''04.898.488/0001-77'',''1'',''60'',''0,61'',null,''50'')';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''4'',''DER/MS'',''0'',''0'',to_date(''26-08-2015 14:42:56'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6486'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''5'',''DER/MT'',''0'',''0'',to_date(''02-10-2015 12:01:37'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''6'',''DER/MG'',''0'',''0'',to_date(''23-11-2016 17:04:46'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',''0'',''60'',''1,111'',null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''7'',''DER/BA'',''0'',''0'',to_date(''21-10-2016 09:36:14'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6405'',''04.898.488/0001-77'',''1'',''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''8'',''DER/CE/PB/PA'',''0'',''0'',to_date(''07-10-2015 11:16:58'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',''1'',''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''9'',''DER/RJ'',''0'',''0'',to_date(''11-05-2017 14:28:20'',''DD-MM-YYYY HH24:MI:SS''),''1'',''7089'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''10'',''DER/ES'',''0'',''0'',to_date(''07-10-2015 11:17:03'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',''1'',''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''11'',''INTERNACIONAL'',''0'',''0'',to_date(''21-08-2012 16:44:42'',''DD-MM-YYYY HH24:MI:SS''),''1'',''146'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''12'',''DER/TO'',''0'',''0'',to_date(''20-03-2015 15:12:24'',''DD-MM-YYYY HH24:MI:SS''),''1'',''4393'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''13'',''DER/CE'',''1'',''0'',to_date(''22-03-2017 14:05:15'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6486'',''04.898.488/0001-77'',''1'',''65'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''14'',''DER/PE'',''0'',''0'',to_date(''28-09-2015 15:26:12'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''15'',''DER/SC'',''0'',''0'',to_date(''28-09-2015 13:56:33'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''16'',''DER/GO'',''0'',''0'',to_date(''28-09-2015 17:16:14'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''17'',''SINFRA - MA'',''0'',''0'',to_date(''18-03-2015 14:51:54'',''DD-MM-YYYY HH24:MI:SS''),''1'',''2642'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''18'',''SETRANS - PI'',''0'',''0'',to_date(''31-01-2014 17:42:22'',''DD-MM-YYYY HH24:MI:SS''),''1'',''-1'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''19'',''DER-PB'',''0'',''0'',to_date(''02-10-2015 11:42:34'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''20'',''DETRAN-CE'',''0'',''0'',to_date(''23-02-2017 14:15:14'',''DD-MM-YYYY HH24:MI:SS''),''1'',''1861'',''04.898.488/0001-77'',''0'',''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''21'',''ARTESP'',''0'',''0'',to_date(''03-07-2017 12:55:52'',''DD-MM-YYYY HH24:MI:SS''),''1'',''7478'',''04.898.488/0001-77'',''1'',''60'',''24,3'',null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''22'',''DETRO/RJ'',''0'',''0'',to_date(''03-07-2017 11:39:48'',''DD-MM-YYYY HH24:MI:SS''),''1'',''7449'',''04.898.488/0001-77'',null,''60'',''1'',null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''23'',''Pref.Marilia'',''0'',''0'',to_date(''14-07-2015 17:47:00'',''DD-MM-YYYY HH24:MI:SS''),''1'',''146'',null,null,''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''24'',''EMTU'',''0'',''0'',to_date(''18-09-2015 12:02:38'',''DD-MM-YYYY HH24:MI:SS''),''1'',''1'',null,''0'',''60'',''0'',null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''25'',''Pref de Ibatiba'',''0'',''0'',to_date(''07-10-2015 11:17:03'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',''1'',''60'',null,null,null)';
exception when others then null;
end;
/
declare
begin
execute immediate 'Insert into ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID,DESCORGAO,INDSUBSEGURO,INDDEFAULTSEGURO,FECMODIF,ACTIVO,USUARIO_ID,CNPJ,INDNOMDOCOBLIGATORIO,IDADE_IDOSO,INDICEPEAJE,IDADE_MINIMA,CATEGORIA_ID) values (''26'',''Pref de Jo<4A>o Neiva'',''0'',''0'',to_date(''07-10-2015 11:17:03'',''DD-MM-YYYY HH24:MI:SS''),''1'',''6466'',''04.898.488/0001-77'',''1'',''60'',null,null,null)';
exception when others then null;
end;

View File

@ -0,0 +1,16 @@
declare
object_exists exception;
except_00904 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00904 , -00904);
begin
execute immediate 'ALTER TABLE PTOVTA_COMISSAO
DROP (
INDBILHETESTROCADOS, INDBILHETESTRANSFERIDOS
)';
exception
when object_exists then null;
when except_00904 then null;
end;

View File

@ -0,0 +1,169 @@
create or replace FUNCTION "FN_ARREDONDAMENTO_TARIFA"(pTarifa IN NUMBER,
pOrgaoConcedenteId IN NUMBER,
pImporteSeguro IN NUMBER,
pImporteTaxaEmbarque IN NUMBER,
pImportePedagio IN NUMBER,
pImporteOutros IN NUMBER,
pTxEmbarque IN INTEGER)
RETURN NUMBER AS
lStrPrecoTotal VARCHAR(15);
lUltimoNumero NUMBER;
lStrPenlultimoNumero VARCHAR(2);
lStrParteInteira VARCHAR(10);
lPrecoTotallArredondado NUMBER;
lPrecoTotal NUMBER;
lDiferencaArredondamento NUMBER;
lCentavos NUMBER;
lDoisUltimos NUMBER;
lTresUltimos NUMBER;
lStrAntePenlultimoNumero NUMBER;
BEGIN
IF pTxEmbarque = 1
THEN
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImporteTaxaEmbarque, 0) +
coalesce(pImportePedagio, 0) + coalesce(pImporteOutros, 0);
ELSE
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImportePedagio, 0) +
coalesce(pImporteOutros, 0);
END IF;
--PARA A AGUIA BRANCA, O ÓRGÃO 10 APENAS CONSIDERA TARIFA (TALVEZ VAI EXISTIR A NECESSIDADE DE PARAMETRIZAR POR EMPRESA
IF pOrgaoConcedenteId = 10 THEN
lPrecoTotal :=coalesce(pTarifa, 0);
END IF;
lPrecoTotallArredondado := lPrecoTotal;
lStrPrecoTotal := to_char(lPrecoTotal, '99999.99');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrPenlultimoNumero := substr(lStrPrecoTotal, length(lStrPrecoTotal) - 1, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 3));
lCentavos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
-- SINFRA - MA - tarifas arredondadas a cada R$ 0,50 - com a seguinte regra, de 0,01 a 0,24 e de 0,51 a 0,74, arredonda para baixo, e de 0,25 a 0,49 e de 0,75 a 0,99, arredonda para cima.
IF pOrgaoConcedenteId = 17
THEN
IF lCentavos BETWEEN 1 AND 24
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99');
END IF;
IF (lCentavos BETWEEN 51 AND 74) OR (lCentavos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '50', '99999.99');
END IF;
IF lCentavos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
END IF;
END IF;
-- SETRANS - PI - tarifas arredondadas a cada R$ 0,10 - sendo de 0,01 a 0,04 arredonda para baixo, de 0,05 a 0,09, arredonda para cima.
IF pOrgaoConcedenteId = 18 OR pOrgaoConcedenteId = 10
THEN
IF lUltimoNumero BETWEEN 1 AND 4
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
IF lUltimoNumero BETWEEN 5 AND 9
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0', '99999.99') + 0.1;
END IF;
END IF;
--DER-MG -- DER-PB e DETRAN-CE: mesma regra para os dois, tarifas arredondadas a cada R$ 0,05, sendo de 0,01 a 0,024 e 0,051 a 0,074 arredonda para baixo e de 0,025 a 0,049 e de 0,075 a 0,099 arredonda para cima.
IF pOrgaoConcedenteId = 19 OR pOrgaoConcedenteId = 20 OR pOrgaoConcedenteId = 6
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.999');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -3, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 4));
lDoisUltimos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
IF lDoisUltimos BETWEEN 10 AND 24
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999');
END IF;
IF (lDoisUltimos BETWEEN 51 AND 74) OR (lDoisUltimos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '50', '99999.999');
END IF;
IF lDoisUltimos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999') + 0.1;
END IF;
END IF;
--ARTESP
IF pOrgaoConcedenteId = 21
THEN
--regra 1
IF lUltimoNumero BETWEEN 1 AND 2
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
--regras 2 e 3
IF (lUltimoNumero BETWEEN 3 AND 4) OR (lUltimoNumero BETWEEN 6 AND 7)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '5',
'99999.99');
END IF;
--regra 5
IF lCentavos BETWEEN 98 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
--regra 4
ELSIF lUltimoNumero BETWEEN 8 AND 9
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || (to_number(substr(lCentavos, -2, 1), '9') + 1),
'99999.99');
END IF;
END IF;
IF pOrgaoConcedenteId= 9 or pOrgaoConcedenteId = 22
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.9999');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -4, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 5));
lTresUltimos := to_number(substr(lStrPrecoTotal, -3, 3), '999');
IF lTresUltimos BETWEEN 001 and 254
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 255 AND 754
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '500', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 755 AND 999
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999') + 0.1;
END IF;
END IF;
lDiferencaArredondamento := lPrecoTotallArredondado - lPrecoTotal;
RETURN pTarifa + ldiferencaarredondamento;
END FN_ARREDONDAMENTO_TARIFA;

View File

@ -0,0 +1,169 @@
CREATE OR REPLACE FUNCTION "FN_ARREDONDAMENTO_TARIFA"(pTarifa IN NUMBER,
pOrgaoConcedenteId IN NUMBER,
pImporteSeguro IN NUMBER,
pImporteTaxaEmbarque IN NUMBER,
pImportePedagio IN NUMBER,
pImporteOutros IN NUMBER,
pTxEmbarque IN INTEGER)
RETURN NUMBER AS
lStrPrecoTotal VARCHAR(15);
lUltimoNumero NUMBER;
lStrPenlultimoNumero VARCHAR(2);
lStrParteInteira VARCHAR(10);
lPrecoTotallArredondado NUMBER;
lPrecoTotal NUMBER;
lDiferencaArredondamento NUMBER;
lCentavos NUMBER;
lDoisUltimos NUMBER;
lTresUltimos NUMBER;
lStrAntePenlultimoNumero NUMBER;
BEGIN
IF pTxEmbarque = 1
THEN
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImporteTaxaEmbarque, 0) +
coalesce(pImportePedagio, 0) + coalesce(pImporteOutros, 0);
ELSE
lPrecoTotal :=
coalesce(pTarifa, 0) + coalesce(pImporteSeguro, 0) + coalesce(pImportePedagio, 0) +
coalesce(pImporteOutros, 0);
END IF;
--PARA A AGUIA BRANCA, O ÓRGÃO 10 APENAS CONSIDERA TARIFA (TALVEZ VAI EXISTIR A NECESSIDADE DE PARAMETRIZAR POR EMPRESA
IF pOrgaoConcedenteId = 10 THEN
lPrecoTotal :=coalesce(pTarifa, 0);
END IF;
lPrecoTotallArredondado := lPrecoTotal;
lStrPrecoTotal := to_char(lPrecoTotal, '99999.99');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrPenlultimoNumero := substr(lStrPrecoTotal, length(lStrPrecoTotal) - 1, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 3));
lCentavos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
-- SINFRA - MA - tarifas arredondadas a cada R$ 0,50 - com a seguinte regra, de 0,01 a 0,24 e de 0,51 a 0,74, arredonda para baixo, e de 0,25 a 0,49 e de 0,75 a 0,99, arredonda para cima.
IF pOrgaoConcedenteId = 17
THEN
IF lCentavos BETWEEN 1 AND 24
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99');
END IF;
IF (lCentavos BETWEEN 51 AND 74) OR (lCentavos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '50', '99999.99');
END IF;
IF lCentavos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
END IF;
END IF;
-- SETRANS - PI - tarifas arredondadas a cada R$ 0,10 - sendo de 0,01 a 0,04 arredonda para baixo, de 0,05 a 0,09, arredonda para cima.
IF pOrgaoConcedenteId = 18 OR pOrgaoConcedenteId = 10
THEN
IF lUltimoNumero BETWEEN 1 AND 4
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
IF lUltimoNumero BETWEEN 6 AND 9
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0', '99999.99') + 0.1;
END IF;
END IF;
--DER-MG -- DER-PB e DETRAN-CE: mesma regra para os dois, tarifas arredondadas a cada R$ 0,05, sendo de 0,01 a 0,024 e 0,051 a 0,074 arredonda para baixo e de 0,025 a 0,049 e de 0,075 a 0,099 arredonda para cima.
IF pOrgaoConcedenteId = 19 OR pOrgaoConcedenteId = 20 OR pOrgaoConcedenteId = 6
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.999');
lUltimoNumero := to_number(substr(lStrPrecoTotal, -1), '9');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -3, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 4));
lDoisUltimos := to_number(substr(lStrPrecoTotal, -2, 2), '99');
IF lDoisUltimos BETWEEN 10 AND 24
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999');
END IF;
IF (lDoisUltimos BETWEEN 51 AND 74) OR (lDoisUltimos BETWEEN 25 AND 49)
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '50', '99999.999');
END IF;
IF lDoisUltimos BETWEEN 75 AND 99
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '00', '99999.999') + 0.1;
END IF;
END IF;
--ARTESP
IF pOrgaoConcedenteId = 21
THEN
--regra 1
IF lUltimoNumero BETWEEN 1 AND 2
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '0',
'99999.99');
END IF;
--regras 2 e 3
IF (lUltimoNumero BETWEEN 3 AND 4) OR (lUltimoNumero BETWEEN 6 AND 7)
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrPenlultimoNumero || '5',
'99999.99');
END IF;
--regra 5
IF lCentavos BETWEEN 98 AND 99
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || '00', '99999.99') + 1;
--regra 4
ELSIF lUltimoNumero BETWEEN 8 AND 9
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || (to_number(substr(lCentavos, -2, 1), '9') + 1),
'99999.99');
END IF;
END IF;
IF pOrgaoConcedenteId= 9 OR pOrgaoConcedenteId = 22
THEN
lStrPrecoTotal := to_char(lPrecoTotal, '99999.9999');
lStrAntePenlultimoNumero := substr(lStrPrecoTotal, -4, 1);
lStrParteInteira := trim(substr(lStrPrecoTotal, 0, length(lStrPrecoTotal) - 5));
lTresUltimos := to_number(substr(lStrPrecoTotal, -3, 3), '999');
IF lTresUltimos BETWEEN 001 AND 254
THEN
lPrecoTotallArredondado := to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 255 AND 754
THEN
lPrecoTotallArredondado := to_number(
lStrParteInteira || '.' || lStrAntePenlultimoNumero || '500', '99999.9999');
END IF;
IF lTresUltimos BETWEEN 755 AND 999
THEN
lPrecoTotallArredondado :=
to_number(lStrParteInteira || '.' || lStrAntePenlultimoNumero || '000', '99999.9999') + 0.1;
END IF;
END IF;
lDiferencaArredondamento := lPrecoTotallArredondado - lPrecoTotal;
RETURN pTarifa + ldiferencaarredondamento;
END FN_ARREDONDAMENTO_TARIFA;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE
TABLE PRICING_ESP_CANAL_VENTA (
PRICINGESPCANAL_ID NUMBER(15) NOT NULL,
TIPOPTOVTA_ID NUMBER(15) NOT NULL,
PRICINGESPECIFICO_ID NUMBER(15) NOT NULL ,
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
CONSTRAINT PRICINGESPCANALVENTA_PK PRIMARY KEY (PRICINGESPCANAL_ID) ENABLE)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE PRICING_ESP_CANAL_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER';
exception when object_exists then null;
end;

View File

@ -0,0 +1,32 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE MD_DOCUMENTO (
DOCUMENTO_ID NUMBER(12) NOT NULL,
FECCORTE DATE,
PUNTOVENTA_ID NUMBER(7),
EMPRESA_ID NUMBER(7),
CONTA_ID NUMBER(7),
SERIE VARCHAR2(30),
SUBSERIE VARCHAR2(30),
NUMEROINICIAL NUMBER(9),
NUMEROFINAL NUMBER(9),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (DOCUMENTO_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE MDDOCUMENTO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,17 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update USUARIO set TEMPODEVOLUCAOPASSAGEM = -1 where TEMPODEVOLUCAOPASSAGEM = 0 OR TEMPODEVOLUCAOPASSAGEM is null';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01451);
begin
execute immediate 'ALTER TABLE USUARIO MODIFY (TEMPODEVOLUCAOPASSAGEM DEFAULT -1 )';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE MD_CONTA MODIFY (REFERENCIA VARCHAR2(500))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE COM_EMP_CONFERENCIA ADD (INDTIPO_DEB_CRED NUMBER(1) DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,29 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE TIPO_EVENTO_EXTRA_PTOVTA(
TIPOEVENTOEXTRAPTOVTA_ID NUMBER(7) NOT NULL,
TIPOEVENTOEXTRA_ID NUMBER(7) NOT NULL,
PUNTOVENTA_ID NUMBER(7) NOT NULL,
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (TIPOEVENTOEXTRAPTOVTA_ID),
CONSTRAINT TIPO_EVENTO_EXTRA_FK FOREIGN KEY (TIPOEVENTOEXTRA_ID) REFERENCES TIPO_EVENTO_EXTRA (TIPOEVENTOEXTRA_ID),
CONSTRAINT TIPO_EVENTO_EXTRA_PTOVTA_FK FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE TIPOEVENTOEXTRAPTOVTA_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,48 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE DADOS_ESTORNO_CARTAO (
DADOSESTORNOCARTAO_ID NUMBER(7) NOT NULL,
NUMCARTAO VARCHAR2(48),
FECTRANSACAO DATE,
NSU VARCHAR2(45),
NUMAUTORIZACAO VARCHAR2(45),
IMPORTETOTAL NUMBER(11,2),
IMPORTEESTORNADO NUMBER(11,2),
NOMBTITULAR VARCHAR2(180),
DOCUMENTOCPF VARCHAR2(45),
TELEFONO VARCHAR2(14),
EMAIL VARCHAR2(50),
ORIGEN_ID NUMBER(7),
DESTINO_ID NUMBER(7),
FECVIAGEM DATE,
FECREGISTRO DATE,
NUMFOLIOSISTEMA VARCHAR2(36),
NUMOPERACION VARCHAR2(36),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (DADOSESTORNOCARTAO_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE DADOS_ESTORNO_CARTAO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE ORGAO_CANCELACION add INDSOLICITADATOSTARJETA NUMBER(1) DEFAULT 0 NOT NULL';
exception when column_exists then null;
end;

View File

@ -0,0 +1,16 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CAJA ADD (IMPORTETPP NUMBER(7,2))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE BOLETO ADD (IMPORTETPP NUMBER(7,2))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,15 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PUNTO_VENTA add INDBLOQUEACANCTROCAPASSNORMAL number(1)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE PUNTO_VENTA add INDBLOQUEACANCTROCAPTA number(1)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,6 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.nextval,''1'',''VDA > VENDA >> ENTREGA PASSAGEM >>> BLOQUEIO PTA'',''COM.RJCONSULTORES.VENTABOLETOS.ENTREGABOLETOS.BLOQUEIOPTA'',''1'',sysdate,''1'')';
exception when others then null;
end;

View File

@ -0,0 +1,9 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD(INDMULTATRANSFERENCIA NUMBER(1,0),
INDDEVOLUCAOTRANSFERENCIA NUMBER(1,0),
INDCOBRANCATRANSFERENCIA NUMBER(1,0))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,23 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE SEGURO_KM ADD TIPO_SEGURO varchar2(10)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA ADD IMPORTETPP number(7,2)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE TARIFA_OFICIAL ADD IMPORTETPP number(7,2)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate
'INSERT INTO TIPO_EVENTO_EXTRA_PTOVTA(TIPOEVENTOEXTRAPTOVTA_ID,TIPOEVENTOEXTRA_ID,PUNTOVENTA_ID,ACTIVO,FECMODIF,USUARIO_ID)
SELECT TIPOEVENTOEXTRAPTOVTA_SEQ.nextval, TIPOEVENTOEXTRA_ID, -1, 1, sysdate, 1 FROM TIPO_EVENTO_EXTRA';
exception when others then null;
end;

View File

@ -0,0 +1,15 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE REQUISICION_BOLETO ADD (USUARIOESTOQUE_ID NUMBER(7))';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE ABASTO_BOLETO ADD (USUARIOESTOQUE_ID NUMBER(7))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,31 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE PTOVTA_CONTA
(
PTOVTACONTA_ID NUMBER(7) NOT NULL,
EMPRESA_ID NUMBER(7),
PUNTOVENTA_ID NUMBER(7),
CONTA_ID NUMBER(7),
PERCENTUAL NUMBER(5,2),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY (PTOVTACONTA_ID),
CONSTRAINT FK_PTOVTA_COMISSAO_CONTA FOREIGN KEY (CONTA_ID) REFERENCES MD_CONTA (CONTA_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE PTOVTACONTA_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CORTE_TURNO ADD (IMPORTECOMISSAO NUMBER(12,2))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (CORPOLTRONA VARCHAR2(10))';
exception when object_exists then null;
end;

View File

@ -0,0 +1,5 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.nextval,''1'',''VDA > VENDA >> ENTREGA PASSAGEM >>> UTILIZAR PTA BLOQUEADO'',''COM.RJCONSULTORES.VENTABOLETOS.ENTREGABOLETOS.UTILIZARPTABLOQUEADO'',''1'',sysdate,''1'')';
exception when others then null;
end;

View File

@ -0,0 +1,5 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.nextval,''1'',''ADM > RELATORIOS >> ESTORNO DE CARTAO'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOESTORNOCARTAO'',''1'',sysdate,''1'')';
exception when others then null;
end;

View File

@ -0,0 +1,39 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO add TIPOCARTAO VARCHAR2(66)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO add CORRIDA_ID NUMBER(22)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO add FECCORRIDA DATE';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO add PUNTOVENTA_ID NUMBER(22)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO add MARCA_ID NUMBER(22)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,56 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE "FISCAL_IMPRESSORA_ESTADO"
(
"FISCALIMPESTADO_ID" NUMBER(15,0) NOT NULL ENABLE,
"FISCALIMPRESSORA_ID" NUMBER(7,0) NOT NULL ENABLE,
"ESTADO_ID" NUMBER(7,0) NOT NULL ENABLE,
"ACTIVO" NUMBER(1,0),
"FECMODIF" DATE,
"USUARIO_ID" NUMBER(7,0),
CONSTRAINT "FISCAL_IMPRESSORA_ESTADO_PK" PRIMARY KEY ("FISCALIMPESTADO_ID")
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE FISCAL_IMPRESSORA_ESTADO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (ESTADOLACRE_ID NUMBER(7) )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (EMPRESA_ID NUMBER(7) )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE FISCAL_IMPRESSORA ADD (INDBLOQUEAECF NUMBER(7) )';
exception when object_exists then null;
end;
/

View File

@ -0,0 +1,23 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'INSERT INTO PRICING_ESP_CANAL_VENTA pe
(
pe.PRICINGESPCANAL_ID,
pe.TIPOPTOVTA_ID,
pe.PRICINGESPECIFICO_ID,
pe.ACTIVO,
pe.FECMODIF,
pe.USUARIO_ID
)
SELECT PRICING_ESP_CANAL_SEQ.nextval ,
p.TIPOPTOVTA_ID,
p.PRICINGESPECIFICO_ID,
1,
sysdate,
1
FROM PRICING_ESPECIFICO p
WHERE ACTIVO=1';
exception when dup_val_on_index then null;
end;

View File

@ -0,0 +1,25 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE ESTADO ADD (DESCPROMOCIONAL1 VARCHAR2(46) )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE ESTADO ADD (DESCPROMOCIONAL2 VARCHAR2(46) )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE ESTADO ADD (DESCPROMOCIONAL3 VARCHAR2(46) )';
exception when object_exists then null;
end;
/

View File

@ -0,0 +1,7 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,
FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.NEXTVAL, 1,''ADM > PONTO DE VENDA >> COMISSAO >> CONTAS'',
''COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.EDITARPORCENTAGEMCONTA'',1,SYSDATE,-1)';
exception when others then null;
end;

View File

@ -0,0 +1,5 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.nextval, 1,''ADM > RELATORIOS >> RELATORIO FORMA PAGAMENTO AGENCIA'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOFORMAPAGAMENTOAGENCIACONTROLLER'',1,sysdate,1)';
exception when others then null;
end;

View File

@ -0,0 +1,5 @@
declare
begin
execute immediate 'Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) values (FUNCION_SISTEMA_SEQ.nextval, 1,''ADM > RELATORIOS >> RELATORIO FINANCEIRO GRUPO LINHAS'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOFINANCEIROGRUPOLINHAS'',1,sysdate,1)';
exception when others then null;
end;

Some files were not shown because too many files have changed in this diff Show More