-- Unificar un solo TC de pago en dólares
This commit is contained in:
@@ -294,8 +294,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtTCDolaresDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
DivDolaresDolares.Visible = True
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
Else
|
||||
ChkPagarDolares.Visible = True
|
||||
@@ -338,10 +336,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
End If
|
||||
|
||||
If DivDolaresDolares.Visible Then
|
||||
TxtTCDolaresDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#Region " CARGA DATOS "
|
||||
@@ -728,11 +722,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
|
||||
If TxtTCDolares.Visible Then
|
||||
TipoCambio = TxtTCDolares.Text.ToDecimal
|
||||
Else
|
||||
TipoCambio = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
TipoCambio = TxtTCDolares.Text.ToDecimal
|
||||
Else
|
||||
If TxtTC.Visible Then
|
||||
TipoCambio = TxtTC.Text.ToDecimal
|
||||
@@ -1143,16 +1133,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'recargo la moneda con la que se va a pagar
|
||||
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
|
||||
If dr("CveMoneda").ToString.ToEntero >= 2 Then
|
||||
DivDolaresDolares.Visible = True
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
BtnCambiaTipoMoneda_Click(Nothing, Nothing)
|
||||
Else
|
||||
DivDolaresDolares.Visible = False
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
End If
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
UpDatos.Update()
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
@@ -1162,6 +1143,11 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
End If
|
||||
If CveMoneda = 2 Then
|
||||
DivTCDolares.Visible = True
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
End If
|
||||
End If
|
||||
|
||||
' si no tiene CveMoneda, o es -1, cuando cambia de cuenta filtra las facturas
|
||||
@@ -1365,13 +1351,11 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkPagarPesos.Checked Then
|
||||
DivTC.Visible = True
|
||||
DivDolaresDolares.Visible = False
|
||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
Else
|
||||
DivTC.Visible = False
|
||||
DivDolaresDolares.Visible = True
|
||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
End If
|
||||
@@ -1385,13 +1369,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkPagarDolares.Checked Then
|
||||
DivTCDolares.Visible = True
|
||||
DivDolaresDolares.Visible = False
|
||||
'DivDolaresDolares.Visible = False
|
||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
Else
|
||||
DivTCDolares.Visible = False
|
||||
DivDolaresDolares.Visible = False
|
||||
'DivDolaresDolares.Visible = False
|
||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user