fixed bug #7782 Copiar/mudar vigência - habilitada opção todas empresas; corrigido problema de duplicidade de tarifas.

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@58624 d1611594-4594-4d17-8e1d-87c2c4800839
master
frederico 2016-08-01 20:29:40 +00:00
parent 0c82f0766e
commit 33cdb9a6a8
2 changed files with 29 additions and 1 deletions

View File

@ -96,7 +96,7 @@ public class CambioVigenciaController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsVigenciaTarifa = vigenciaTarifaService.obtenerTodos(); lsVigenciaTarifa = vigenciaTarifaService.obtenerTodos();
lsEmpresa = empresaService.obtenerTodos(); lsEmpresa = empresaService.obtenerTodosIncluindoEmpresaTodas();
super.doAfterCompose(comp); super.doAfterCompose(comp);
} }

View File

@ -0,0 +1,28 @@
--drop constraint se existe
DECLARE
itemExists NUMBER;
BEGIN
itemExists := 0;
SELECT COUNT(CONSTRAINT_NAME) INTO itemExists
FROM ALL_CONSTRAINTS
WHERE UPPER(CONSTRAINT_NAME) = UPPER('TARIFA_UNICA');
IF itemExists > 0 THEN
EXECUTE IMMEDIATE 'ALTER TABLE TARIFA DROP CONSTRAINT TARIFA_UNICA';
END IF;
END;
-- drop index se existe
DECLARE
COUNT_INDEXES INTEGER;
BEGIN
SELECT COUNT(*) INTO COUNT_INDEXES
FROM USER_INDEXES
WHERE INDEX_NAME = '"VTABOL"."TARIFA_UNICA"';
IF COUNT_INDEXES > 0 THEN
EXECUTE IMMEDIATE 'DROP INDEX "VTABOL"."TARIFA_UNICA"';
END IF;
END;