SMS - 2024.02.06 precios en modal, cuando es tipo de venta: venta directa
This commit is contained in:
@@ -8517,7 +8517,13 @@
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:N4}") %>' Style="text-align: right!important" Width="80px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -36417,12 +36417,13 @@ Partial Class Ventas
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2, Cantidad, CodigoPS) Then
|
||||
Alert("No hay existencia.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -36501,7 +36502,7 @@ Partial Class Ventas
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
@@ -36565,6 +36566,37 @@ Partial Class Ventas
|
||||
GvProductosProcedimiento.DataBind()
|
||||
DVGvProductosProcedimiento.Visible = True
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
If RBLTipoVenta.SelectedValue = "2" Then
|
||||
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
Dim tPrecioSugerido As Decimal = 0
|
||||
tPrecioSugerido = PU
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||
|
||||
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
||||
|
||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||
End If
|
||||
|
||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||
|
||||
GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,###.####")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user