diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 2035e1abc..28a85c533 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -346,7 +346,7 @@ - + @@ -501,7 +501,7 @@ var Ventas = ''; function FnSuma(t, txt, importe) { - debugger; + var chkPesosBancos = $get("ChkPagarPesos"); var chkDolaresBancos = $get("ChkPagarDolares"); @@ -526,7 +526,7 @@ } function SumaValores(pagoMultiple, monedaPago) { - debugger; + var Importe = 0; var Comision = 0.00; var topLevelElem = document.getElementById("form1"); @@ -614,8 +614,6 @@ } function FnCambia(chk, txt, saldo, op, pagoMultiple, monedaPago) { - debugger; - if (op == 1) { if (txt.value != '') { chk.checked = true; @@ -650,9 +648,20 @@ $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN'; } } + function FnSeleccionaNC(chk, chkNC) + { + if (chk.checked) { + chkNC.disabled = false; + chkNC.click(); + } else { + chkNC.disabled = true; + if (chkNC.checked) { + chkNC.click(); + } + } + } function FnLimites(chk, txt, limiteInferior, limiteSuperior) { - debugger; if (ToDouble(txt.value) < limiteInferior) { txt.value = limiteInferior; alert("El Importe no debe de exceder a el saldo"); @@ -674,11 +683,8 @@ } function CambiaPesosDolares() { - debugger; $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) - - debugger; if ($("#LbImporteME").length) { $get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' USD'; $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTC').value), 2); @@ -691,12 +697,12 @@ } function CambiaDolaresPesos() { - debugger; + $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) - debugger; + if ($("#LbImporteMN").length) { $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN'; $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTCDolares').value), 2); @@ -743,7 +749,7 @@ for (var i = 0; i < textBoxes.length; i++) { if (textBoxes[i].type == "checkbox") { - debugger; + if (textBoxes[i].id == "ChkAll") { check = !textBoxes[i].checked; diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 4b8a485f2..0dfcc09ad 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -615,9 +615,12 @@ Partial Class Ventas_ClientesAbonar End Select - - e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda)) - + If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then + e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID)) + Else + e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda)) + End If + If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then If e.Row.DBCampo("TipoDocto") = "Rem" Then e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión diff --git a/vwd.webinfo b/vwd.webinfo index bbbac0242..0182bd4de 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -7,6 +7,8 @@ + + \ No newline at end of file