diff --git a/Ventas/ActualizarPrecios.aspx b/Ventas/ActualizarPrecios.aspx index 0053c508e..5e02a093d 100644 --- a/Ventas/ActualizarPrecios.aspx +++ b/Ventas/ActualizarPrecios.aspx @@ -42,58 +42,60 @@ outline: 0; } - table.adssigscroll { - min-width: 100%; - background-color:#fff; - } - - table.adssigscroll tbody,table.adssigscroll thead{ - background-color:#fff; - } - table.adssigscroll tr{ - background-color:inherit; - } - - - .divContainerads { - width: 100%; - max-height: calc(100vh - 260px); - overflow-y: auto; - } - - table.adssigscroll tr:nth-child(1) { - position: sticky; - top: 0; /* Se mantiene pegado en la parte superior */ - background-color: inherit; /* Para que no se superponga con otros elementos */ - z-index: 4; /* Asegura que esté sobre otros elementos */ - } - table.adssigscroll tr:nth-child(1) th:nth-child(1),table.adssigscroll tr:nth-child(1) th:nth-child(2) { - z-index: 5; - } - - table.adssigscroll tr:nth-child(2) { - top: 26.14px; - } - - table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1), - table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) { - position: sticky; - left: 0; - z-index: 3; - } - - table.adssigscroll tr td:nth-child(1), table.adssigscroll tr td:nth-child(2) { - background-color: inherit; - } - - table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1) { - width: 21px; - max-width: 21px; - } - - table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) { - left: 21px; + table.adssigscroll { + min-width: 100%; + background-color: #fff; + } + + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; } + + table.adssigscroll tr { + background-color: inherit; + } + + + .divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; + } + + table.adssigscroll tr:nth-child(1) { + position: sticky; + top: 0; /* Se mantiene pegado en la parte superior */ + background-color: inherit; /* Para que no se superponga con otros elementos */ + z-index: 4; /* Asegura que esté sobre otros elementos */ + } + + table.adssigscroll tr:nth-child(1) th:nth-child(1), table.adssigscroll tr:nth-child(1) th:nth-child(2) { + z-index: 5; + } + + table.adssigscroll tr:nth-child(2) { + top: 26.14px; + } + + table.adssigscroll tr td:nth-child(1), table.adssigscroll tr th:nth-child(1), + table.adssigscroll tr td:nth-child(2), table.adssigscroll tr th:nth-child(2) { + position: sticky; + left: 0; + z-index: 3; + } + + table.adssigscroll tr td:nth-child(1), table.adssigscroll tr td:nth-child(2) { + background-color: inherit; + } + + table.adssigscroll tr td:nth-child(1), table.adssigscroll tr th:nth-child(1) { + width: 21px; + max-width: 21px; + } + + table.adssigscroll tr td:nth-child(2), table.adssigscroll tr th:nth-child(2) { + left: 21px; + } @@ -105,18 +107,18 @@
  • Importar Listado
  • - - - -
  • + + + +
  • Exportar Excel -
  • -
    - - - -
    - + + + + + + +
    @@ -182,19 +184,19 @@ -
    -
    +
    +
    -
    +
    - +
    Código Fin:
    -
    +
    @@ -225,22 +227,25 @@ +
    -
    -
    +
    +
    - - $ + + +
    -
    +
    @@ -281,7 +278,7 @@
    + OnRowDataBound="GVPrecios_RowDataBound"> @@ -289,7 +286,7 @@ - + @@ -299,13 +296,13 @@ - + - +
    - +
    -
    +
    @@ -316,14 +313,14 @@ --%> - - + + - - + + - + @@ -351,347 +348,349 @@
    - - - - - - - - - - Producto/Servicio - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + Producto/Servicio + + +
    + +
    +
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    @@ -899,12 +898,25 @@ for (var i = 0; i < checks.length; i++) { if (checks[i].type == "checkbox") { - debugger; - if (checks[i].checked) { - idd = checks[i].id.replace('C_GVPrecios_chkPS_', '') + idd = checks[i].id.replace('C_GVPrecios_chkPS_', ''); if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) { - $get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2); + let tipo = $get('HdnTipo').value; + + //ASIGNAR PRECIO NUEVO + if (tipo == '1') { + $get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2); + } + + //AUMENTAR PRECIO POR PORCENTAJE + if (tipo == '2') { + let precioActual = ToDouble($get('C_GVPrecios_LtlPrecio_' + idd).innerText.replace(" ", "").replace("$", "").replace(",","")); + + let precioNuevo = ToDouble(((valor / 100) * precioActual) + precioActual) + $get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(precioNuevo, 2); + } + + } } diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 3aaa0ed3a..f30e1a2a1 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -333,21 +333,25 @@ Partial Class Ventas_ActualizarPrecios End Sub Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) If RblTipo.SelectedValue = "Imp" Then - ImporteFijo.Visible = True + LtlImporte.Text = "Precio nuevo:" + LtlSimbolo.Text = "$" + HdnTipo.Value = "1" Else - ImporteFijo.Visible = False + LtlImporte.Text = "Porcentaje a incrementar:" + LtlSimbolo.Text = "%" + HdnTipo.Value = "2" End If UPPrecioLista.Update() End Sub Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click - If RblTipo.SelectedIndex = 1 And TxtPorcentaje.Text.ToDecimal = 0 Then - Alert("Se debe de especificar un porcentaje.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'If RblTipo.SelectedIndex = 1 And TxtPorcentaje.Text.ToDecimal = 0 Then + ' Alert("Se debe de especificar un porcentaje.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If Dim TieneError As Boolean = False 'Dim Importe As Decimal = If(TxtImporte.Text = "", -1, TxtImporte.Text.ToDecimal) - Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal) + Dim Porcentaje As Decimal = -1 ' If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal) Dim MensajeAlert As New StringBuilder Dim sbProductos As New StringBuilder @@ -356,7 +360,7 @@ Partial Class Ventas_ActualizarPrecios Try For Each row As GridViewRow In GVPrecios.Rows If row.FCCheckBox("chkPS").Checked Then - TieneError = Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal) + TieneError = Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), True, PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal) If CBool(row.DataKey("ProductoExhibicion")) Then sbProductos.AppendFormat("{0},", row.DataKey("CvePS").ToEntero) End If @@ -396,7 +400,7 @@ Partial Class Ventas_ActualizarPrecios RegistraScript("$('#divAgregar').modal('hide')") TxtImporte.Text = "" TxtPrecio.Text = "" - TxtPorcentaje.Text = "" + 'TxtPorcentaje.Text = "" End Sub #Region "MODAL PRECIOS MINIMOS" @@ -679,8 +683,8 @@ Partial Class Ventas_ActualizarPrecios Dim StrMsgError As New StringBuilder If FranquiciasStr <> "" Then Dim Franquicias As String() = FranquiciasStr.Split(","c) - Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal) - + Dim Porcentaje As Decimal = -1 ' If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal) + For Each Franquicia As String In Franquicias Dim CveFranquicia As Integer = Franquicia.ToEntero Dim CvePS As Integer = GlobalDTPSSimplificado(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero