-- mejora en manejo en TC de dólares en Impuestos
This commit is contained in:
@@ -369,7 +369,7 @@
|
|||||||
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
|
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
|
||||||
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -574,7 +574,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
FiltroInv = "" 'queno considera lo proporcional
|
FiltroInv = "" 'queno considera lo proporcional
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If PorcentajeAlmacen = 0 Then ' sin recibir
|
If PorcentajeAlmacen = 0 Then ' sin recibir
|
||||||
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-o' aria-hidden='true'></i>"
|
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-o' aria-hidden='true'></i>"
|
||||||
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
|
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
|
||||||
@@ -732,11 +731,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteSeleccionado += gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
ImporteSeleccionado += gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
If gvr.DataKey("UUID") <> "" Then
|
If gvr.DataKey("UUID") <> "" Then
|
||||||
|
|
||||||
'529
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("TotalOriginal").ToDecimal)
|
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("TotalOriginal").ToDecimal)
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa < 2 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa < 2 Then
|
||||||
@@ -770,7 +764,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ObjCompra.Dispose()
|
ObjCompra.Dispose()
|
||||||
Else
|
Else
|
||||||
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -807,7 +800,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
|
Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
|
||||||
Dim ObjConta As ClsContPAQi = Nothing
|
Dim ObjConta As ClsContPAQi = Nothing
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjConta.IniciaTransacSQL()
|
ObjConta.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
@@ -892,7 +885,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Anexo.Text = ""
|
Anexo.Text = ""
|
||||||
|
|
||||||
'inserto los movimientos de la conta para abonar al saldo
|
'inserto los movimientos de la conta para abonar al saldo
|
||||||
|
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
@@ -935,21 +927,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjIE.DtResultados.Rows.Count > 0 Then
|
|
||||||
' Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
|
||||||
' Dim FechaC As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
|
||||||
' Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & FechaC & "#", "Fecha DESC")
|
|
||||||
|
|
||||||
' If drr IsNot Nothing Then
|
|
||||||
' FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
|
|
||||||
' TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim DttPlantilla As DataTable = Nothing
|
Dim DttPlantilla As DataTable = Nothing
|
||||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||||
DttPlantilla = ObjMov.DtResultados
|
DttPlantilla = ObjMov.DtResultados
|
||||||
@@ -961,31 +938,24 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
For Each gvr As GridViewRow In GvCxP.Rows
|
For Each gvr As GridViewRow In GvCxP.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
Dim EsImportacion As Boolean = False
|
Dim EsImportacion As Boolean = False
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambioOriginal").ToDecimal
|
||||||
|
PorcentajePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||||
|
tipoCambioCompraValuacion = 1
|
||||||
'Tipos de cambio
|
'Tipos de cambio
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||||
TipoCambioPago = 1
|
TipoCambioPago = 1
|
||||||
tipoCambioCompra = 1
|
|
||||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||||
TipoCambioPago = TxtTC.Text.ToDecimal
|
TipoCambioPago = TxtTC.Text.ToDecimal
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, tipoCambioCompra)
|
||||||
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
|
||||||
PorcentajePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal).RoundSQL
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
'TipoCambioPago = 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
|
'TipoCambioPago = 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
|
||||||
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, tipoCambioCompra)
|
||||||
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
|
||||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||||
tipoCambioCompra = 1
|
|
||||||
PorcentajePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
|
||||||
End If
|
End If
|
||||||
CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||||
|
|
||||||
'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
|
||||||
If DttPlantilla IsNot Nothing AndAlso DttPlantilla.Rows.Count > 0 Then
|
If DttPlantilla IsNot Nothing AndAlso DttPlantilla.Rows.Count > 0 Then
|
||||||
For Each Row As DataRow In DttPlantilla.Rows
|
For Each Row As DataRow In DttPlantilla.Rows
|
||||||
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||||
@@ -996,7 +966,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Referencia = gvr.DataKey("SerieFolio").ToString
|
Referencia = gvr.DataKey("SerieFolio").ToString
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
Case 17 'Pago Proveedores
|
Case 17 'Pago Proveedores
|
||||||
|
|
||||||
@@ -1011,21 +980,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
importeMX = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompraValuacion).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompraValuacion
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompraValuacion
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
TipoCambioGeneral = tipoCambioCompraValuacion
|
TipoCambioGeneral = tipoCambioCompraValuacion
|
||||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||||
@@ -1070,26 +1026,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ConceptoContable = 285
|
ConceptoContable = 285
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
importeMX = (ImporteMovimiento * tipoCambioCompra).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
@@ -1127,23 +1067,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Funcionalidad = 578
|
Funcionalidad = 578
|
||||||
ConceptoContable = 286
|
ConceptoContable = 286
|
||||||
End If
|
End If
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
importeMX = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)).RoundSQL
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1177,21 +1104,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ConceptoContable = 328
|
ConceptoContable = 328
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL
|
||||||
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
importeMX = (ImporteMovimiento * tipoCambioCompra).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1221,22 +1136,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
funcionalidad = 348
|
funcionalidad = 348
|
||||||
ConceptoContable = 328
|
ConceptoContable = 328
|
||||||
End If
|
End If
|
||||||
|
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
importeMX = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)).RoundSQL
|
||||||
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = TipoCambioPago
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1254,7 +1155,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 14 'Iva X Acreditar
|
Case 14 'Iva X Acreditar
|
||||||
@@ -1263,23 +1163,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
|
||||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal).RoundSQL
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
importeMX = (ImporteMovimiento * tipoCambioCompra).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
Else
|
Else
|
||||||
@@ -1287,23 +1172,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
importeMX = 0
|
importeMX = 0
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal * PorcentajePago).RoundSQL
|
||||||
|
importeMX = (ImporteMovimiento * tipoCambioCompra).RoundSQL
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
|
||||||
importeMX = importeMX.RoundSQL
|
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
@@ -1330,24 +1202,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||||
|
|
||||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ImporteMovimiento = (gvr.DataKey("IVADeducible").ToDecimal).RoundSQL
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
importeMX = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
|
||||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
Else
|
Else
|
||||||
@@ -1356,19 +1214,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = importeMX.RoundSQL
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
@@ -1411,20 +1258,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
Case 25 'IEPS X Acreditar
|
Case 25 'IEPS X Acreditar
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
ImporteMovimiento = (gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago).RoundSQL
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
importeMX = (ImporteMovimiento * tipoCambioCompra).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1435,20 +1270,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
Case 26 'IEPS Acreditable
|
Case 26 'IEPS Acreditable
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
ImporteMovimiento = (gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago).RoundSQL
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
importeMX = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)).RoundSQL
|
||||||
importeMX = ImporteMovimiento
|
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
|
||||||
End If
|
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1456,6 +1279,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 64 'Ganancia
|
Case 64 'Ganancia
|
||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
|
|
||||||
@@ -1479,37 +1303,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
|
||||||
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en la venta
|
|
||||||
' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetIVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetISR
|
|
||||||
' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IEPS
|
|
||||||
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
|
||||||
' importeMX = ImporteMovimiento
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
|
|
||||||
''Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
|
||||||
'Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
|
||||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
|
||||||
|
|
||||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
|
||||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
|
||||||
'TipoCambioGeneral = TCImpuestos
|
|
||||||
'''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
|
||||||
'If TipoCambioPago < tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) 'Añadimos la diferencia de ganancia en la venta
|
|
||||||
' ImporteMovimiento -= (IVA * TCImpuestos) - (IVA * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetIVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetISR
|
|
||||||
' ImporteMovimiento -= (IEPS * TCImpuestos) - (IEPS * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IEPS
|
|
||||||
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
|
||||||
' importeMX = ImporteMovimiento
|
|
||||||
'End If
|
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
@@ -1531,23 +1324,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = Math.Abs(Diferencia)
|
ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
'Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
|
||||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
|
||||||
|
|
||||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
|
||||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
|
||||||
'If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) 'Añadimos la diferencia de ganancia en la venta
|
|
||||||
' ImporteMovimiento -= (IVA * tipoCambioCompra) - (IVA * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
|
||||||
' ImporteMovimiento -= (IEPS * tipoCambioCompra) - (IEPS * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
|
||||||
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
|
||||||
' importeMX = ImporteMovimiento
|
|
||||||
'End If
|
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
@@ -1645,8 +1421,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ObjComp.ProgramarCompra(gvr.DataKey("CveCompra").ToEntero, 0, UsuarioActual.CveUsuario, -1)
|
ObjComp.ProgramarCompra(gvr.DataKey("CveCompra").ToEntero, 0, UsuarioActual.CveUsuario, -1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
ConceptoMovimiento = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(TipoCambioPago > 1, $" TC:{TipoCambioPago}", "")}"
|
ConceptoMovimiento = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(TipoCambioPago > 1, $" TC:{TipoCambioPago}", "")}"
|
||||||
@@ -1816,7 +1590,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
|
||||||
'IVA. siempre se registra aunque sea cero
|
'IVA. siempre se registra aunque sea cero
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user