--Porcentaje Utilidad al agregar
This commit is contained in:
@@ -1260,7 +1260,9 @@
|
|||||||
<th runat="server" id="thOrden"></th>
|
<th runat="server" id="thOrden"></th>
|
||||||
<th runat="server" visible="false" id="nomostrar"></th>
|
<th runat="server" visible="false" id="nomostrar"></th>
|
||||||
<th runat="server" visible="false" id="thProntoPago"></th>
|
<th runat="server" visible="false" id="thProntoPago"></th>
|
||||||
<th runat="server" visible="false" id="thCosto"></th>
|
<th runat="server" visible="false" id="thCosto">
|
||||||
|
<asp:Literal ID="LtlHeaderCosto" runat="server" Text=""></asp:Literal>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<%--</asp:Panel>--%>
|
<%--</asp:Panel>--%>
|
||||||
|
|||||||
@@ -18365,6 +18365,27 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
AgregarPSAutomaticamente = False
|
AgregarPSAutomaticamente = False
|
||||||
|
Dim PuedeVerCosto As Boolean = UsuarioActual.TienePermisoProceso(201) OrElse UsuarioActual.TienePermisoProceso(385)
|
||||||
|
|
||||||
|
Dim Costo As Decimal = 0
|
||||||
|
|
||||||
|
If (CveVenta <= 0 OrElse EsCreaApartirDe) AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso PuedeVerCosto Then
|
||||||
|
GvPS.Columns(23).Visible = True
|
||||||
|
thCosto.Visible = True
|
||||||
|
thCosto2.Visible = True
|
||||||
|
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
|
Costo = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
|
If Costo <= 0 Then Costo = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
|
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
|
If Costo > 0 Then
|
||||||
|
LtlHeaderCosto.Text = String.Format("{0:N2} %", ((TxtPrecio.Text.ToDecimal() - Costo) / TxtPrecio.Text.ToDecimal()) * 100D)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If AgregarPSAutomaticamente Then
|
If AgregarPSAutomaticamente Then
|
||||||
|
|||||||
Reference in New Issue
Block a user