From 580b33071a768b0c7d510c5a56ca97f47d733926 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 2 Nov 2021 17:31:01 -0700 Subject: [PATCH] quitar codigos en ddl SAT, filtrado por CP colonia choferes --- Acarreos/CatChoferes.aspx | 14 ++++---- Acarreos/CatChoferes.aspx.vb | 57 +++++++++++++++++++-------------- App_Code/ClsPaginas.vb | 4 +-- Bancos/Creditos.aspx.vb | 6 ++++ Planeacion/CatSubProyectos.aspx | 8 ++--- Ventas/Clientes.aspx | 8 ++--- 6 files changed, 57 insertions(+), 40 deletions(-) diff --git a/Acarreos/CatChoferes.aspx b/Acarreos/CatChoferes.aspx index 717eaf460..6ccdc6e7c 100644 --- a/Acarreos/CatChoferes.aspx +++ b/Acarreos/CatChoferes.aspx @@ -150,6 +150,7 @@
+
@@ -179,13 +180,14 @@
-
- - +
+ + + + + +
- -
-
diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb index e8f855dbd..3c0f31d6f 100644 --- a/Acarreos/CatChoferes.aspx.vb +++ b/Acarreos/CatChoferes.aspx.vb @@ -13,7 +13,7 @@ Partial Class Acarreos_CatChoferes If Not Page.IsPostBack Then CargaDatos() CargaDdlTransportista() - DdlColonias.setEsWebService(True) + Dim DT As DataTable = GlobalDTColonia(-1) CargaDdls() @@ -33,6 +33,7 @@ Partial Class Acarreos_CatChoferes DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1")) + DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1")) End Sub @@ -62,14 +63,6 @@ Partial Class Acarreos_CatChoferes Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click - Dim CveColonia As Integer = If(DdlColonias.txtValue.Value.ToEntero > 0, DdlColonias.txtValue.Value.ToEntero, -1) - - If CveColonia <= 0 Then - Alert("El campo colonia es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If TxtRFC.Text.Length > 0 And TxtNumRegidTribOperador.Text.Trim.Length > 0 Then Alert("Se debe de proporcionar RFC O Numero RegidTribOperador elimine uno", TipoMensaje.MsgAdvertencia) @@ -86,12 +79,12 @@ Partial Class Acarreos_CatChoferes If ChkEstatus.Checked Then Estatus = 1 If HdnModalidad.Value = "A" Then - If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then + If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then + If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -153,25 +146,26 @@ Partial Class Acarreos_CatChoferes DdlLocalidad.Items.Clear() + DdlColonia.Items.Clear() + If DdlEstado.SelectedValue.ToEntero > 0 And DdlMunicipio.SelectedValue.ToEntero > 0 Then DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) DdlLocalidad.DataBind() + DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado("MEX").FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero}")(0)("ClaveSATMunicipio").ToString).FiltraParametros(If(TxtCP.Text.Trim.Length > 0, $"CP = {TxtCP.Text}", "")) + DdlColonia.DataBind() + End If + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad")) - If GvRow.DataKey("CveColonia").ToEntero > 0 Then - DdlColonias.txtText.Value = GvRow.DataKey("ClaveSATColoniaCP") - DdlColonias.txtValue.Value = GvRow.DataKey("CveColonia") + DdlColonia.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlColonia.SelectedValueExist(GvRow.DataKey("CveColonia")) - Else - DdlColonias.txtText.Value = "Selecione Una" - DdlColonias.txtValue.Value = "-1" - End If UpAddChofer.Update() @@ -202,15 +196,16 @@ Partial Class Acarreos_CatChoferes 'TxtColonia.Text = "" TxtNumRegidTribOperador.Text = "" - DdlResidenciaFiscalOperador.SelectedValueExist("-1") - - DdlColonias.txtText.Value = "Selecione Una" - DdlColonias.txtValue.Value = "-1" + DdlResidenciaFiscalOperador.SelectedValueExist("-1") + + DdlEstado.SelectedValueExist(-1) DdlEstado_SelectedIndexChanged(Nothing, Nothing) + DdlColonia.SelectedValueExist(-1) + ChkEstatus.Checked = True divEstatus.Visible = False UpAddChofer.Update() @@ -280,18 +275,29 @@ Partial Class Acarreos_CatChoferes Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) DdlLocalidad.Items.Clear() + DdlColonia.Items.Clear() If DdlMunicipio.SelectedValue > 0 Then DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) DdlLocalidad.DataBind() + DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado("MEX").FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero}")(0)("ClaveSATMunicipio").ToString).FiltraParametros(If(TxtCP.Text.Trim.Length > 0, $"CP = {TxtCP.Text}", "")) + DdlColonia.DataBind() + + + + End If DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlLocalidad.SelectedValueExist(-1) + DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1")) + DdlColonia.SelectedValueExist(-1) + + UpAddChofer.Update() End Sub @@ -300,7 +306,7 @@ Partial Class Acarreos_CatChoferes Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs) - If DdlColonias.txtValue.Value.ToEntero > 0 Then + If DdlColonia.SelectedValue.ToEntero > 0 Then validaCodigoPostal() End If @@ -311,7 +317,7 @@ Partial Class Acarreos_CatChoferes Dim CPTxt As Integer = TxtCP.Text.ToEntero() - Dim CveColonia As Integer = DdlColonias.txtValue.Value.ToEntero + Dim CveColonia As Integer = DdlColonia.SelectedValue.ToEntero If CPTxt > 0 And CveColonia > 0 Then Dim CP As Integer = GlobalDTColonia(-1).FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}") @@ -322,4 +328,7 @@ Partial Class Acarreos_CatChoferes End Sub + Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs) + validaCodigoPostal() + End Sub End Class diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 95e7c7ae0..389ad3700 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7284,8 +7284,8 @@ Public Class ClsPaginas RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo) Case "Tra" NombreArchivo = "Traspaso" - NombreArchivoDescarga = "Traspaso" - TipoDocumento = "Traspaso" + NombreArchivoDescarga = "Traslado" + TipoDocumento = "Traslado" Dim ObjInv As New ClsInventarios Dim AlmOrigen As String = "" diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index b82881c22..6690811f6 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -1130,15 +1130,21 @@ Partial Class Bancos_Creditos Else Row("Intereses") = IPmt(Tasa, i.ToString.ToDouble, TxtPlazo.Text.ToDouble, TxtTotalCredito.Text.ToDouble) * -1 Row("Capital") = PPmt(Tasa, i, TxtPlazo.Text.ToDouble, TxtTotalCredito.Text.ToDouble) * -1 'TxtMensualidad.Text.ToDouble - Row("Intereses").ToString.ToDouble + 'Row("Capital") = TxtMensualidad.Text.ToDouble - Row("Intereses").ToString.ToDouble ' Row("IVA") = 0.0 End If Row("SaldoInsoluto") = If(i > 1, DTAmortizacion(i - 2)("SaldoInsoluto").ToString.ToDouble, TxtTotalCredito.Text.ToDouble) - If(i > 1, DTAmortizacion(i - 2)("Capital").ToString.ToDouble, 0) + Row("IVACapital") = Row("Capital").ToString.ToDouble * TxtIVA.Text.ToDouble / 100 Row("IVAIntereses") = Row("Intereses").ToString.ToDouble * TxtIVA.Text.ToDouble / 100 Row("IVASeguro") = Row("Seguro").ToString.ToDouble * TxtIVA.Text.ToDouble / 100 + Row("ImportePago") = 0 + + Row("Mensualidad") = Row("Capital").ToString.ToDecimal + Row("Intereses").ToString.ToDecimal + Row("Seguro").ToString.ToDecimal + Row("IVACapital").ToString.ToDecimal + Row("IVAIntereses").ToString.ToDecimal + Row("IVASeguro").ToString.ToDecimal + DTAmortizacion.Rows.Add(Row) Next diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index a0f58e6cf..dece0daea 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -298,7 +298,7 @@
- + @@ -308,7 +308,7 @@
- + @@ -323,7 +323,7 @@
- + @@ -345,7 +345,7 @@
- + diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index ff7da4542..20a55e5fc 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -5087,7 +5087,7 @@
- + @@ -5097,7 +5097,7 @@
- + @@ -5112,7 +5112,7 @@
- + @@ -5136,7 +5136,7 @@
- +