From 69abc1e5909e7ce9ed27169729bb90efb2975ffe Mon Sep 17 00:00:00 2001 From: rmolina Date: Wed, 18 Dec 2019 10:02:59 -0700 Subject: [PATCH] =?UTF-8?q?-cambio=20en=20tc=20cuando=20viene=20de=20a?= =?UTF-8?q?=C3=B1os=20anteriores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContabilidad.vb | 2 +- Bancos/PopIEVentas.aspx.vb | 10 +++++----- Ventas/ClientesAbonar.aspx.vb | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index dd92984ef..e575033b1 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1172,7 +1172,7 @@ Public Class ClsContabilidad Select Case CveConceptoContable Case 6, 5, 17, 14, 19, 15, 16, 272, 275 SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra) - Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251 + Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226 SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta) Case 30, 66, 92 SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 482cb51e4..cf4f7d2b5 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1472,7 +1472,7 @@ Partial Class Bancos_PopIEVentas End If End If - Dim tipoCambioVentaDiferenciaCambiaria As Decimal = 1 + If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos tipoCambioPago = 1 @@ -2062,8 +2062,8 @@ Partial Class Bancos_PopIEVentas If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal) - Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria) + + Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) TimpocambioGeneral = TCImpuestos Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'AƱadimos la diferencia de perdida en la venta @@ -2090,8 +2090,8 @@ Partial Class Bancos_PopIEVentas If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal) - Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria) + + Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) TimpocambioGeneral = TCImpuestos diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 233ed25db..1692af294 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -872,7 +872,6 @@ Partial Class Ventas_ClientesAbonar CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) SeriesPago.Add(gvr.DataKey("SerieFolio")) - Dim tipoCambioVentaDiferenciaCambiaria As Double = 1 Dim EsAnticipoEspecial As Boolean = False If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True @@ -1244,7 +1243,7 @@ Partial Class Ventas_ClientesAbonar If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) + Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) @@ -1282,7 +1281,7 @@ Partial Class Ventas_ClientesAbonar If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) + Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'AƱadimos la diferencia de perdida en la venta