diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx
index 20835831c..a8ea186c6 100644
--- a/Bancos/ProveedoresAbonar.aspx
+++ b/Bancos/ProveedoresAbonar.aspx
@@ -70,16 +70,10 @@
-
-
-
-
+
@@ -701,9 +695,8 @@
debugger;
if ($("#LbImporteMN").length) {
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
- $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTCDolares').value), 2);
- $get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTCDolares').value), 2);
-
+ $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2);
+ $get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2);
}
if ($get('TxtTotal') != null) {
@@ -718,11 +711,12 @@
var TipoCambioActual = 0.0;
function CambiaTC(txt) {
- let TipoCambioTxt = ToDouble(txt.value)
- if (TipoCambioActual != TipoCambioTxt) {
+ debugger;
+ //let TipoCambioTxt = ToDouble(txt.value)
+ //if (TipoCambioActual != TipoCambioTxt) {
$get("BtnCambiaTipoMoneda").click();
- TipoCambioActual = TipoCambioTxt;
- }
+ // TipoCambioActual = TipoCambioTxt;
+ //}
}
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk,Text,Tipo) {
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 2a8781769..c63780b94 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -252,7 +252,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(98) Then
PermiteModificarImporte = False
End If
- Calendario.StartDate = NowADS().AddMonths(-18)
+ Calendario.StartDate = NowADS().AddMonths(-24)
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) Then
Calendario.StartDate = NowADS()
@@ -297,7 +297,7 @@ Partial Class Bancos_ProveedoresAbonar
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
Else
ChkPagarDolares.Visible = True
- TxtTCDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
+ TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
End If
RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}")
@@ -328,14 +328,9 @@ Partial Class Bancos_ProveedoresAbonar
If DivTC.Visible Then
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
- RegistraScript("CambiaPesosDolares();")
+ If ChkPagarDolares.Checked Then RegistraScript("CambiaPesosDolares();")
+ If ChkPagarPesos.Checked Then RegistraScript("CambiaDolaresPesos();")
End If
-
- If DivTCDolares.Visible Then
- TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
- RegistraScript("CambiaDolaresPesos();")
- End If
-
UpDatos.Update()
End Sub
#Region " CARGA DATOS "
@@ -722,7 +717,7 @@ Partial Class Bancos_ProveedoresAbonar
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
If CveMoneda = 2 Then
- TipoCambio = TxtTCDolares.Text.ToDecimal
+ TipoCambio = TxtTC.Text.ToDecimal
Else
If TxtTC.Visible Then
TipoCambio = TxtTC.Text.ToDecimal
@@ -794,13 +789,13 @@ Partial Class Bancos_ProveedoresAbonar
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
- Pago.TCPago = TxtTCDolares.Text.ToDecimal
+ Pago.TCPago = TxtTC.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
- Pago.TCPago = TxtTCDolares.Text.ToDecimal
- Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTCDolares.Text.ToDecimal)
+ Pago.TCPago = TxtTC.Text.ToDecimal
+ Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal)
End If
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
- If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
+ If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTC.Text.ToDecimal
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
@@ -1149,9 +1144,9 @@ Partial Class Bancos_ProveedoresAbonar
End If
If CveMoneda = 2 Then
- DivTCDolares.Visible = True
+ DivTC.Visible = True
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
- TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
+ TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
End If
End If
@@ -1356,7 +1351,6 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then
DivTC.Visible = True
- DivTCDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
@@ -1374,13 +1368,12 @@ Partial Class Bancos_ProveedoresAbonar
#Region "PAGAR CON DOLARES"
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarDolares.Checked Then
- DivTCDolares.Visible = True
+
'DivDolaresDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
- TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
+ TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
Else
- DivTCDolares.Visible = False
'DivDolaresDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Remove("onchange")
@@ -1624,7 +1617,7 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString
- RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-18).ToShortDateString
+ RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-24).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().ToShortDateString
Calendario.EndDate = NowADS()