--FIX ventas
This commit is contained in:
@@ -1524,10 +1524,10 @@
|
|||||||
<%--22--%>
|
<%--22--%>
|
||||||
<asp:BoundField DataField="TieneProntoPago" HeaderText="Pronto Pago" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ReadOnly="true" Visible="false" />
|
<asp:BoundField DataField="TieneProntoPago" HeaderText="Pronto Pago" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ReadOnly="true" Visible="false" />
|
||||||
<%--23--%>
|
<%--23--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="5%" HeaderText="Costo">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="20px" HeaderText="Costo">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblCosto" runat="server" Text='<%# Eval("Costo", "{0:N2}") %>'></asp:Label><br />
|
<asp:Label ID="LblCosto" runat="server"></asp:Label><br />
|
||||||
<asp:Label ID="LblCostoPorcentaje" runat="server" Text='<%# String.Format("{0:N2} %", ((CDbl(Eval("PU").ToString) - CDbl(Eval("Costo").ToString)) / (CDbl(Eval("PU").ToString)) * 100D)) %>'></asp:Label>
|
<asp:Label ID="LblCostoPorcentaje" runat="server"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -8909,6 +8909,20 @@ Partial Class Ventas
|
|||||||
e.Row.FCLinkButton("LnkExistencias").Visible = True
|
e.Row.FCLinkButton("LnkExistencias").Visible = True
|
||||||
End If
|
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
|
'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").Enabled = False
|
||||||
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
||||||
|
|||||||
Reference in New Issue
Block a user