VALIDACION DE SALDOS EN TEXTBOX AL SELECCIONAR REMISION DE NC
This commit is contained in:
@@ -211,7 +211,7 @@
|
||||
|
||||
|
||||
<%--INICIA: CANCELAR - NC - DEVOLUCION [OLD]--%>
|
||||
|
||||
|
||||
<%--<li>
|
||||
<asp:LinkButton ID="LkNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Nota de crédito"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Nota de crédito?" data-btn-ok-label="si" Visible="false" />
|
||||
@@ -355,7 +355,7 @@
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
|
||||
</li>
|
||||
<%-- <li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton>
|
||||
</li>--%>
|
||||
</ContentTemplate>
|
||||
@@ -364,7 +364,7 @@
|
||||
<asp:PostBackTrigger ControlID="BtnContabilizar" />
|
||||
<asp:PostBackTrigger ControlID="BtnContabilizar" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
|
||||
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
@@ -1303,7 +1303,7 @@
|
||||
<asp:UpdatePanel ID="UpCodigosUnicos" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
|
||||
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePolizaVirtual,SerieLote,IdProductoPolizaVirtual,Total,Descuento,AnioVehiculo,FechaUsado,IdModeloAuto,IdMarcaAuto,IdBCI,TipoServicio,TipoPoliza,TieneUsado,IdMarcaUsado" ClientIDMode="Static" EmptyDataText="" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código Único">
|
||||
@@ -6506,6 +6506,25 @@
|
||||
}
|
||||
|
||||
}
|
||||
function CalculaSaldoRNCChk(TxtImporte, Saldo, Chk) {
|
||||
if (Chk.checked) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
}
|
||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||
var Importe = 0;
|
||||
if (TxtImporte.value != '') {
|
||||
Importe = parseFloat(TxtImporte.value);
|
||||
}
|
||||
|
||||
if (Importe > Saldo) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);;
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
|
||||
var Importe = 0, ImporteSinPorcentaje = 0;
|
||||
@@ -6531,18 +6550,18 @@
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) {
|
||||
if (Chk.checked) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) {
|
||||
if (Chk.checked) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
@@ -6981,17 +7000,17 @@
|
||||
function SetDisabledTxtTotal(valor) {
|
||||
DisabledTxtTotal = valor;
|
||||
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
||||
}
|
||||
}
|
||||
|
||||
function loadpage() {
|
||||
$('.AjustaT').each(function () {
|
||||
AjustaTotales($(this));
|
||||
})
|
||||
$('.AjustaT').change(function () {
|
||||
AjustaTotales($(this));
|
||||
});
|
||||
function loadpage() {
|
||||
$('.AjustaT').each(function () {
|
||||
AjustaTotales($(this));
|
||||
})
|
||||
$('.AjustaT').change(function () {
|
||||
AjustaTotales($(this));
|
||||
});
|
||||
|
||||
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
||||
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21074,6 +21074,12 @@ Partial Class Ventas
|
||||
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
Protected Sub GvDescNC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Reference in New Issue
Block a user