diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 3373f9526..7a14674f8 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1022,22 +1022,22 @@ Public Class ClsClientes End Function - Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean - Dim Retorno As Boolean = False + 'Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean + ' Dim Retorno As Boolean = False - DataAdapter("PA_ClientesEstadosGet") + ' DataAdapter("PA_ClientesEstadosGet") - SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais + ' SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function @@ -1596,8 +1596,8 @@ Public Class ClsClientes Return Retorno End Function - Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, - Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, + Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer, + RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesNoFrecuenteAdd") @@ -1610,8 +1610,8 @@ Public Class ClsClientes .Add("@Colonia", SqlDbType.VarChar).Value = Colonia .Add("@Localidad", SqlDbType.VarChar).Value = Localidad .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad - .Add("@Estado", SqlDbType.VarChar).Value = Estado - .Add("@Pais", SqlDbType.VarChar).Value = Pais + .Add("@CveEstado", SqlDbType.Int).Value = CveEstado + ' .Add("@Pais", SqlDbType.VarChar).Value = Pais .Add("@RFC", SqlDbType.VarChar).Value = RFC .Add("@CP", SqlDbType.VarChar).Value = CP .Add("@Telefono", SqlDbType.VarChar).Value = Telefono diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index daee7399b..59d5678ba 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4468,11 +4468,11 @@ Public Class ClsVentas Return retorno End Function - Public Function GetOCRelacionadas(CveVentasDetalles As String) As Boolean + Public Function GetOCRelacionadas(CveVenta As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters - .Add("@CveVentasDetalles", SqlDbType.NVarChar).Value = CveVentasDetalles + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta End With Try SqlAdapter.Fill(Data) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ce6ccabce..9092932ce 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1227,7 +1227,6 @@ Partial Class Compras_Compras ClavesBorradas = New ArrayList() TxtFecha.Text = Now.ToShortDateString TxtFechaEjecucion.Text = Now.ToShortDateString - ViewState("CveCompra") = "0" ViewState("CveFactura") = "0" ViewState("IdPoliza") = "0" ViewState("CveCompra") = -1 @@ -10761,7 +10760,7 @@ Partial Class Compras_Compras e.Row.FCLinkButton("ImgD").Visible = False End If - If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then + If CveCompra <= 0 AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows.Count > 0 Then Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows(0) If DrPS IsNot Nothing Then @@ -10773,6 +10772,11 @@ Partial Class Compras_Compras End If End If + If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("NoDeducible") = "True" Then + e.Row.FCLabel("LblIVAPorcentaje").ToolTip = "IVA NO Deducible" + e.Row.FCLabel("LblIVAPorcentaje").ForeColor = Drawing.Color.Red + End If + 'CargaPresupuestosEgresos If UsuarioActual.Empresa.UsaAC Then e.Row.Cells(13).Visible = True diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index a6d91ab98..d9da7cfae 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -937,27 +937,12 @@ Partial Class Clientes Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX") DdlEstadoSAT.Items.Clear() - - Dim ObjCliente As New ClsClientes - - - - If ObjCliente.GetEstados(ClaveSATPais) Then - DdlEstadoSAT.DataSource = ObjCliente.DtResultados.Copy - End If - - - - - ObjCliente.Dispose() + DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais) DdlEstadoSAT.DataBind() - DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'DdlEstadoSAT.SelectedValue = "-1" - + DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) UpDatos.Update() - End Sub Private Sub CargaResponsables() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index cb0957bcf..f4435a3a5 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1297,6 +1297,14 @@ +