This commit is contained in:
darwin_quiroz 2026-03-11 15:33:12 -05:00
parent ddaafc8760
commit 8656624158
4 changed files with 38 additions and 44 deletions

View File

@ -7,7 +7,7 @@ if OBJECT_ID('tempdb.dbo.#convenios_revisar') is not null
select id
into #convenios_revisar
from db_olympo_web.dbo.convenios_cabecera where code in('003367');
from db_olympo_web.dbo.convenios_cabecera where code in('002486');
declare
@cuotas_pagadas int,
@ -116,20 +116,19 @@ order by x.recaudacion_id_mg;
goto salir
/*verificar si hay pagos no procesados*/
select * from db_olympo_web.dbo.agcm_2023_recaudacion_cuotas where lote_id = 28929 and recaudacion_id_mg = -2
select * from db_olympo_web.dbo.agcm_2023_recaudacion_cuotas_detalle where lote_id = 28929 and recaudacion_id_mg = -2
select * from db_olympo_web.dbo.agcm_2023_recaudacion_cuotas where lote_id = 31635 and recaudacion_id_mg = 0
select * from db_olympo_web.dbo.agcm_2023_recaudacion_cuotas_detalle where lote_id = 40554 and recaudacion_id_mg = 0
select * from agcm_2023_recaudacion_id_convenio where lote_id = 50177
--delete db_olympo_web.dbo.agcm_2023_recaudacion_cuotas where lote_id = 28929 and recaudacion_id_mg = 0
--delete db_olympo_web.dbo.agcm_2023_recaudacion_cuotas_detalle where lote_id = 28929 and recaudacion_id_mg = 0
--delete db_olympo_web.dbo.agcm_2023_recaudacion_cuotas where lote_id = 31635 and recaudacion_id_mg = 0
--delete db_olympo_web.dbo.agcm_2023_recaudacion_cuotas_detalle where lote_id = 40554 and recaudacion_id_mg = 0
/*Ver recaudaciones de usuario portal ciudadano, con el que se procesan las recaudaciones de convenios*/
select * from recaudacion_registro_pago where lote_id = 79914
select * from recaudacion_registro_pago where lote_id = 83442
and usuario_id = 430
select top 10 * from usuario_permisos_xavier --where id = 430
--order by recaudacion_id desc
SALIR:

View File

@ -5,19 +5,10 @@ if OBJECT_ID('tempdb.dbo.#reintegrar') is not null
/*OBTENEMOS LOS RECAUDACION IDS A REINTEGRAR DE ACUERDO AL ANÁLISIS DEL SCRIPT 001 VERIFICAR CONVENIO*/
--exec [dbo].[telus_recaudacion_registro_pago_reintegro] 18, 802284, 'Se reintegra por intemitencia de datos con el Portal.';
--exec [dbo].[telus_recaudacion_registro_pago_reintegro] 18, 860734, 'Se reintegra por reverso de pago en Payphone.';
select * into #reintegrar from recaudacion_registro_pago where usuario_id = 430
and recaudacion_id in (
674705,
674706,
674707,
674708,
674709,
674710,
674711,
674712,
674713,
674714
719512
)
order by recaudacion_id desc

View File

