From ddd7ab92534c976f8715eda290c4bdf5f81dfca9 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 5 Nov 2024 16:21:05 -0700 Subject: [PATCH] --FIX ventas --- Ventas/Ventas.aspx | 6 +++--- Ventas/Ventas.aspx.vb | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index ddb9c41b5..3be72d870 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1524,10 +1524,10 @@ <%--22--%> <%--23--%> - + -
- +
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2237172d0..b695cbc7b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8909,6 +8909,20 @@ Partial Class Ventas e.Row.FCLinkButton("LnkExistencias").Visible = True End If + If CveVenta <= 0 Then + Dim PuedeVerCosto As Boolean = UsuarioActual.TienePermisoProceso(201) OrElse UsuarioActual.TienePermisoProceso(385) + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso PuedeVerCosto Then + If e.Row.DBCampo("PU").ToDecimal() > 0 Then + e.Row.FCLabel("LblCosto").Text = String.Format("{0:N2}", e.Row.DBCampo("Costo").ToDecimal()) + e.Row.FCLabel("LblCostoPorcentaje").Text = String.Format("{0:N2} %", ((e.Row.DBCampo("PU").ToDecimal() - e.Row.DBCampo("Costo").ToDecimal()) / e.Row.DBCampo("PU").ToDecimal()) * 100D) + Else + e.Row.FCLabel("LblCosto").Text = "" + e.Row.FCLabel("LblCostoPorcentaje").Text = "" + End If + End If + End If + 'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then ' e.Row.FCLinkButton("imgE").Enabled = False ' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."