diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index a7804beb0..54fe23b28 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1299,6 +1299,25 @@ Public Class ClsClientes Return Retorno End Function + Public Function GetVentasRemisionesPagos(CveCliente As Integer, Ventas As String) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasRemisionesPagos") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@Ventas", SqlDbType.VarChar).Value = Ventas + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los pagos de las remisiones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + ''' ''' Obtiene las ventas que tienen Serie-Folio que no existen en la base de datos pero si en el xml y que esten en la base de datos pero no en el XML ''' diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 1745f277d..328071a34 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1254,7 +1254,7 @@ Partial Class PopUpVerFactura Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero)) Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero)) - Dim Consola As String = If(UrlParametros("CVEMOVIMIENTO") IsNot Nothing, UrlParametros("CVEMOVIMIENTO").ToString.Trim, "") + Dim Consola As String = If(UrlParametros("CONSOLA") IsNot Nothing, UrlParametros("CONSOLA").ToString.Trim, "") CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion, FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio, Consola:=Consola) diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 719c8b22f..3130410a4 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -583,7 +583,7 @@ - + diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx index 9c0e62c84..8cdfba283 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx +++ b/Inventarios/PaquetesArmadoDesarmado.aspx @@ -3,6 +3,16 @@ + + + Paquetes | Armado - Desarmado @@ -186,7 +196,9 @@
- + @@ -210,7 +222,8 @@ -
+ +<%--
@@ -220,12 +233,38 @@ -
+
--%> + +
+ + + + + + + + + + +
+ + +
- + + + + + +
+ + +
@@ -468,7 +507,22 @@
-
+ +
+ + + + + + + + + + +
+ + <%--
@@ -478,9 +532,17 @@ -
+
--%> +
+ + + + + + @@ -630,6 +692,40 @@ snd.currentTime = 0; } + + function Dividir(t) { + $get("HdnCantidadMovimiento").value = $get(t).value; + } + + function LimitaCantidad(C, textbox, button) { + + // var contenedor = $(textbox).parent().find("#" + buttonIdDiv); + + if (ToDouble(textbox.value) >= C) { + textbox.value = ""; + } + + if (parseFloat(textbox.value) > 0) { + $get(button).style.display = ""; + //$(contenedor).show(); + } + else { + $get(button).style.display = "none"; + //$(contenedor).hide(); + + } + } + + + function evitarPostBack(event) { + if (event.keyCode === 13) { + event.preventDefault(); + return false; + } + } + + + diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb index 1658292ec..3c43cfe9d 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb +++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb @@ -124,6 +124,38 @@ Partial Class Inventarios_PaquetesArmadoDesarmado ViewState("DtExistenciasDesarmado") = value End Set End Property + + + Private Property DtDatosArmado As DataTable + Get + If ViewState("DtDatosArmado") Is Nothing Then + ViewState("DtDatosArmado") = New DataTable + End If + + Return CType(ViewState("DtDatosArmado"), DataTable) + + End Get + Set(value As DataTable) + ViewState("DtDatosArmado") = value + End Set + End Property + + + Private Property DtDatosDesArmado As DataTable + Get + If ViewState("DtDatosDesArmado") Is Nothing Then + ViewState("DtDatosDesArmado") = New DataTable + End If + + Return CType(ViewState("DtDatosDesArmado"), DataTable) + + End Get + Set(value As DataTable) + ViewState("DtDatosDesArmado") = value + End Set + End Property + + #End Region @@ -217,20 +249,20 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Limpia(TipoMovimiento) Dim ObjProductosServicios As New ClsProductosServicios - Dim DtDatos As New DataTable + DtDatosArmado = New DataTable Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("") Dim CveUMTemp As Integer = drP("CveUM").ToString.ToEntero If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteArmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadArmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then - DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy + DtDatosArmado = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy Else - DtDatos = Nothing + DtDatosArmado = Nothing Alert("Ocurrió un error al obtener los componentes del paquete. Por favor vuelva a intentar.", TipoMensaje.MsgError) End If ObjProductosServicios.Dispose() - If DtDatos Is Nothing Then + If DtDatosArmado Is Nothing Then Exit Sub End If @@ -238,15 +270,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado CveCliente = If(RowClienteArmado.Visible, DdlClienteArmado.SelectedValue.ToEntero, -1) - If DtDatos.Rows.Count > 0 Then - For Each Dr As DataRow In DtDatos.Rows + If DtDatosArmado.Rows.Count > 0 Then + For Each Dr As DataRow In DtDatosArmado.Rows Dr("Cantidad") = Dr("Cantidad").ToString.ToDecimal * TxtCantidadArmado.Text.ToDecimal Next End If Dim TextoExistencias As String = "No hay existencia suficiente de los siguientes componentes:

" Dim ErrorExistencias As Boolean = False - For Each Dr As DataRow In DtDatos.Rows + For Each Dr As DataRow In DtDatosArmado.Rows If Dr("CantidadDisponible2").ToString.ToDecimal < Dr("Cantidad").ToString.ToDecimal Then TextoExistencias += $"
- Componente: ""{Dr("CodigoPS")}""." ErrorExistencias = True @@ -280,13 +312,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero CveAlmacenArmado = DdlAlmacenArmado.SelectedValue.ToEntero - GvDatosArmado.DataSource = DtDatos + GvDatosArmado.DataSource = DtDatosArmado GvDatosArmado.DataBind() - GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True" - GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True" - GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True" - GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True" + GvDatosArmado.Columns(4).Visible = DtDatosArmado.MAX("AplicaSerie", "") = "True" + GvDatosArmado.Columns(5).Visible = DtDatosArmado.MAX("AplicaSeccion") = "True" + GvDatosArmado.Columns(6).Visible = DtDatosArmado.MAX("AplicaLote") = "True" + GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True" 'If ErrorExistencias Then ' GvDatosArmado.Columns(4).Visible = False @@ -338,23 +370,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dim ObjProductosServicios As New ClsProductosServicios - Dim DtDatos As New DataTable + DtDatosDesArmado = New DataTable If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteDesarmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then - DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy + DtDatosDesArmado = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy Else - DtDatos = Nothing + DtDatosDesArmado = Nothing Alert("Ocurrió un error al obtener los componentes del paquete. Por favor vuelva a intentar.", TipoMensaje.MsgError) End If ObjProductosServicios.Dispose() - If DtDatos Is Nothing Then + If DtDatosDesArmado Is Nothing Then Exit Sub End If - If DtDatos.Rows.Count > 0 Then - For Each Dr As DataRow In DtDatos.Rows + If DtDatosDesArmado.Rows.Count > 0 Then + For Each Dr As DataRow In DtDatosDesArmado.Rows Dr("Cantidad") = Dr("Cantidad").ToString.ToDecimal * TxtCantidadDesarmado.Text.ToDecimal Next End If @@ -372,13 +404,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado CvePaqueteDesarmado = DdlPaqueteDesarmado.SelectedValue.ToEntero CveAlmacenDesarmado = DdlAlmacenDesarmado.SelectedValue.ToEntero - GvDatosDesarmado.DataSource = DtDatos + GvDatosDesarmado.DataSource = DtDatosDesArmado GvDatosDesarmado.DataBind() - GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True" - GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True" - GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True" - GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True" + GvDatosArmado.Columns(4).Visible = DtDatosDesArmado.MAX("AplicaSerie", "") = "True" + GvDatosArmado.Columns(5).Visible = DtDatosDesArmado.MAX("AplicaSeccion") = "True" + GvDatosArmado.Columns(6).Visible = DtDatosDesArmado.MAX("AplicaLote") = "True" + GvDatosArmado.Columns(7).Visible = DtDatosDesArmado.MAX("AplicaCaducidad") = "True" BtnGuadarDesarmado.Visible = True @@ -458,6 +490,91 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End If + Dim TextoError As New StringBuilder + If Tipo = 1 Then + Dim ObjInventarioVal As New ClsInventarios + Dim StrXML As New StringBuilder + StrXML.Append("") + Dim FechaCaducidad As Date + Dim Lote As String = "" + + Dim TieneErrorExistencia As Boolean = False + + For Each GvRow As GridViewRow In GvDatosArmado.Rows + + FechaCaducidad = If(CBool(GvRow.DataKey("AplicaCaducidad")) AndAlso GvRow.FCTextBox("TxtCaducidad").ToString().ToDate > MinFecha, GvRow.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha) + Lote = If(CBool(GvRow.DataKey("AplicaLote")), GvRow.FCTextBox("TxtLote").Text.Trim, "-1") + + Dim Existencia As Decimal = ObjInventarioVal.GetExistenciasPS(GvRow.DataKey("CvePS").ToEntero, GvRow.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenArmado.SelectedValue.ToEntero(), FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:="-1", Lote:=Lote, FechaCaducidad:=FechaCaducidad) + + + If GvRow.DataKey("Cantidad").ToDecimal > Existencia Then + TieneErrorExistencia = True + + TextoError.AppendFormat(" - {0} Existencia: {1:#,##0.##}
", GvRow.DataKey("CodigoPS"), Existencia) + + End If + + ''If Dr("CantidadGV").ToString().ToDecimal > 0 Then + 'If CBool(GvRow.DataKey("AplicaSerie")) Then + ' Alert("Aplica serie ") + ' TieneErrorExistencia = True + ' ' StrXML.AppendFormat("", GvRow.DataKey("CvePS"), GvRow.DataKey("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd")) + + 'Else + ' StrXML.AppendFormat("", GvRow.DataKey("CvePS"), GvRow.DataKey("CveUM"), GvRow.DataKey("Cantidad"), -1, "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd")) + 'End If + + 'End If + Next + + 'For Each Dr As DataRow In DtDatos.Rows + ' FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha) + ' Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1") + + ' If Dr("CantidadGV").ToString().ToDecimal > 0 Then + ' If CBool(Dr("AplicaSerie")) Then + ' DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) + ' For Each Dr1 As DataRow In DtDetalle.Rows + ' StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd")) + ' Next + ' Else + ' StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd")) + ' End If + ' End If + 'Next + + 'StrXML.Append("
") + + + 'If ObjInventarioVal.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacenArmado.SelectedValue.ToEntero(), TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), -1, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(Tipo = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + ' If ObjInventarioVal.DtResultados.Rows.Count > 0 Then + ' TieneErrorExistencia = True + ' For Each Dr As DataRow In ObjInventarioVal.DtResultados.Rows + ' TextoError.AppendFormat(" - {0} Existencia: {1:#,##0.##}
", Dr("CodigoPS"), Dr("Existencia")) + ' Next + ' End If + 'Else + ' TieneErrorExistencia = True + 'End If + + If TieneErrorExistencia Then + 'ObjInventarioVal.RollBack() + ObjInventarioVal.Dispose() + + If TextoError.Length > 0 Then + Alert($" Lo(s) siguiente(s) Productos no tienen existencia suficiente:

{TextoError}", TipoMensaje.MsgAdvertencia) + End If + RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") + Exit Sub + End If + + End If + + + Exit Sub + + Dim ObjInventario As New ClsInventarios Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) @@ -832,20 +949,25 @@ Partial Class Inventarios_PaquetesArmadoDesarmado CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenArmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa) End If + + Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl) + If e.Row.DataKey("AplicaCaducidad") = "True" Then - e.Row.FCTextBox("TxtCaducidad").Visible = True - e.Row.FCLinkButton("LnkCaducidad").Visible = True + 'e.Row.FCTextBox("TxtCaducidad").Visible = True + 'e.Row.FCLinkButton("LnkCaducidad").Visible = True - e.Row.FCTextBox("TxtCaducidad").ReadOnly = False - CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True - e.Row.FCTextBox("TxtCaducidad").Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").ReadOnly = False + ''CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").Enabled = True + DvFechaCaducidad.Visible = True Else - e.Row.FCTextBox("TxtCaducidad").Visible = False - e.Row.FCLinkButton("LnkCaducidad").Visible = False - e.Row.FCTextBox("TxtCaducidad").Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").Visible = False + 'e.Row.FCLinkButton("LnkCaducidad").Visible = False + 'e.Row.FCTextBox("TxtCaducidad").Enabled = True - e.Row.FCTextBox("TxtCaducidad").ReadOnly = True - CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + 'e.Row.FCTextBox("TxtCaducidad").ReadOnly = True + ''CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + DvFechaCaducidad.Visible = False End If e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True" @@ -855,8 +977,120 @@ Partial Class Inventarios_PaquetesArmadoDesarmado ' e.Row.FCTextBox("TbCantidadF").Enabled = False 'End If + e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID)) + e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString() + e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID)) + End If End Sub + + + Protected Sub Dividir(sender As Object, e As EventArgs) + Dim index2 As Integer = 0 + + If Not DtDatosArmado.Columns.Contains("Lote") Then + DtDatosArmado.Columns.Add("Lote", GetType(String)) + End If + + If Not DtDatosArmado.Columns.Contains("CveSeccion") Then + DtDatosArmado.Columns.Add("CveSeccion", GetType(Integer)) + End If + + If Not DtDatosArmado.Columns.Contains("FechaCaducidad") Then + DtDatosArmado.Columns.Add("FechaCaducidad", GetType(String)) + End If + + DtDatosArmado.AcceptChanges() + + For Each Row As DataRow In DtDatosArmado.Rows + + + Row("Lote") = GvDatosArmado.Rows(index2).FCTextBox("TxtLote").Text + 'End If + 'If GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue <> "-1" Then + Row("CveSeccion") = GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero() + ' End If + 'If GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text <> "" Then + Row("FechaCaducidad") = GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text + 'End If + index2 += 1 + Next + + DtDatosArmado.AcceptChanges() + + Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, Button)).NamingContainer, GridViewRow) + Dim Index As Integer = gvRow.RowIndex + Dim Cantidad As String = HdnCantidadMovimiento.Value + Dim drOriginal As DataRow = DtDatosArmado.Rows(Index) + Dim drNew As DataRow = DtDatosArmado.NewRow + + drNew.ItemArray = drOriginal.ItemArray + + drOriginal("Cantidad") = (drOriginal("Cantidad").ToString().ToDouble - Cantidad.ToDouble) + + 'Dim CantidadFOriginal As Double = drOriginal("CantidadF").ToString().ToDouble + 'drOriginal("CantidadF") = (drOriginal("CantidadF").ToString().ToDouble - Cantidad.ToDouble) + + 'Dim CantidadSOriginal As Double = drOriginal("CantidadS").ToString().ToDouble + 'drOriginal("CantidadS") = (CantidadSOriginal * drOriginal("CantidadF").ToString().ToDouble) / CantidadFOriginal + + 'Dim CantidadSeleccionadaOriginal As Double = drOriginal("CantidadSeleccionada").ToString().ToDouble + 'drOriginal("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > drOriginal("CantidadF").ToString().ToDouble, drOriginal("CantidadF").ToString().ToDouble, CantidadSeleccionadaOriginal) + + 'CantidadSeleccionadaOriginal = CantidadSeleccionadaOriginal - drOriginal("CantidadF").ToString().ToDouble + + 'Dim CostoIndirectoOriginal As Double = dr1("CostoIndirecto").ToString().ToDouble + 'dr1("CostoIndirecto") = (CostoIndirectoOriginal * dr1("CantidadF").ToString().ToDouble) / CantidadFOriginal + 'Dim CostoIndirectoExtranjeroOriginal As Double = dr1("CostoIndirectoExtranjero").ToString().ToDouble + 'dr1("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr1("CantidadF").ToString().ToDouble) / CantidadFOriginal + + DtDatosArmado.AcceptChanges() + + drNew("Cantidad") = Cantidad.ToDecimal + 'drNew("CantidadF") = Cantidad.ToDouble + 'drNew("CantidadS") = (CantidadSOriginal * drNew("CantidadF").ToString().ToDouble) / CantidadFOriginal + 'drNew("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > 0, CantidadSeleccionadaOriginal, 0) + 'drNew("Seleccionado") = If(CantidadSeleccionadaOriginal > 0, True, False) + 'dr("CostoIndirecto") = (CostoIndirectoOriginal * dr("CantidadF").ToString().ToDouble) / CantidadFOriginal + 'dr("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr("CantidadF").ToString().ToDouble) / CantidadFOriginal + DtDatosArmado.Rows.InsertAt(drNew, Index) + DtDatosArmado.AcceptChanges() + + index2 = 1 + For Each Row As DataRow In DtDatosArmado.Rows + Row("Consec") = index2 + index2 += 1 + Next + DtDatosArmado.AcceptChanges() + + + GvDatosArmado.DataSource = DtDatosArmado + GvDatosArmado.DataBind() + + + index2 = 0 + For Each Row As DataRow In DtDatosArmado.Rows + 'GvDatosArmado.Rows(index2).FCCheckBox("cbInv").Checked = CBool(Row("Seleccionado")) + 'If Row("CantidadSeleccionada").ToString() <> "" Then + ' GvDatosArmado.Rows(index2).FCTextBox("TbCantidadF").Text = Row("CantidadSeleccionada").ToString() + 'End If + If Row("Lote").ToString() <> "" Then + GvDatosArmado.Rows(index2).FCTextBox("TxtLote").Text = Row("Lote").ToString() + End If + If Row("CveSeccion").ToString() <> "" Then + GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString() + End If + If Row("FechaCaducidad").ToString() <> "" Then + GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString().ToDate.ToShortDateString + End If + index2 += 1 + Next + + UpDatosArmado.Update() + + End Sub + + #End Region #Region " GV DESARMADO " @@ -875,27 +1109,132 @@ Partial Class Inventarios_PaquetesArmadoDesarmado CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenDesarmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa) End If + Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl) + If e.Row.DataKey("AplicaCaducidad") = "True" Then - e.Row.FCTextBox("TxtCaducidad").Visible = True - e.Row.FCLinkButton("LnkCaducidad").Visible = True + 'e.Row.FCTextBox("TxtCaducidad").Visible = True + 'e.Row.FCLinkButton("LnkCaducidad").Visible = True - e.Row.FCTextBox("TxtCaducidad").ReadOnly = False - CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True - e.Row.FCTextBox("TxtCaducidad").Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").ReadOnly = False + ''CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").Enabled = True + DvFechaCaducidad.Visible = True Else - e.Row.FCTextBox("TxtCaducidad").Visible = False - e.Row.FCLinkButton("LnkCaducidad").Visible = False - e.Row.FCTextBox("TxtCaducidad").Enabled = True + 'e.Row.FCTextBox("TxtCaducidad").Visible = False + 'e.Row.FCLinkButton("LnkCaducidad").Visible = False + 'e.Row.FCTextBox("TxtCaducidad").Enabled = True - e.Row.FCTextBox("TxtCaducidad").ReadOnly = True - CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + 'e.Row.FCTextBox("TxtCaducidad").ReadOnly = True + ''CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + DvFechaCaducidad.Visible = False End If + + + + 'If e.Row.DataKey("AplicaCaducidad") = "True" Then + ' e.Row.FCTextBox("TxtCaducidad").Visible = True + ' e.Row.FCLinkButton("LnkCaducidad").Visible = True + + ' e.Row.FCTextBox("TxtCaducidad").ReadOnly = False + ' CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True + ' e.Row.FCTextBox("TxtCaducidad").Enabled = True + 'Else + ' e.Row.FCTextBox("TxtCaducidad").Visible = False + ' e.Row.FCLinkButton("LnkCaducidad").Visible = False + ' e.Row.FCTextBox("TxtCaducidad").Enabled = True + + ' e.Row.FCTextBox("TxtCaducidad").ReadOnly = True + ' CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + 'End If + e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True" e.Row.FCTextBox("TxtCosto").Attributes.Add("onkeyup", "SumaValores();") + + e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID)) + e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString() + e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID)) + End If End Sub + + + Protected Sub DividirDesarmado(sender As Object, e As EventArgs) + Dim index2 As Integer = 0 + + If Not DtDatosDesArmado.Columns.Contains("Lote") Then + DtDatosDesArmado.Columns.Add("Lote", GetType(String)) + End If + + If Not DtDatosDesArmado.Columns.Contains("CveSeccion") Then + DtDatosDesArmado.Columns.Add("CveSeccion", GetType(Integer)) + End If + + If Not DtDatosDesArmado.Columns.Contains("FechaCaducidad") Then + DtDatosDesArmado.Columns.Add("FechaCaducidad", GetType(String)) + End If + + DtDatosDesArmado.AcceptChanges() + + For Each Row As DataRow In DtDatosDesArmado.Rows + Row("Lote") = GvDatosDesarmado.Rows(index2).FCTextBox("TxtLote").Text + Row("CveSeccion") = GvDatosDesarmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero() + Row("FechaCaducidad") = GvDatosDesarmado.Rows(index2).FCTextBox("TxtCaducidad").Text + index2 += 1 + Next + + DtDatosDesArmado.AcceptChanges() + + Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, Button)).NamingContainer, GridViewRow) + Dim Index As Integer = gvRow.RowIndex + Dim Cantidad As String = HdnCantidadMovimiento.Value + Dim drOriginal As DataRow = DtDatosDesArmado.Rows(Index) + Dim drNew As DataRow = DtDatosDesArmado.NewRow + + drNew.ItemArray = drOriginal.ItemArray + + drOriginal("Cantidad") = (drOriginal("Cantidad").ToString().ToDouble - Cantidad.ToDouble) + + + + DtDatosDesArmado.AcceptChanges() + + drNew("Cantidad") = Cantidad.ToDecimal + + DtDatosDesArmado.Rows.InsertAt(drNew, Index) + DtDatosDesArmado.AcceptChanges() + + index2 = 1 + For Each Row As DataRow In DtDatosDesArmado.Rows + Row("Consec") = index2 + index2 += 1 + Next + DtDatosDesArmado.AcceptChanges() + + + GvDatosDesarmado.DataSource = DtDatosDesArmado + GvDatosDesarmado.DataBind() + + + index2 = 0 + For Each Row As DataRow In DtDatosDesArmado.Rows + + If Row("Lote").ToString() <> "" Then + GvDatosDesarmado.Rows(index2).FCTextBox("TxtLote").Text = Row("Lote").ToString() + End If + If Row("CveSeccion").ToString() <> "" Then + GvDatosDesarmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString() + End If + If Row("FechaCaducidad").ToString() <> "" Then + GvDatosDesarmado.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString().ToDate.ToShortDateString + End If + index2 += 1 + Next + + UpDatosDesarmado.Update() + + End Sub #End Region #Region " SERIE LOTE " diff --git a/Sistemas/DefinicionEmpresa.aspx b/Sistemas/DefinicionEmpresa.aspx index f020e0434..741dd2086 100644 --- a/Sistemas/DefinicionEmpresa.aspx +++ b/Sistemas/DefinicionEmpresa.aspx @@ -1025,15 +1025,18 @@
diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 5c7abfa40..339d007a1 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -75,44 +75,20 @@
-
-
-
- - - - -
- - - -
-
+ + +
- -
-
- - - - -
- - - -
+ + + +
@@ -129,17 +105,7 @@ - - - - - - -
@@ -154,14 +120,14 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveContratosEstatus, CveAF"> - + Fecha
@@ -177,19 +143,19 @@
+ + - - Fecha
@@ -202,19 +168,9 @@ - - - - - - - - + +
@@ -306,14 +262,15 @@
- - - - + + + +
@@ -357,7 +314,8 @@
- + @@ -383,17 +341,6 @@
- -
- Estatus: -
- - - -
-
@@ -161,7 +153,7 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveAF"> @@ -212,7 +204,8 @@ - + + @@ -370,7 +363,8 @@ Estatus:
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index d5480858d..c01c47982 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -11,8 +11,8 @@ Partial Class RepContratosCalendario #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") - txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") + txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd").Replace(" ", "T") + txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd").Replace(" ", "T") If Not IsPostBack Then CargaCombos() @@ -29,10 +29,21 @@ Partial Class RepContratosCalendario Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then GvContratos.DataSource = ObjContratos.DtResultados + GvContratos.DataBind() End If - ObjContratos.Dispose() - GvContratos.DataBind() + If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then + DdlEstatusConsulta.DataSource = ObjContratos.DtResultados + DdlEstatusConsulta.DataBind() + DdlEstatusConsulta.Items.Insert(0, New ListItem("-", "")) + + DdlEstatusContrato.DataSource = ObjContratos.DtResultados + DdlEstatusContrato.DataBind() + DdlEstatusContrato.Items.Insert(0, New ListItem("-", "")) + + End If + + ObjContratos.Dispose() End Sub Private Sub InicializaCalendar() @@ -56,22 +67,12 @@ Partial Class RepContratosCalendario DdlChofer.DataBind() DdlChofer.Items.Insert(0, New ListItem("-", "")) - 'Lista de Estatus - End Sub Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim estatusContrato As String = DataBinder.Eval(e.Row.DataItem, "EstatusContrato").ToString() - - Select Case estatusContrato - Case "1" - e.Row.BackColor = Drawing.Color.FromArgb(0, 165, 106) - Case "2" - e.Row.BackColor = Drawing.Color.FromArgb(43, 79, 214) - Case "3" - e.Row.BackColor = Drawing.Color.FromArgb(238, 96, 46) - End Select + Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString() + e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor) End If End Sub Protected Sub MostrarModal(sender As Object, e As System.EventArgs) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 6f61c20e7..6542dd47e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2193,6 +2193,8 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Cuerpo = Cuerpo.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If @@ -2212,6 +2214,8 @@ Partial Class Clientes Asunto = Asunto.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Asunto = Asunto.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Asunto = Asunto.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If End If @@ -2231,6 +2235,8 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Cuerpo = Cuerpo.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If End If @@ -2247,6 +2253,9 @@ Partial Class Clientes Asunto = Asunto.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Asunto = Asunto.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Asunto = Asunto.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + End If End If End If @@ -5614,6 +5623,10 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Cuerpo = Cuerpo.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + + End If End If @@ -5632,6 +5645,8 @@ Partial Class Clientes Asunto = Asunto.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Asunto = Asunto.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Asunto = Asunto.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If End If @@ -5650,6 +5665,8 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Cuerpo = Cuerpo.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If End If @@ -5667,6 +5684,9 @@ Partial Class Clientes Asunto = Asunto.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) Asunto = Asunto.Replace("{""Sucursal""}", Dr("SubProyecto").ToString()) + Asunto = Asunto.Replace("{""DescripcionVenta""}", Dr("DescripcionVenta").ToString()) + Asunto = Asunto.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + End If End If diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb index b766d3436..370b40595 100644 --- a/Ventas/FacturacionGlobal.aspx.vb +++ b/Ventas/FacturacionGlobal.aspx.vb @@ -159,10 +159,16 @@ Partial Class Ventas_FacturacionGlobal SbRemisiones.Remove(SbRemisiones.Length - 1, 1) Dim DtRemisionesPS As New DataTable() + Dim DtPagos As New DataTable() + Dim ObjClientes As New ClsClientes If ObjClientes.GetVentasRemisionesTotales(CveCliente, SbRemisiones.ToString(), 1) Then DtRemisionesPS = ObjClientes.DtResultados.Copy() End If + + If ObjClientes.GetVentasRemisionesPagos(CveCliente, SbRemisiones.ToString()) Then + DtPagos = ObjClientes.DtResultados.Copy() + End If ObjClientes.Dispose() Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, Me.CveSubProyecto, CveCliente, CveMoneda, "Ing") @@ -173,6 +179,7 @@ Partial Class Ventas_FacturacionGlobal ObjFactura.RemisionesLista = RemisionesLista ObjFactura.DtRemisionesPS = DtRemisionesPS ObjFactura.DtRemisiones = DtRemisiones.FiltraParametros($"CveVenta IN ({SbRemisiones.ToString()})") + ObjFactura.DtPagos = DtPagos For Each Dr As DataRow In DtRemisionesPS.Rows ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(), @@ -184,17 +191,14 @@ Partial Class Ventas_FacturacionGlobal 'ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPs = 2") Dim SbAlert As New StringBuilder() - Dim urlFactura As String = "" Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing Try Retorno = ObjFactura.EmitirFactura(True) If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then - SbAlert.AppendFormat("{0}
", Retorno.Mensajes(Retorno.Mensajes.Count - 1)) + SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1)) SbAlert.AppendFormat("
", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta))) - - urlFactura = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta))}" Else SbAlert.Append("Ocurrió un error al generar la factura") End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a17c40d89..df7f915bc 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -21095,6 +21095,7 @@ Partial Class Ventas Cuerpo = Cuerpo.Replace("{""Vigencia""}", TxtFechaVencimientoCotizacion.Text) Cuerpo = Cuerpo.Replace("{""AtencionA""}", TxtAtencionA.Text) Cuerpo = Cuerpo.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", TxtDescripcionVenta.Text) End If If UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion.Trim.Length > 0 Then @@ -21109,6 +21110,7 @@ Partial Class Ventas Asunto = Asunto.Replace("{""Vigencia""}", TxtFechaVencimientoCotizacion.Text) Asunto = Asunto.Replace("{""AtencionA""}", TxtAtencionA.Text) Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Asunto = Asunto.Replace("{""DescripcionVenta""}", TxtDescripcionVenta.Text) End If Else @@ -21123,6 +21125,7 @@ Partial Class Ventas Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio) Cuerpo = Cuerpo.Replace("{""AtencionA""}", TxtAtencionA.Text) Cuerpo = Cuerpo.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", TxtDescripcionVenta.Text) End If If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then @@ -21136,6 +21139,7 @@ Partial Class Ventas Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio) Asunto = Asunto.Replace("{""AtencionA""}", TxtAtencionA.Text) Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Asunto = Asunto.Replace("{""DescripcionVenta""}", TxtDescripcionVenta.Text) End If End If @@ -36312,6 +36316,10 @@ Partial Class Ventas RegistraScript("$('#DvModalTipoVenta').modal('hide');") End Select + + LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text + + End If UpDvModalTipoVenta.Update() End Sub @@ -36402,6 +36410,9 @@ Partial Class Ventas GvProductosProcedimiento.DataBind() DVGvProductosProcedimiento.Visible = False + + LblDvModalTipoVentaTitulo.Text = "Tipo de Venta" + UpDvModalTipoVenta.Update() End Sub