@ -4,31 +4,31 @@ USE [db_olympo_web]
--@id_liquidacion int, @codigo_liquidacion varchar(200), @id_convenio int, @lote_id int, @valor numeric(18,2), @observacion text, @estado varchar(100), @ip text, @host text, @desde int, @hasta int
--use telus;
--exec telus.dbo.agcm_2022_tram_liquidaciones_convenio_ingreso 689065, "IP-1711771269", 3527, 99219, 106.11, "Facilidad de Pago, Impuesto Predial, CEM y otras tasas, clave catastral 1-16-24-11-031 año(s) 2023", "ACTIVO", "35.191.29.96", "portalciudadano.manta.gob.ec", 2023, 2023
--exec telus.dbo.agcm_2022_tram_liquidaciones_convenio_ingreso 533549, "IP-1304902859", 1844, 67945, 3.57, "Facilidad de Pago, Impuesto Predial, CEM y otras tasas, clave catastral 3-27-04-24-000 2022_2023", "ACTIVO", "172.70.82.68", "portalciudadano.manta.gob.ec", 2022, 2023
BEGIN
declare @par_id_convenio int = 0,
@fecha_convenio date;
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- ANTES DE PROCESA EJECUTAR EL PROCEDIMIENTO EXEC telus.dbo.agcm_2023_tram_actualiza_valores_claves_convenio
-- ANTES DE PROCESA EJECUTAR EL PROCEDIMIENTO exec telus.dbo.agcm_2023_tram_actualiza_valores_claves_convenio
-- VERIFICAR CONVENIO ESTADO
SET @par_id_convenio = (select id from db_olympo_web.dbo.convenios_cabecera where code in('003367'));
SET @par_id_convenio = (select id from db_olympo_web.dbo.convenios_cabecera where code in('002486'));
SET @fecha_convenio = (select x.create_date from db_olympo_web.dbo.convenios_cabecera x where id = @par_id_convenio);
--SET @fecha_convenio = '2023-03-18';
--SELECT * FROM liquidaciones_main x where x.id = 1045065
--SELECT * FROM liquidaciones_main x where x.id = 726643
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where id IN (14222);
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set lote_id = 21395 where id IN (17547);
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set estado = 'ACTIVO' where id_convenio in(@par_id_convenio)
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where id_convenio in(@par_id_convenio)
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where id_convenio in(@par_id_convenio) and codigo_liquidacion = 'pagar'
--update telus.dbo.agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where id_convenio in(@par_id_convenio)
--select * from telus.dbo.agcm_2022_tram_liquidaciones_convenio where id_convenio in(@par_id_convenio) --and estado = 'ACTIVO'
--GOTO SALIR
@ -91,12 +91,12 @@ BEGIN
UPDATE #con SET fila = @contador, @contador = @contador + 1;
--delete from #con where fila <> 1
--update #con set value_paid = 12.83 where fila = 1
select * from #con
GOTO SALIR
--exec telus.dbo.akla_2024_telus_recaudacion_registro_pago_convenios 430, 4, 183.53, 183.53, 0, 79914, -2, null, null, null, 'Recaudación de pago Olympo Web voucher #12737876.', 12737876, '2023-12-14', 1, '2023-12-14'
--exec telus.dbo.akla_2024_telus_recaudacion_registro_pago_convenios 430, 4, 61.67, 61.67, 0, 38119, -2, null, null, null, 'Recaudación de pago Olympo Web voucher #21967334.', 21967334, '2026-03-04', 1, '2026-03-04'
--PROCESO PARA ACTUALIZAR VALORES DE CLAVES CATASTRALES (SOLVENCIA)
/*
@ -105,7 +105,6 @@ BEGIN
*/
/*
SELECT ROW_NUMBER() over(order by a.id) as fila, a.* into #con FROM convenios_pagos_cabecera a
WHERE a.id IN (
@ -155,7 +154,7 @@ BEGIN
,@NumeroTransaccion varchar(max)=''
,@id_tranliqui int =0
select @fecha = a.date, @id=a.id from #con a where a.fila=@fila
select @valorpagado = a.value_paid, @idliqui = a.collection_id from convenios_pagos_detalle a where a.id = @id and a.tax_id=3
select @valorpagado = a.to_paid, @idliqui = a.collection_id from convenios_pagos_detalle a where a.id = @id and a.tax_id=3
print '@valorpagado'
print @valorpagado
print '@idliqui'
@ -168,6 +167,9 @@ BEGIN
a.id_liquidacion=@idliqui and (a.estado='ACTIVO' ) --or a.estado='PROCESARPAGO'
-- Actualizar valor de deuda seg<65>n la clave que tenga prioridad
/*
--3493 2364
select @convenio_id;
select @idliqui;
select * from @tbredis
Rollback;
goto SALIR

View File

@ -2,22 +2,24 @@ use telus;
/*verificar convenios antes del 2024*/
--exec agcm_telus_avaluo_emision_consulta 30398, '2025-01-08'
--exec telus_avaluo_emision_consulta 79914
--exec agcm_telus_avaluo_emision_consulta 31635, '2024-02-26'
--exec telus_avaluo_emision_consulta 38119
--select * from agcm_2022_tram_liquidaciones_convenio where lote_id = 12800
--update agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where lote_id = 92434
--select * from avaluo_emision_anual_cabecera where lote_id = 12800 and esta_convenio = 1
--update avaluo_emision_anual_cabecera set esta_convenio = 0 where emision_id IN (1324866)
--select * from rentas_estado WHERE registro_lote_id = 18103
--select * from agcm_2022_tram_liquidaciones_convenio where lote_id = 38119
--update agcm_2022_tram_liquidaciones_convenio set estado = 'INACTIVO' where lote_id = 38119
--select * from avaluo_emision_anual_cabecera where lote_id = 38119 and esta_convenio = 1
--update avaluo_emision_anual_cabecera set esta_convenio = 0 where emision_id IN (2228877)
--update rentas_estado set estado = 0 WHERE registro_id = 4201;
--update rentas_estado set estado_registro = 'ACTIVO' WHERE registro_id = 20335;
--select * from rentas_estado WHERE registro_lote_id = 38119
--(lote_id 88993, 24048, 97587, 6800, 92664 estaba en estado 4)
--update rentas_estado set estado = 0 WHERE registro_id = 24702;
--update rentas_estado set estado_registro = 'ACTIVO' WHERE registro_id = 4231;
/*
insert into rentas_estado(registro_lote_id,tipo_renta,estado,usuario_id,ip,pcname,detalle,estado_registro,fecha)
values(58167,0,1,18,'127.0.0.1','localhost','Convenio de pago Portal Ciudadano','ACTIVO', GETDATE())
values(88079,0,0,18,'127.0.0.1','localhost','Convenio de pago Portal Ciudadano','ACTIVO', GETDATE())
update rentas_estado set estado_registro = 'ACTIVO' where registro_id = 19246;
*/
@ -28,7 +30,7 @@ if OBJECT_ID('tempdb.dbo.#convenios_revisar') is not null
select id
into #convenios_revisar
from db_olympo_web.dbo.convenios_cabecera where code in('003367');
from db_olympo_web.dbo.convenios_cabecera where code in('002486');
select b.ClaveCatastral, a.* from agcm_2022_tram_liquidaciones_convenio a
inner join telus_procesos.dbo.agcm_datos_claves_avaluos b on a.lote_id = b.lote_id
@ -48,7 +50,7 @@ select b.* from avaluo_emision_anual_cabecera b
order by b.lote_id
--update avaluo_emision_anual_cabecera set esta_convenio = 0 where emision_id in(1907614, 1990812)and esta_convenio = 1
--update avaluo_emision_anual_cabecera set esta_convenio = 0 where emision_id in(1982372)and esta_convenio = 1