--FIX sobrante faltante
This commit is contained in:
@@ -706,7 +706,7 @@
|
||||
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
|
||||
<div class="input-icon" style="margin-left: 20px;">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm" onkeyup="ValidaSobranteFaltante()" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1591,7 +1591,7 @@
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
$get("ChkSobFaltante").checked = true;
|
||||
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||
$get("TxtCambio").value = "";
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -1617,15 +1617,26 @@
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function ValidaSobranteFaltante() {
|
||||
if (ToDouble($get("TxtFaltante").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1");
|
||||
$get("TxtFaltante").value = "";
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
$get("ChkSobFaltante").checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
function CargaSobranteFaltante() {
|
||||
$('#ChkSobFaltante').change(function () {
|
||||
if (this.checked == true) {
|
||||
if (ToDouble($get("TxtCambio").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1")
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
$get("TxtFaltante").value = "";
|
||||
|
||||
Reference in New Issue
Block a user