- parametro de porcentaje máximo de descuento

This commit is contained in:
2024-06-04 18:03:37 -07:00
parent dccd0edb14
commit 5d85e7c9f7
3 changed files with 18 additions and 8 deletions

View File

@@ -76,7 +76,7 @@
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
<div>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto, PorMaximoDescuento" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Clasificación">
<ItemTemplate>
@@ -253,6 +253,10 @@
<asp:TextBox ID="TxtPrecioBaseCosto" CssClass="form-control" Width="130px" MaxLength="5" runat="server" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
<label for="<%= TxtPrecioBaseCosto.ClientID.ToString()%>" style="width: 130px;">Precio Base Costo:</label>
</div>
<div class="form-group form-md-line-input" runat="server" id="divPorMaxDescuento" visible="false">
<asp:TextBox ID="TxtPorMaximoDescuento" CssClass="form-control" Width="130px" MaxLength="5" runat="server" CausesValidation="true" Style="text-align: right!important" ></asp:TextBox>
<label for="<%= TxtPorMaximoDescuento.ClientID.ToString()%>" style="width: 130px;">% Max Descuento:</label>
</div>
</div>
</div>

View File

@@ -2,7 +2,6 @@
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class CatClasificaciones
@@ -96,7 +95,9 @@ Partial Class CatClasificaciones
CargaIngresos = True
DtCuentasContables = Nothing
ClasificacionOriginal = ""
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
divPorMaxDescuento.Visible = True
End If
CargaDdlSATPS()
CargaDDLs()
@@ -165,7 +166,7 @@ Partial Class CatClasificaciones
If HdnModalidadClasificacion.Value = "A" Then
If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "",
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal, PorMaximoDescuento:=TxtPorMaximoDescuento.Text.ToDecimal) Then
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
@@ -204,7 +205,7 @@ Partial Class CatClasificaciones
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "",
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal, PorMaximoDescuento:=TxtPorMaximoDescuento.Text.ToDecimal) Then
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then
If Not objConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 6, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=CveClasificacion) Then
@@ -498,7 +499,10 @@ Partial Class CatClasificaciones
TxtPrecioBaseCosto.Text = PrecioBaseCosto.FormatoNumero(2)
DdlCategoria.SelectedValueExist(CveCategoria)
DdlUsoClasificacion.SelectedValue = UsoClasificacion
HdnIDClasificacion.Value = CveClasificacion
HdnIDClasificacion.Value = CveClasificacion
TxtPorMaximoDescuento.Text = GvRow.DataKey("PorMaximoDescuento").ToString.ToDecimal.FormatoNumero(2)
If GvRow.DataKey("CveSATPS").ToString <> Nothing Then
DdlSATPS.SelectedValue = GvRow.DataKey("CveSATPS").ToString
DdlSATPS.SelectedText = GvRow.DataKey("SATClaveProductoServicio").ToString