This commit is contained in:
2019-11-13 13:01:54 -07:00
14 changed files with 328 additions and 160 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, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras" 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, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto" 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>
@@ -210,41 +210,57 @@
<label for="<%= TxtClasificacion.ClientID.ToString()%>">Clasificación:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="Categoria" DataValueField="CveCategoria" Width="340px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<label for="<%= DdlCategoria.ClientID.ToString()%>">Categoría:</label>
<br />
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="Categoria" DataValueField="CveCategoria" Width="340px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<label for="<%= DdlCategoria.ClientID.ToString()%>">Categoría:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUsoClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" Width="340px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
<asp:ListItem Text="Gasto" Value="2"></asp:ListItem>
<asp:ListItem Text="Ingresos/Gasto" Value="3"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlUsoClasificacion.ClientID.ToString()%>">Uso Clasificación:</label>
</div>
<div class="form-group input-iconright" id="DivCuentaGasto" runat="server">
<label for="<%= DdlCuentaGasto.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Gasto:</label>
<asp:DropDownList ID="DdlCuentaGasto" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 340px;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input" runat="server">
<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>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUsoClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" Width="340px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
<asp:ListItem Text="Gasto" Value="2"></asp:ListItem>
<asp:ListItem Text="Ingresos/Gasto" Value="3"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlUsoClasificacion.ClientID.ToString()%>">Uso Clasificación:</label>
</div>
<br />
<div class="form-group input-iconright" id="DivCuentaGasto" runat="server">
<label for="<%= DdlCuentaGasto.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Gasto:</label>
<asp:DropDownList ID="DdlCuentaGasto" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 340px;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">

View File

@@ -178,11 +178,12 @@ Partial Class CatClasificaciones
DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text,
DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text,
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) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.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)")
TxtClasificacion.Text = ""
TxtPrecioBaseCosto.Text = ""
DdlCuentaGasto.SelectedValueExist("0")
DdlCuentaCostos.SelectedValueExist("0")
DdlCuentaIngresos.SelectedValueExist("0")
@@ -201,7 +202,7 @@ Partial Class CatClasificaciones
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
DdlCosto.SelectedValue.ToEntero, DdlCosto.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text,
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) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
@@ -346,6 +347,7 @@ Partial Class CatClasificaciones
Limpiador()
TxtClasificacion.Text = ""
TxtPrecioBaseCosto.Text = ""
DdlCategoria.SelectedIndex = 0
DdlSATPS.SelectedValue = ""
DdlSATPS.SelectedText = ""
@@ -371,6 +373,7 @@ Partial Class CatClasificaciones
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim CveClasificacion As String = GvRow.DataKey("CveClasificacion").ToString
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
Dim PrecioBaseCosto As String = GvRow.DataKey("PrecioBaseCosto").ToString
Dim CveCategoria As String = GvRow.DataKey("CveCategoria").ToString
Dim CuentaGasto As String = GvRow.DataKey("CuentaGasto").ToString
Dim CuentaCostos As String = GvRow.DataKey("CuentaCostos").ToString
@@ -421,6 +424,7 @@ Partial Class CatClasificaciones
TxtClasificacion.Text = Clasificacion
TxtPrecioBaseCosto.Text = PrecioBaseCosto.FormatoNumero(2)
DdlCategoria.SelectedValueExist(CveCategoria)
DdlUsoClasificacion.SelectedValue = UsoClasificacion
HdnIDClasificacion.Value = CveClasificacion

View File

