Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1858,7 +1858,7 @@ Public Class ClsProductosServicios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal, CveUsuario As Integer) As Boolean
|
||||
Public Function AddPorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal, PorcentajeProducto2 As Decimal, PorcentajeProducto3 As Decimal, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasAdd")
|
||||
|
||||
@@ -1867,6 +1867,8 @@ Public Class ClsProductosServicios
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
|
||||
.Add("@PorcentajeProducto2", SqlDbType.SmallMoney).Value = PorcentajeProducto2
|
||||
.Add("@PorcentajeProducto3", SqlDbType.SmallMoney).Value = PorcentajeProducto3
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
End With
|
||||
@@ -1879,7 +1881,7 @@ Public Class ClsProductosServicios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdatePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal) As Boolean
|
||||
Public Function UpdatePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal, PorcentajeProducto2 As Decimal, PorcentajeProducto3 As Decimal) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PorcentajeMarcasUpdate")
|
||||
|
||||
@@ -1888,6 +1890,8 @@ Public Class ClsProductosServicios
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
|
||||
.Add("@PorcentajeProducto2", SqlDbType.SmallMoney).Value = PorcentajeProducto2
|
||||
.Add("@PorcentajeProducto3", SqlDbType.SmallMoney).Value = PorcentajeProducto3
|
||||
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -713,8 +713,8 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFImp)
|
||||
libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
|
||||
|
||||
''Guarda streem y descarga
|
||||
|
||||
@@ -5492,10 +5492,12 @@
|
||||
<tr class="Titulos">
|
||||
<th style="width: 28px">#</th>
|
||||
<th style="width: 200px">Marca</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
<%-- <th width="73px">Precio<br />
|
||||
General </th>--%>
|
||||
<th width="73px">%</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
<th width="73px">%</th>
|
||||
<th width="73px">%</th>
|
||||
<%-- <th width="73px">Precio<br />
|
||||
Aplicado </th>--%>
|
||||
<th style="width: 73px;"></th>
|
||||
</tr>
|
||||
@@ -5504,8 +5506,10 @@
|
||||
<td style="text-align: center;">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlMarcaPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" Height="22px"/>
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion2" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
|
||||
<asp:DropDownList ID="DdlMarcaPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" Height="22px" />
|
||||
<asp:RequiredFieldValidator ID="Rfv" runat="server" ControlToValidate="DdlMarcaPS" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="Rfv" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion2" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
@@ -5515,16 +5519,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioG" DataFormatString="{0:N2}" Width="55px" MaxLength="15" runat="server"></asp:Label>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgrega" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPorcentaje" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe1" runat="server" TargetControlID="txtPorcentaje" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentaje" runat="server" ControlToValidate="txtPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje2" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgrega" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="txtPorcentaje2" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVPorcentaje2" runat="server" ControlToValidate="txtPorcentaje2" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje2" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPorcentaje3" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgrega" Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" TargetControlID="txtPorcentaje3" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVPorcentaje3" runat="server" ControlToValidate="txtPorcentaje3" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''%'' Porcentaje</b> es necesario, por favor ingréselo." ValidationGroup="GprAgrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentaje3" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:Label ID="LbPrecioA" Width="55px" MaxLength="15" runat="server" ClientIDMode="Static"></asp:Label>
|
||||
</td>--%>
|
||||
<td align="center">
|
||||
@@ -5554,7 +5570,7 @@
|
||||
<ItemStyle Width="28px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="" ReadOnly="true" DataField="Marca" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" />
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioG" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioG" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
@@ -5569,8 +5585,32 @@
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPorcentajeP2" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("PorcentajeProducto2", "{0:N2}")%>' Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe2" runat="server" TargetControlID="txtPorcentajeP" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblPorcentajeP2" runat="server" Text='<%# Eval("PorcentajeProducto2", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="73px" HorizontalAlign="Right"></ItemStyle>
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioA" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPorcentajeP3" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("PorcentajeProducto3", "{0:N2}")%>' Style="text-align: right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe3" runat="server" TargetControlID="txtPorcentajeP" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblPorcentajeP3" runat="server" Text='<%# Eval("PorcentajeProducto3", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="73px" HorizontalAlign="Right"></ItemStyle>
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField HeaderText="" ReadOnly="true" DataField="PrecioA" ItemStyle-Width="73px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
@@ -5607,7 +5647,7 @@
|
||||
</div>
|
||||
<%-- FIN MODAL MODIFICAR PORCENTAJE MARCAS --%>
|
||||
|
||||
<%-- MODAL MODIFICAR PRECIOS PS --%>
|
||||
<%-- MODAL MODIFICAR PRECIOS PS --%>
|
||||
<div id="DivPorcentajePrecios" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
@@ -5737,7 +5777,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL MODIFICAR PRECIOS PS --%>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -8157,6 +8157,8 @@ Partial Class Clientes
|
||||
DTPorcentajeTemp.Columns.Add("CveMarca", GetType(Integer))
|
||||
DTPorcentajeTemp.Columns.Add("Marca", GetType(String))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto2", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("PorcentajeProducto3", GetType(Decimal))
|
||||
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
|
||||
DTPorcentajePrecios = DTPorcentajeTemp.Clone
|
||||
End Sub
|
||||
@@ -8194,11 +8196,13 @@ Partial Class Clientes
|
||||
|
||||
Private Sub LimpiaModalPorcentaje()
|
||||
txtPorcentaje.Text = ""
|
||||
txtPorcentaje2.Text = ""
|
||||
txtPorcentaje3.Text = ""
|
||||
DdlMarcaPS.SelectedValue = "-1"
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregarMarca_Click(sender As Object, e As EventArgs) Handles LbAgregarMarca.Click
|
||||
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
|
||||
If txtPorcentaje.Text.ToDecimal > 0 And txtPorcentaje.Text.ToDecimal <= 100 And txtPorcentaje2.Text.ToDecimal >= 0 And txtPorcentaje2.Text.ToDecimal <= 100 And txtPorcentaje3.Text.ToDecimal >= 0 And txtPorcentaje3.Text.ToDecimal <= 100 Then
|
||||
|
||||
Dim registro As DataRow = DTPorcentajePrecios.NewRow
|
||||
|
||||
@@ -8206,11 +8210,13 @@ Partial Class Clientes
|
||||
registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero
|
||||
registro.Item("Marca") = DdlMarcaPS.SelectedItem.Text
|
||||
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
|
||||
registro.Item("PorcentajeProducto2") = txtPorcentaje2.Text.ToDecimal
|
||||
registro.Item("PorcentajeProducto3") = txtPorcentaje3.Text.ToDecimal
|
||||
registro.Item("Estatus") = "I"
|
||||
DTPorcentajePrecios.Rows.Add(registro)
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Porcentaje debe estar en un rango mayor a 0 y menor o igual a 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
LimpiaModalPorcentaje()
|
||||
@@ -8255,15 +8261,21 @@ Partial Class Clientes
|
||||
Protected Sub GvM_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvM.RowUpdating
|
||||
|
||||
Dim PorcentajeProducto As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP").Text.ToDouble
|
||||
Dim PorcentajeProducto2 As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP2").Text.ToDouble
|
||||
Dim PorcentajeProducto3 As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP3").Text.ToDouble
|
||||
|
||||
If PorcentajeProducto >= 0 And PorcentajeProducto <= 100 Then
|
||||
If PorcentajeProducto > 0 And PorcentajeProducto <= 100 And PorcentajeProducto2 >= 0 And PorcentajeProducto2 <= 100 And PorcentajeProducto3 >= 0 And PorcentajeProducto3 <= 100 Then
|
||||
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
|
||||
|
||||
Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", No))
|
||||
|
||||
If Drs.Count > 0 Then
|
||||
Drs(0)("PorcentajeProducto") = PorcentajeProducto
|
||||
Drs(0)("Estatus") = "U"
|
||||
Drs(0)("PorcentajeProducto2") = PorcentajeProducto2
|
||||
Drs(0)("PorcentajeProducto3") = PorcentajeProducto3
|
||||
If Drs(0)("Estatus").ToString <> "I" Then
|
||||
Drs(0)("Estatus") = "U"
|
||||
End If
|
||||
End If
|
||||
|
||||
DTPorcentajePrecios.AcceptChanges()
|
||||
@@ -8271,7 +8283,7 @@ Partial Class Clientes
|
||||
|
||||
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
|
||||
Else
|
||||
Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Porcentaje debe estar en un rango mayor a 0 y menor o igual a 100", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -8288,11 +8300,11 @@ Partial Class Clientes
|
||||
If Dr("Estatus").ToString <> "" Then
|
||||
|
||||
If Dr("Estatus").ToString = "I" Then
|
||||
If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf Dr("Estatus").ToString = "U" Then
|
||||
If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal) Then
|
||||
If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf Dr("Estatus").ToString = "D" Then
|
||||
@@ -8495,7 +8507,9 @@ Partial Class Clientes
|
||||
If Drs.Count > 0 Then
|
||||
Drs(0)("PorcentajeProducto") = PorcentajeProducto
|
||||
Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100
|
||||
Drs(0)("Estatus") = "U"
|
||||
If Drs(0)("Estatus").ToString <> "I" Then
|
||||
Drs(0)("Estatus") = "U"
|
||||
End If
|
||||
End If
|
||||
|
||||
DTPorcentajePrecios.AcceptChanges()
|
||||
|
||||
Reference in New Issue
Block a user