From 924743a327be7ed8593129859d2ecfbdfbefc7a6 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 9 Aug 2024 08:50:32 -0700 Subject: [PATCH] =?UTF-8?q?Creaditos=20update=20correcion=20orden=20de=20c?= =?UTF-8?q?ampos,=20ClsValidacion=20val=C3=B1ida=20nulos=20en=20objeto=20r?= =?UTF-8?q?espuesta,=20=20compras=20correcion=20ddl=20devolucion=20no=20es?= =?UTF-8?q?taba=20cargando=20la=20opcion=20seleccione,=20=20presupuestos?= =?UTF-8?q?=20no=20estaba=20guardado=20detalles=20de=20nomina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsValidaCFDi.vb | 26 ++++++++++++++++---------- Bancos/Creditos.aspx.vb | 2 +- Compras/Compras.aspx.vb | 3 ++- Contratos/Presupuestos.aspx.vb | 2 +- Transportes/RepContratoDetalle.aspx.vb | 2 +- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/App_Code/ClsValidaCFDi.vb b/App_Code/ClsValidaCFDi.vb index c2e19cc0c..35248b76d 100644 --- a/App_Code/ClsValidaCFDi.vb +++ b/App_Code/ClsValidaCFDi.vb @@ -97,18 +97,24 @@ Public Class ClsValidaCFDi oAcuse = wsConsultaCFDI.Consulta(String.Format("?re={0}&rr={1}&tt={2}&id={3}", LRFCEmisor, LRFCReceptor, Importe, LFolioFiscal.ToUpper)) 'oAcuse = wsConsultaCFDI.Consulta("?re=LESA6211234B2&rr=GCO890418M56&tt=0000001360.000000&id=0C8BAD9C-A8C6-4A48-8FF5-0687AC6F1581") 'Alert(oAcuse.Estado) - If oAcuse.Estado.ToLower = "vigente" Then - EsValida = 1 - End If - If oAcuse.Estado.ToLower = "cancelado" Then - EsValida = 2 - End If - If oAcuse.ValidacionEFOS = "100" Then - EnListaEFOS = True + If oAcuse IsNot Nothing AndAlso oAcuse.Estado IsNot Nothing AndAlso oAcuse.ValidacionEFOS IsNot Nothing Then + If oAcuse.Estado.ToLower = "vigente" Then + EsValida = 1 + End If + If oAcuse.Estado.ToLower = "cancelado" Then + EsValida = 2 + End If + + If oAcuse.ValidacionEFOS = "100" Then + EnListaEFOS = True + Else + EnListaEFOS = False + End If Else - EnListaEFOS = False + EsValida = 0 End If + Catch ex As Exception MsgError = "Op1. No se pudo validar la vigencia ante el SAT " GuardaLog(String.Format("Op1. {0}", ex.Message)) @@ -122,7 +128,7 @@ Public Class ClsValidaCFDi Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor.Replace("%26", "&"), LRFCReceptor.Replace("%26", "&"), Importe, True) - If Vigencia IsNot Nothing Then + If Vigencia IsNot Nothing AndAlso Vigencia.Estado IsNot Nothing AndAlso Vigencia.EsCancelable IsNot Nothing AndAlso Vigencia.EstatusCancelacion IsNot Nothing Then If Not Vigencia.Estado.ToUpper().Contains("NO ENCONTRADO") AndAlso Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then EsValida = 1 End If diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 7ae86544c..6d1bb5b0a 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -965,7 +965,7 @@ Partial Class Bancos_Creditos If CveCredito > 0 Then If ObjCredito.UpdateCreditos(CveCredito, DdlTipoCredito.SelectedValue.ToEntero, TxtReferencia.Text, TxtObservaciones.Text, -1, -1, -1, DdlTipoMoneda.SelectedValue.ToEntero, TxtFechaInicio.Text.ToString.ToDate, FechaVencimiento, TxtTasa.Text.Trim.ToDouble, TxtSobreTasa.Text.Trim.ToDouble, TxtIVA.Text.ToDouble / 100, TxtPlazo.Text.Trim.ToEntero, -1, TxtVehiculoValor.Text.ToString.ToDouble, TxtComisionValor.Text.ToString.ToDouble, TxtSeguroMensual.Text.ToString.ToDouble, TxtOtrosGastosValor.Text.ToString.ToDouble, - DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), + DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), CreditoAnticipo:=TxtVehiculoAnticipo.Text.ToDouble, ComisionAnticipo:=TxtComisionAnticipo.Text.ToDouble, SeguroAnticipo:=TxtSeguroAnticipo.Text.ToDouble, OtrosGastosAnticipo:=TxtOtrosGastosAnticipo.Text.ToDouble, FondoGarantia:=TxtFondoGarantia.Text.ToDouble, SeguroValor:=TxtSeguroValor.Text.ToDouble, TipoInteres:=ChkTipoInteres.Checked) Then If RegeneraTablaAmortizacion Then diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0553d1423..aef8546d1 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -13318,10 +13318,11 @@ Partial Class Compras_Compras dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-12).ToString("yyyy/MM/dd")}#") End If DDLDevolucion.DataSource = dtt - DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If objcompras.Dispose() DDLDevolucion.DataBind() + DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1")) UPDevolucion.Update() End Sub diff --git a/Contratos/Presupuestos.aspx.vb b/Contratos/Presupuestos.aspx.vb index 65d860f72..caa64a63f 100644 --- a/Contratos/Presupuestos.aspx.vb +++ b/Contratos/Presupuestos.aspx.vb @@ -412,7 +412,7 @@ Partial Class Contratos_Presupuestos CveConceptoContableNom = CveAgrupador End If - If CveClasificacion > 0 Then + If CveClasificacion > 0 Or CveConceptoContableNom > 0 Then If ImporteClasi > 0 Then TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuestoNuevo, CveClasificacion, CveTipoGasto, ImporteClasi, ObsDetalle, CveConceptoContableNom:=CveConceptoContableNom) If TieneError Then diff --git a/Transportes/RepContratoDetalle.aspx.vb b/Transportes/RepContratoDetalle.aspx.vb index eca2e6001..42019cf5f 100644 --- a/Transportes/RepContratoDetalle.aspx.vb +++ b/Transportes/RepContratoDetalle.aspx.vb @@ -266,7 +266,7 @@ Partial Class RepContratoDetalle Response.Clear() Response.ClearHeaders() Response.ClearContent() - Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & ".pdf") + Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & $"{File.Extension}") Response.AddHeader("Content-Length", File.Length.ToString()) 'Response.ContentType = "text/plain" Response.ContentType = "application/octet-stream"