VALIDACION DE SALDOS EN TEXTBOX AL SELECCIONAR REMISION DE NC
This commit is contained in:
@@ -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) {
|
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
|
||||||
var Importe = 0, ImporteSinPorcentaje = 0;
|
var Importe = 0, ImporteSinPorcentaje = 0;
|
||||||
|
|||||||
@@ -21074,6 +21074,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
UpDescNC.Update()
|
UpDescNC.Update()
|
||||||
End Sub
|
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)
|
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|||||||
Reference in New Issue
Block a user