@@ -2738,7 +2738,7 @@
<label for="<%= TxtDescuento.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-1" >
<div class="col-md-1">
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
@@ -2802,22 +2802,22 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPSAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlPSAjuste_selectedindexchange" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
</div>
</div>
<%-- <div class="col-md-3">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
</div>
</div>--%>
</div>
</div>
<div class="row">
<div class="col-md-8">
@@ -2842,7 +2842,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][1-9]|3[0-1])([A-Z]|X[1-9])[ACEN][A-HJ-NO-Z][A-F]$"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%
<%--<ajax:ValidatorCalloutExtender ID="VCECodEnsamble" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodEnsamble"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
@@ -2863,6 +2863,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtCodLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[*]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodLinea" runat="server" ControlToValidate="TxtCodLinea" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Linea''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodLinea" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodLinea"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
@@ -2886,7 +2887,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][3-9][1-9A-V][A-FK-O]$"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
@@ -2940,7 +2941,7 @@
<label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label>
</div>
</div>
<div class="col-md-3">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
@@ -2948,17 +2949,8 @@
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescuentoAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescuentoAjuste" runat="server" ControlToValidate="TxtDescuentoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDescuentoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescuentoAjuste"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEDescuentoAjuste" runat="server" TargetControlID="TxtDescuentoAjuste" FilterType="Custom, Numbers" ValidChars=".," />
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-3">
</div>
<div class="col-md-4">
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
</div>
</div>
@@ -3126,7 +3118,7 @@
$get("LblPrecioFinal").innerText = formato_numero(Monto - ((Monto * Descuento) / 100), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("TxtDescP").value = formato_numero(0, 2, '.', ',');
$get("HdnDescuento").value = Total;
@@ -3166,7 +3158,7 @@
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {

View File

@@ -5160,11 +5160,26 @@ Partial Class PV
End If
Contador += 1
Next
'TxtPUFactura.Text = PUFactura.FormatoNumero(2)
TxtPUFactura.Text = PUFactura.FormatoNumero(2)
End If
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
'TxtPUFactura.Text = ""
If DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso Not DdlFacturas.SelectedValue.ToEntero > 0 Then
Dim Index As Integer = DdlPSAjuste.SelectedIndex
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim PrecioSugerido As Decimal = 0
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal
End If
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
End If
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
TxtPUFactura.Text = ""
End If
CalculaPorcentajeAjuste()
@@ -5188,16 +5203,16 @@ Partial Class PV
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPrecio.Text.ToDouble).FormatoNumero
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
Dim CargoActual As Decimal = 0
Dim CargoAnterior As Decimal = 0
Dim CargoVendido As Decimal = 0
Dim CargoGarantia As Decimal = 0
Dim CveTamaño As Integer = 0
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
If Dr IsNot Nothing Then
CargoAnterior = Dr("Cargo").ToString.ToDecimal
CargoGarantia = Dr("Cargo").ToString.ToDecimal
End If
End If
@@ -5208,24 +5223,22 @@ Partial Class PV
End If
End If
If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0) IsNot Nothing AndAlso GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows.Count > 0 Then
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0)
If DrCargo IsNot Nothing Then
CargoActual = DrCargo("Cargo").ToString.ToDecimal
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
End If
End If
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
If (TxtPrecio.Text.ToDouble - ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior))) < 0 Then
TxtDescuentoAjuste.Text = TxtPrecio.Text
If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then
TxtImporteAjuste.Text = "0.00"
CargoAnterior = CargoActual
CargoGarantia = CargoVendido
End If
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
TxtImporteAjuste.Text = ((TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
End If
End If
ObjAcum.Dispose()
@@ -5233,31 +5246,6 @@ Partial Class PV
UpAjuste.Update()
End Sub
'Private Function AsignaPUFijo(CvePS As Integer) As Double
' Select Case CvePS
' Case 360449
' Return 500
' Case 360450
' Return 1000
' Case 360451
' Return 2000
' Case 360452
' Return 3000
' Case 360453
' Return 4000
' Case 360455
' Return 5000
' Case 365353
' Return 6000
' Case 360454
' Return 1500 'lth. acumulador
' Case 370810
' Return 2500 'lth. 1872
' Case Else
' Return 5000
' End Select
'End Function
Private Sub GuardaAjuste()
TxtPrecio.Text = TxtPrecio.Text
UpAjuste.Update()
@@ -5340,7 +5328,8 @@ Partial Class PV
End If
End If
Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
Dr("Descuento") = Math.Round(TxtImporteAjuste.Text.ToDouble, NumeroDecimales)
'Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) + (CargoActual - CargoAnterior), NumeroDecimales)
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
@@ -5747,7 +5736,7 @@ Partial Class PV
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
'Informacion Acumulador
params.Add(New ReportParameter("CodEnsamble", If(TxtCodEnsamble.Text.Length > 7, TxtCodEnsamble.Text.Trim.Substring(0, 7), "")))
params.Add(New ReportParameter("CodEnsamble", TxtCodEnsamble.Text.Trim))
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))

View File

@@ -4217,6 +4217,11 @@ Partial Class Ventas
BtnPermisoEditarCotizacion.Visible = True
End If
'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA
If UsuarioActual.TienePermisoProceso(281) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad")
BtnPermisoEditarCotizacion.Visible = True
End If
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
@@ -4279,10 +4284,21 @@ Partial Class Ventas
'CargaDetalle
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
'TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
For Each dr As DataRow In ObjVentas.DtResultados.Rows
AgregarProductoServicio(dr("Cantidad").ToString.ToDecimal, dr("CveUM").ToString.ToEntero, dr("UM").ToString, dr("CveClasificacion").ToString.ToEntero, dr("Clasificacion").ToString,
dr("CvePS").ToString.ToEntero, dr("PS").ToString, dr("Obs").ToString, dr("PU").ToString.ToDecimal, dr("Descuento").ToString.ToDecimal,
dr("CveProyecto").ToString.ToEntero, dr("Proyecto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("SubProyecto").ToString,
CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, CveVentaDetalleCotizacion:=dr("CveVentaDetalleCotizacion").ToString.ToEntero, RegeneraIEPS:=False, SeActualiza:=True)
Next
'TmpDT = ObjVentas.DtResultados
'TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
'TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
''TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
End If
@@ -4409,6 +4425,9 @@ Partial Class Ventas
Private Sub CargaFormaPago(CveMetodoPago As Integer)
'FACTURACION 3.3
'permiso para desbloquear la relación entre Método de pago y forma de pago
If UsuarioActual.TienePermisoProceso(282) Then CveMetodoPago = -1
Dim dtt As DataTable = Nothing
If CveMetodoPago > 0 Then
dtt = GlobalDTVtaFormaPago.FiltraParametros(If(CveMetodoPago = 1, " CveFormaPago <> 20 ", "CveFormaPago = 20"))
@@ -12907,6 +12926,16 @@ Partial Class Ventas
DdlUnidadMedida.DataBind()
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
If drPS("CveTipoPS").ToString = "1" Then 'Si es servicio
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then 'Si es Empresa llantera
TxtPrecio.Enabled = True
Else
'TxtPrecio.Enabled = False
End If
Else
TxtPrecio.Enabled = True
End If
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
CambiaMoneda()
@@ -12963,7 +12992,16 @@ Partial Class Ventas
End If
Dim PrecioBaseCosto As Decimal = 0
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones() Then
PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
End If
If PrecioSugerido > 0 Then
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
End If