Productos servicios Ultimo costo 6 decimales, promosiones UK Promocion CveEmpresa
This commit is contained in:
@@ -2569,7 +2569,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:100px">
|
||||
<asp:TextBox ID="TxtUltimoCostoModal" runat="server" Width="100px" CausesValidation="true" CssClass="form-control" onkeyup="FormatoMoneda(this)" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtUltimoCostoModal" runat="server" Width="100px" CausesValidation="true" CssClass="form-control" onkeyup="FormatoMoneda6Decimales(this)" ></asp:TextBox>
|
||||
<label for="<%= TxtUltimoCostoModal.ClientID.ToString()%>">Ultimo Costo:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtUltimoCostoModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtUltimoCostoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ultimo Costo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUltimoCostoModal"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
@@ -2789,5 +2789,43 @@
|
||||
}
|
||||
|
||||
|
||||
function FormatoMoneda6Decimales(t) {
|
||||
|
||||
|
||||
var input = t.value.replace(/[^0-9.]/g, "");
|
||||
|
||||
|
||||
var firstDotIndex = input.indexOf(".");
|
||||
if (firstDotIndex !== -1) {
|
||||
|
||||
var beforeDot = input.substring(0, firstDotIndex + 1);
|
||||
var afterDot = input.substring(firstDotIndex + 1).replace(/\./g, "");
|
||||
input = beforeDot + afterDot;
|
||||
}
|
||||
|
||||
var decimalIndex = input.indexOf(".");
|
||||
var integerPart = decimalIndex !== -1 ? input.slice(0, decimalIndex) : input;
|
||||
var decimalPart = decimalIndex !== -1 ? input.slice(decimalIndex + 1) : "";
|
||||
|
||||
|
||||
if (integerPart === "" && decimalIndex === 0) {
|
||||
integerPart = "0";
|
||||
}
|
||||
|
||||
|
||||
if (decimalPart.length > 6) {
|
||||
decimalPart = decimalPart.substring(0, 6);
|
||||
}
|
||||
|
||||
var reversed = integerPart.split("").reverse().join("");
|
||||
reversed = reversed.replace(/(\d{3})(?=\d)/g, "$1,");
|
||||
integerPart = reversed.split("").reverse().join("");
|
||||
|
||||
t.value = decimalIndex !== -1
|
||||
? integerPart + "." + decimalPart
|
||||
: integerPart;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1022,7 +1022,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
|
||||
LblCostoPromedio.Text = ObjProductosServicios.DtResultados.Rows(0)("CostoPromedio").ToString.FormatoNumero
|
||||
LblUltimoCosto.Text = ObjProductosServicios.DtResultados.Rows(0)("UltimoCosto").ToString.FormatoNumero
|
||||
LblUltimoCosto.Text = ObjProductosServicios.DtResultados.Rows(0)("UltimoCosto").ToString.ToDecimal.ToString("###,###,###.######")
|
||||
LblFechaUltimaCompra.Text = ObjProductosServicios.DtResultados.Rows(0)("FechaUltimaCompra").ToString
|
||||
HplKardex.NavigateUrl = $"/Inventarios/Kardex.aspx?CvePS={CvePS}"
|
||||
|
||||
@@ -3868,7 +3868,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
If ProcesoOK Then
|
||||
RegistraScript("$('#DVUltimoCostoModal').modal('hide');")
|
||||
Alert("Ultimo Costo guardado correctamente", TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||
Alert("Ultimo Costo guardado correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -296,7 +296,16 @@ Partial Class Ventas_Promociones
|
||||
divDistribuidor.Visible = True
|
||||
End If
|
||||
|
||||
If EmpresaGrupoDiaz Then
|
||||
|
||||
For Each item As ListItem In DdlTipoAplicacion.Items
|
||||
If item.Value = "1" Then
|
||||
DdlTipoAplicacion.Items.Remove(item)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user