Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2551,10 +2551,9 @@ Public Class ClsProductosServicios
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@UltimoCosto", SqlDbType.Money).Value = UltimoCosto
|
.Add("@UltimoCosto", SqlDbType.Decimal).Value = UltimoCosto
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2525,7 +2525,14 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePromocion").Value.ToString.ToEntero
|
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePromocion").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
|
If ex.Message.Contains("UK_Vta_Promociones_CveEmpresa_Promocion") Then
|
||||||
|
Alert($"Ya existe una promoción con el nombre {Promocion} .", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
OnError("Ocurrió un error al agregar la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -2580,7 +2587,13 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
|
If ex.Message.Contains("UK_Vta_Promociones_CveEmpresa_Promocion") Then
|
||||||
|
Alert($"Ya existe una promoción con el nombre {Promocion} .", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
OnError("Ocurrió un error al actualizar la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -2569,7 +2569,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width:100px">
|
<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>
|
<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>
|
<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>
|
<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>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
|
|
||||||
LblCostoPromedio.Text = ObjProductosServicios.DtResultados.Rows(0)("CostoPromedio").ToString.FormatoNumero
|
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
|
LblFechaUltimaCompra.Text = ObjProductosServicios.DtResultados.Rows(0)("FechaUltimaCompra").ToString
|
||||||
HplKardex.NavigateUrl = $"/Inventarios/Kardex.aspx?CvePS={CvePS}"
|
HplKardex.NavigateUrl = $"/Inventarios/Kardex.aspx?CvePS={CvePS}"
|
||||||
|
|
||||||
@@ -3868,7 +3868,7 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
RegistraScript("$('#DVUltimoCostoModal').modal('hide');")
|
RegistraScript("$('#DVUltimoCostoModal').modal('hide');")
|
||||||
Alert("Ultimo Costo guardado correctamente", TipoMensaje.MsgInformacion, "window.location.reload();")
|
Alert("Ultimo Costo guardado correctamente", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -296,7 +296,16 @@ Partial Class Ventas_Promociones
|
|||||||
divDistribuidor.Visible = True
|
divDistribuidor.Visible = True
|
||||||
End If
|
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
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user