From 24b46e554092c36c1a8c65284ddc53c6b4443b12 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 22 Feb 2024 15:59:16 -0700 Subject: [PATCH 1/2] --Recalcular el PU en el cambio de producto al editar --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 227d61a28..fc15c914b 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1256,7 +1256,7 @@ - + <%----%> <%----%> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2af43e23a..f216d9802 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -17095,6 +17095,35 @@ Partial Class Ventas Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS) End Sub + + Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + If GvPS.EditIndex >= 0 Then + Dim ddlPSEdit = DirectCast(sender, ADServerControl.Dropdownlost) + Dim GvRow = DirectCast(ddlPSEdit.NamingContainer, GridViewRow) + + If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then + Dim CvePSParametro = ddlPSEdit.SelectedValue.ToEntero() + + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("") + If DrPS IsNot Nothing Then + 'SUGIERE PRECIO + Dim PrecioSugerido As Decimal = 0 + Dim tPrecioSugerido As Decimal = 0 + tPrecioSugerido = DrPS("Precio").ToString().ToDecimal + Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, DrPS("CveClasificacion").ToString().ToEntero()) + + PrecioSugerido = ObjPrecioSugerido.PrecioSugerido + + If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido + + GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere + End If + End If + End If + End If + + End Sub Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPS) UpPS.Update() @@ -36985,5 +37014,6 @@ Partial Class Ventas End If End Sub + End Class From 272882dfdef7b710887f5a3346ce4f1826efb702 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 22 Feb 2024 17:37:18 -0700 Subject: [PATCH 2/2] =?UTF-8?q?FERRETERA.=20Descuentos,=20al=20especificar?= =?UTF-8?q?los,=20el=20c=C3=A1lculo=20corregirlo,=20el=20IVA=20no=20mostra?= =?UTF-8?q?rlo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 35 ++++++++++++++++++++--------------- Ventas/Ventas.aspx.vb | 33 ++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index fc15c914b..738a1010c 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4336,6 +4336,7 @@