-- se quitaron propiedades de empresa

idcuenta, perdida,ganancia,ieps,iva
-- se quitó globaldtclasificación porcentaje
This commit is contained in:
2023-04-19 06:11:06 -07:00
parent 3732dde1b1
commit 860b14e7dc
29 changed files with 325 additions and 466 deletions

View File

@@ -4002,28 +4002,28 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTClasificacionPorcentaje-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjVenta As New ClsGenerales
If ObjVenta.GetClasificacionPorcentaje(CveEmpresa, CveClasificacion:=-1) Then HttpContext.Current.Application(AppNombre) = ObjVenta.DtResultados
End Using
End If
'Public Shared Property GlobalDTClasificacionPorcentaje2(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable
' Get
' Dim AppNombre As String = $"GlobalDTClasificacionPorcentaje-{CveEmpresa}"
' If HttpContext.Current.Application(AppNombre) Is Nothing Then
' Using ObjVenta As New ClsGenerales
' If ObjVenta.GetClasificacionPorcentaje(CveEmpresa, CveClasificacion:=-1) Then HttpContext.Current.Application(AppNombre) = ObjVenta.DtResultados
' End Using
' End If
Dim Str As StringBuilder = New StringBuilder()
If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTClasificacionPorcentaje = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTClasificacionPorcentaje-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
' Dim Str As StringBuilder = New StringBuilder()
' If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
' If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
' If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
' GlobalDTClasificacionPorcentaje2 = Dv.ToTable
' Dv.Dispose()
' End Get
' Set(value As DataTable)
' Dim AppNombre As String = $"GlobalDTClasificacionPorcentaje-{CveEmpresa}"
' HttpContext.Current.Application(AppNombre) = value
' End Set
'End Property
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaqueteria As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTPaqueterias-{CveEmpresa}"
@@ -7842,10 +7842,10 @@ Public Class ClsPaginas
Dim Diferencia As Decimal = 0
If tImporteCompra <> tImportePago Then
If tImporteCompra > tImportePago Then
ConceptoContable = 64 : IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
ConceptoContable = 64
TipoMovimiento = True
Else
ConceptoContable = 65 : IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
ConceptoContable = 65
TipoMovimiento = False
End If
Diferencia = (tImporteCompra - tImportePago).Abs.RoundSQL
@@ -7921,18 +7921,18 @@ Public Class ClsPaginas
Ret.CveConceptoAcreditable = 19
Ret.CveConceptoxAcreditar = 14
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Dim IdCtaIVAXAcreditar, IdCtaIVAAcreditable, IdCtaIVANOAcreditable As Integer
Dim dt As DataTable = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA)
If dt.Rows.Count > 0 Then
IdCtaIVAXAcreditar = dt.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditable = dt.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
IdCtaIVANOAcreditable = dt.Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
End If
Ret.IdCtaContableAcreditable = IdCtaIVAAcreditable
Ret.IdCtaContablexAcreditar = IdCtaIVAXAcreditar
Ret.IdCtaContIVANoAcreditable = IdCtaIVANOAcreditable
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
' Dim IdCtaIVAXAcreditar, IdCtaIVAAcreditable, IdCtaIVANOAcreditable As Integer
' Dim dt As DataTable = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA)
' If dt.Rows.Count > 0 Then
' IdCtaIVAXAcreditar = dt.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditable = dt.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
' IdCtaIVANOAcreditable = dt.Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
' End If
' Ret.IdCtaContableAcreditable = IdCtaIVAAcreditable
' Ret.IdCtaContablexAcreditar = IdCtaIVAXAcreditar
' Ret.IdCtaContIVANoAcreditable = IdCtaIVANOAcreditable
'End If
Return Ret
End Get
End Property
@@ -8309,10 +8309,10 @@ Public Class ClsPaginas
tImportePago += Pago.ImporteFluctuacionAdicional 'para los casos de aplicación de
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
ConceptoContable = 64 : IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
ConceptoContable = 64
TipoMovimiento = True
Else
ConceptoContable = 65 : IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
ConceptoContable = 65
TipoMovimiento = False
End If
Diferencia = (tImporteVenta - tImportePago).Abs.RoundSQL

View File

@@ -404,18 +404,18 @@ Public Class ClsSisEmpresas
'Nuevos Datos
_Empresa.AreaGeografica = Data.Rows(0)("AreaGeografica").ToString
_Empresa.IdCuentaIVAxAcreditar = Data.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
_Empresa.IdCuentaIVAAcreditable = Data.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
_Empresa.IdCuentaIVAxTrasladar = Data.Rows(0)("IdCuentaIVAxTrasladar").ToString.ToEntero
_Empresa.IdCuentaIVATrasladado = Data.Rows(0)("IdCuentaIVATrasladado").ToString.ToEntero
_Empresa.IdCuentaRetIVACirculacion = Data.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
_Empresa.IdCuentaRetISRCirculacion = Data.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
_Empresa.IdCuentaDSV = Data.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero
_Empresa.IdCuentaImpuestosLocales = Data.Rows(0)("Conta_IdCuentaImpuestosLocales").ToString.ToEntero
_Empresa.IdCuentaIEPSxAcreditar = Data.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
_Empresa.IdCuentaIEPSAcreditable = Data.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
_Empresa.IdCuentaIEPSxTrasladar = Data.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero
_Empresa.IdCuentaIEPSTrasladado = Data.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
'_Empresa.IdCuentaIVAxAcreditar = Data.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
'_Empresa.IdCuentaIVAAcreditable = Data.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
'_Empresa.IdCuentaIVAxTrasladar = Data.Rows(0)("IdCuentaIVAxTrasladar").ToString.ToEntero
'_Empresa.IdCuentaIVATrasladado = Data.Rows(0)("IdCuentaIVATrasladado").ToString.ToEntero
'_Empresa.IdCuentaRetIVACirculacion = Data.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
'_Empresa.IdCuentaRetISRCirculacion = Data.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
'_Empresa.IdCuentaDSV = Data.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero
'_Empresa.IdCuentaImpuestosLocales = Data.Rows(0)("Conta_IdCuentaImpuestosLocales").ToString.ToEntero
'_Empresa.IdCuentaIEPSxAcreditar = Data.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
'_Empresa.IdCuentaIEPSAcreditable = Data.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
'_Empresa.IdCuentaIEPSxTrasladar = Data.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero
'_Empresa.IdCuentaIEPSTrasladado = Data.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
_Empresa.IdCuentaOtrosIngresos = Data.Rows(0)("Conta_IdCuentaOtrosIngresos").ToString.ToEntero
'_Empresa.IdCtaProveedor = Data.Rows(0)("IdCtaProveedor").ToString.ToEntero
@@ -428,7 +428,7 @@ Public Class ClsSisEmpresas
'_Empresa.IdCtaAnticipoProveedores = Data.Rows(0)("IdCtaAnticipoProveedores").ToString.ToEntero
_Empresa.Buzon_Tipo = Data.Rows(0)("Buzon_Tipo").ToString
_Empresa.ContaContabilizacionNC = Data.Rows(0)("Conta_ContabilizacionNC").ToString.ToEntero
'_Empresa.ContaContabilizacionNC = Data.Rows(0)("Conta_ContabilizacionNC").ToString.ToEntero
'_Empresa.Ruta = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, _Empresa.CveEmpresa)
_Empresa.PV_TerminalTipo = Data.Rows(0)("PV_TerminalTipo").ToString.ToEntero
_Empresa.EjercicioActual = Data.Rows(0)("EjercicioActual").ToString.ToEntero
@@ -437,8 +437,8 @@ Public Class ClsSisEmpresas
_Empresa.MetodoOC = Data.Rows(0)("MetodoOC").ToString.ToEntero
_Empresa.CveMetodoInventario = Data.Rows(0)("Inv_CveMetodoInventario").ToString.ToEntero
_Empresa.RequiereCentroCostos = Data.Rows(0)("RequiereCentroCostos").ToString <> "No"
_Empresa.IdCuentaPerdidaCambiaria = Data.Rows(0)("IdCuentaPerdidaCambiaria").ToString.ToEntero
_Empresa.IdCuentaGananciaCambiaria = Data.Rows(0)("IdCuentaGananciaCambiaria").ToString.ToEntero
'_Empresa.IdCuentaPerdidaCambiaria = Data.Rows(0)("IdCuentaPerdidaCambiaria").ToString.ToEntero
'_Empresa.IdCuentaGananciaCambiaria = Data.Rows(0)("IdCuentaGananciaCambiaria").ToString.ToEntero
_Empresa.Tipo_CentroCosto = Data.Rows(0)("Tipo_CentroCosto").ToString.ToEntero
_Empresa.GrupoEmpresa = Data.Rows(0)("GrupoEmpresa").ToString.ToEntero
_Empresa.PlantillaMailVenta = Data.Rows(0)("PlantillaMailVenta").ToString
@@ -467,7 +467,6 @@ Public Class ClsSisEmpresas
_Empresa.RutaArchivos = Data.Rows(0)("RutaArchivos").ToString
Else
'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -53,7 +53,6 @@ Public Class Empresa
Public CvePAC As Integer
Public CveRegimenFiscal As Integer
Public Property Tipo_CentroCosto As Integer
Public Property MostrarRetISR As Boolean
Public Property Regimen As String
@@ -63,7 +62,6 @@ Public Class Empresa
Public Property RegistroCompleto As Integer
Public Property Importe As Decimal
Public Property CveMetodoPago As Integer
Public Property CodigoRegimenFiscal As String
Public Property RegimenFiscal As String
Public Property EstatusFacturacion As Boolean
@@ -108,23 +106,23 @@ Public Class Empresa
Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
End If
End Get
End Property
Public Property IdCuentaIVAxTrasladar As Integer
Public Property IdCuentaIVATrasladado As Integer
Public Property IdCuentaPerdidaCambiaria As Integer
Public Property IdCuentaGananciaCambiaria As Integer
Public Property ContaContabilizacionNC As Integer
End Property
'Public Property IdCuentaIVAxTrasladar As Integer
'Public Property IdCuentaIVATrasladado As Integer
'Public Property IdCuentaPerdidaCambiaria As Integer
'Public Property IdCuentaGananciaCambiaria As Integer
' Public Property ContaContabilizacionNC As Integer
Public Property PV_TerminalTipo As Integer
Public Property PlantillaMailVenta As String
Public Property AsuntoPlantillaMailVenta As String
'Nuevas
Public Property IdCuentaIVAxAcreditar As Integer
Public Property IdCuentaIVAAcreditable As Integer
Public Property IdCuentaRetIVACirculacion As Integer
Public Property IdCuentaRetISRCirculacion As Integer
Public Property IdCuentaDSV As Integer
Public Property IdCuentaImpuestosLocales As Integer
'Public Property IdCuentaIVAxAcreditar As Integer
'Public Property IdCuentaIVAAcreditable As Integer
'Public Property IdCuentaRetIVACirculacion As Integer
'Public Property IdCuentaRetISRCirculacion As Integer
'Public Property IdCuentaDSV As Integer
'Public Property IdCuentaImpuestosLocales As Integer
Public Property IdCtaProveedor As Integer
Public Property IdCtaCliente As Integer
Public Property IdCtaDeudores As Integer
@@ -134,10 +132,6 @@ Public Class Empresa
Public Property IdCtaAnticipoProveedores As Integer
'Nuevos Datos
Public Property IdCuentaIEPSxAcreditar As Integer
Public Property IdCuentaIEPSAcreditable As Integer
Public Property IdCuentaIEPSxTrasladar As Integer
Public Property IdCuentaIEPSTrasladado As Integer
Public Property PorDepreciacion As Decimal
Public Property CvePlataforma As Integer
Public Property CveDistribuidor As Integer

View File

@@ -2421,10 +2421,10 @@ Namespace Modelos
SeContabiliza = False
End If
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
IdCtaIVAXTrasladar = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
IdCtaIVATrasladado = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
End If
'If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
' IdCtaIVAXTrasladar = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
' IdCtaIVATrasladado = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
'End If
Dim UsaComplementariaClientes As Boolean = True
'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then UsaComplementariaClientes = True
@@ -2491,11 +2491,9 @@ Namespace Modelos
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimiento * difFluctuacion).RoundSQL)
@@ -2798,11 +2796,9 @@ Namespace Modelos
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador
@@ -2889,11 +2885,9 @@ Namespace Modelos
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL) * ValorMultiplicador
@@ -3183,11 +3177,9 @@ Namespace Modelos
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador
@@ -3332,20 +3324,20 @@ Namespace Modelos
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
End If
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
''código fijo en base el porcentaje iva, que se afecten las clasificaciones
'For i = 0 To TmpDTDetalle.Rows.Count - 1
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933") Then
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933") Then
'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
End If
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
' End If
End If
' End If
Next
'Next
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
@@ -3396,23 +3388,23 @@ Namespace Modelos
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
End If
If UsuarioActual.CveEmpresa = 119 Then
'If UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
' For i = 0 To TmpDTDetalle.Rows.Count - 1
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "20242") Then
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "20242") Then
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
End If
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
' End If
End If
' End If
Next
' Next
End If
'End If
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
@@ -3583,9 +3575,6 @@ Namespace Modelos
importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Else
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
End If
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -3693,7 +3682,6 @@ Namespace Modelos
End If
'IVA X TRASLADAR
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
@@ -3701,7 +3689,6 @@ Namespace Modelos
End If
'IVA PAGADO
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
@@ -3710,14 +3697,14 @@ Namespace Modelos
'IEPS X TRASLADAR
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, 0, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
'IEPS PAGADO
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, 0, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If

View File

@@ -345,7 +345,6 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 62 'Ret IVA Trasladado
@@ -387,7 +386,6 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
Case 38 'IEPS por trasladar
@@ -395,14 +393,10 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
Case 39 'IEPS Trasladado
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
Case 78 'Otros Ingresos
If ChkAjusteOI.Checked Then
ImporteMovimiento = gvr.FCTextBox("TxtComision").Text.ToDecimal

View File

@@ -540,12 +540,12 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
//IVA
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, 0, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
{
MsgError = "No se pudo insertar concepto de IVA";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now,0, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
{
MsgError = "No se pudo insertar concepto de IVA";
}

View File

@@ -294,8 +294,9 @@ Partial Class Bancos_FluctuacionCambiaria
HdnAcreedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
BtnAcreedoresAntRemove.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
BtnGeneraAcreedoresAnt.Visible = Not HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
HplAcreedorAntLiga.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
HplAcreedorAntLiga.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
HplAcreedorAntLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
GvAcreedoresAnt.DataSource = ObjBancos.DtResultados
LblTotalAcreedoresAnt.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
@@ -427,9 +428,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotal.ToDecimal
@@ -507,9 +506,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotal.ToDecimal
@@ -591,9 +588,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
@@ -688,9 +683,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
@@ -794,9 +787,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalAcreedores.Text.ToDecimal
@@ -883,9 +874,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalAcreedoresAnt.Text.ToDecimal
@@ -966,9 +955,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveCuentaPerdida = 0 ' 55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalBancos.Text.ToDecimal
@@ -1052,9 +1039,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
@@ -1130,9 +1115,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal

View File

@@ -2818,7 +2818,7 @@ Partial Class Bancos_IE
If TxtIvaIxC.Text.ToDouble > 0 Then
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
'Iva
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, 0, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
End If
'Bancos
@@ -2935,7 +2935,7 @@ Partial Class Bancos_IE
Dim CveConIVA As Integer = 61
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, 0, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
@@ -3244,14 +3244,14 @@ Partial Class Bancos_IE
If DiferenciaTC < 0 Then
'64
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
Exit Select
End If
Else
'65
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3282,9 +3282,9 @@ Partial Class Bancos_IE
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
'Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
'Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0
Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2)
@@ -3305,11 +3305,11 @@ Partial Class Bancos_IE
If IVADev > 0 Then
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
' IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
' IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
@@ -3453,14 +3453,14 @@ Partial Class Bancos_IE
If DiferenciaTC < 0 Then
'64
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
Exit Select
End If
Else
'65
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3489,17 +3489,17 @@ Partial Class Bancos_IE
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
'Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim IdCtaIVAXAcreditarDevDinC As Integer
Dim IdCtaIVAAcreditableDevDinC As Integer
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Else
MsgError = "Sin Registros de porcentaje impuesto"
End If
'If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
' IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'Else
' MsgError = "Sin Registros de porcentaje impuesto"
'End If
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0

View File

@@ -409,13 +409,11 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (TCPago > TC)
{
CveConceptoDiferenciaCambiaria = 65;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
TipoMovto = false;
}
else if (TCPago < TC)
{
CveConceptoDiferenciaCambiaria = 64;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
TipoMovto = true;
}
Importe = ((Importe * TCPago) - (Importe * TC)).Abs();

View File

@@ -780,16 +780,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (TC < TCDoc)
{
CveConceptoDiferenciaCambiaria = 65;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
TipoMovto = false;
Importe = (Importe * gvr.DataKey("TipoCambio").ToDecimal()) - (Importe * TC);
}
else if (TC > TCDoc)
{
CveConceptoDiferenciaCambiaria = 64;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
TipoMovto = true;
Importe = (Importe * TC) - (Importe * gvr.DataKey("TipoCambio").ToDecimal());
}
ImporteMN = Importe;

View File

@@ -416,10 +416,9 @@ Partial Class Bancos_PolizaCheque
NombreCuenta = ""
If UsuarioActual.Empresa.UsaContabilidad Then
If drt("CveCuenta").ToString.ToEntero > 0 Then
If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
@@ -428,52 +427,42 @@ Partial Class Bancos_PolizaCheque
End If
EsComodin = 0
End If
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
End If
EsComodin = 0
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
' Cuenta = drr("Nombre").ToString()
EsComodin = 1
End If
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 0
End If
EsComodin = 0
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
' Cuenta = drr("Nombre").ToString()
EsComodin = 1
Else
' Rad.Checked = False
'If us Then
' Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
' GvMov.DataBind()
' UPMovs.Update()
' Exit Sub
'End If
End If
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 0
End If
End If

View File

@@ -1122,7 +1122,7 @@ Partial Class Bancos_PopIEVentas
trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then
If DdlTipoTransaccion.SelectedValue = "9" Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
@@ -1905,13 +1905,6 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVAXTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
Case 61 'Iva Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1937,13 +1930,7 @@ Partial Class Bancos_PopIEVentas
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVATrasladado As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Case 38 'IEPS por trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -2078,7 +2065,6 @@ Partial Class Bancos_PopIEVentas
Case 64 'Ganancia
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
Dim tImporteVenta, tImportePago, Diferencia As Decimal
ImporteMovimiento = 0
@@ -2100,11 +2086,9 @@ Partial Class Bancos_PopIEVentas
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
ConceptoContable = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
TipoMovimiento = True
Else
ConceptoContable = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
TipoMovimiento = False
End If
Diferencia = Math.Abs(tImporteVenta - tImportePago)

View File

@@ -1877,10 +1877,10 @@ Partial Class Bancos_ProveedoresAbonar
Dim IdCtaIVAXAcreditar As Integer = 0
Dim IdCtaIVAAcreditable As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'End If
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
@@ -1930,11 +1930,11 @@ Partial Class Bancos_ProveedoresAbonar
End If
If TCCompra > TCPago Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If

View File

@@ -5907,10 +5907,10 @@ Partial Class Compras_Compras
' Dim IdCtaIVAAcreditable As Integer = 0
Dim GuardoConcepto18 As Boolean = False
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows.Count > 0 Then
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows.Count > 0 Then
' IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' ' IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'End If
'********************** Variables '**********************
@@ -6362,11 +6362,9 @@ Partial Class Compras_Compras
If TipoCambioCompra > TCPago Then
ConceptoContable = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
TipoMovimiento = True
Else
ConceptoContable = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
TipoMovimiento = False
End If
If TCPago <> TipoCambioCompra Then
@@ -6827,10 +6825,8 @@ Partial Class Compras_Compras
If diferenciaTransito <> 0 Then
Dim tCveCon As Integer = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
If diferenciaTransito < 0 Then
tCveCon = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
diferenciaTransito = Math.Abs(diferenciaTransito)
@@ -7367,11 +7363,9 @@ Partial Class Compras_Compras
If importeMovimiento > 0 Then
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
ElseIf importeMovimiento < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
End If
importeMovimiento = importeMovimiento.Abs.RoundSQL()

View File

@@ -181,11 +181,9 @@ Partial Class Compras_RepNotasCredito
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL)

View File

@@ -93,9 +93,9 @@ Partial Class Contabilidad_CatClasificacionPorcentaje
DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue, UsuarioActual.CveEmpresa) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
Alert("Clasificación porcentaje agregado correctamente")
If ObjGenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
End If
'If ObjGenerales.GetClasificacionPorcentaje(-1) Then
' GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
'End If
CargaDatos()
CargaContPaq()
UpDatos.Update()
@@ -105,9 +105,9 @@ Partial Class Contabilidad_CatClasificacionPorcentaje
DdlIdCtaIVAAcreditable.SelectedValue, DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
Alert("Clasificación porcentaje actualizado correctamente")
If ObjGenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
End If
'If ObjGenerales.GetClasificacionPorcentaje(-1) Then
' GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
'End If
CargaDatos()
CargaContPaq()
UpDatos.Update()
@@ -120,9 +120,9 @@ Partial Class Contabilidad_CatClasificacionPorcentaje
Dim objgenerales As New ClsGenerales
If objgenerales.RemoveClasificacionPorcentaje(GvDatos.DataKeys(e.RowIndex).Value.ToString) Then
Alert("la clasificación porcentaje se eliminó correctamente")
If objgenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = objgenerales.DtResultados
End If
'If objgenerales.GetClasificacionPorcentaje(-1) Then
' GlobalDTClasificacionPorcentaje(-1) = objgenerales.DtResultados
'End If
CargaDatos()
CargaContPaq()
UpDatos.Update()

View File

@@ -810,9 +810,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
FluctuacionCambiariaIVA = Math.Round((IVAAcreditable * TipoCambioFechaCompra) - (IVAAcreditable * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE IVA
If FluctuacionCambiariaIVA < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
If Math.Abs(FluctuacionCambiariaIVA) <> 0 Then
If Not Conta.AddMovimiento(IDPoliza, CtaFluctuacion, tempMovto, Math.Abs(FluctuacionCambiariaIVA), gvrc.FCHiddenField("HdnSerieFolio").Value, "Fluctuacion IVA " & ConceptoDetalle, 0, Fecha, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), 0) Then MsgError = "No se pudo insertar movimiento contable" : Exit For ' no lleva moneda extranjera
@@ -823,9 +823,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
If Dif < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)
@@ -858,9 +858,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
FluctuacionCambiariaIVA = Math.Round((IVAAcreditable * TipoCambioFechaCompra) - (IVAAcreditable * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE IVA
If FluctuacionCambiariaIVA < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
If Math.Abs(FluctuacionCambiariaIVA) <> 0 Then
If Not Conta.AddMovimiento(IDPoliza, CtaFluctuacion, tempMovto, Math.Abs(FluctuacionCambiariaIVA), gvrc.FCHiddenField("HdnSerieFolio").Value, "Fluctuacion IVA " & ConceptoDetalle, 0, Fecha, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), 0) Then MsgError = "No se pudo insertar movimiento contable" : Exit For ' no lleva moneda extranjera
@@ -871,9 +871,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
If Dif < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)
@@ -1123,7 +1123,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IVAxAcreditar = IVAAcreditable
IVAAcreditable = 0
If UsuarioActual.Empresa.ContaContabilizacionNC = 1 Then
If 1 = 1 Then
TipoCambioCompra = TipoCambioCompra * -1 'cuando el movimiento de las nc, sea <> cero, quiero decir que solo convertimos a negativos los valores
TipoCambioPago = TipoCambioPago * -1
TipoCambioFechaCompra = TipoCambioFechaCompra * -1
@@ -1301,9 +1301,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
If UsuarioActual.CveEmpresa = 66 Then
FluctuacionCambiariaIVA = Math.Round((IVAAcreditable * TipoCambioFechaCompra) - (IVAAcreditable * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE IVA
If FluctuacionCambiariaIVA < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
If Math.Abs(FluctuacionCambiariaIVA) <> 0 Then
If Not Conta.AddMovimiento(IDPoliza, CtaFluctuacion, tempMovto, Math.Abs(FluctuacionCambiariaIVA), gvrc.FCHiddenField("HdnSerieFolio").Value, "Fluctuación IVA " & ConceptoDetalle, 0, Fecha, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), 0) Then MsgError = "No se pudo insertar movimiento contable" : Exit For ' no lleva moneda extranjera
@@ -1320,9 +1320,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
If Dif < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)

View File

@@ -344,7 +344,7 @@ Partial Class Contabilidad_DiarioCompras
If gvr.DataKey("TipoDocto") = "NC" Then
If UsuarioActual.Empresa.ContaContabilizacionNC <> 0 Then
If 1 <> 0 Then
'cuando el movimiento de las nc, sea <> cero, quiero decir que solo convertimos a negativos los valores
MultNC = -1
Else

View File

@@ -697,7 +697,7 @@ Partial Class Contabilidad_DiarioPagos
If gvrc.FCHiddenField("HdnTipoDocto").Value = "NC" Then
If UsuarioActual.Empresa.ContaContabilizacionNC = 1 Then
If 1 = 1 Then
TipoCambioCompra = TipoCambioCompra * -1 'cuando el movimiento de las nc, sea <> cero, quiero decir que solo convertimos a negativos los valores
TipoCambioPago = TipoCambioPago * -1
TipoCambioFechaCompra = TipoCambioFechaCompra * -1
@@ -1054,9 +1054,9 @@ Partial Class Contabilidad_DiarioPagos
If UsuarioActual.CveEmpresa = 66 Then
FluctuacionCambiariaIVA = Math.Round((IVAAcreditable * TipoCambioFechaCompra) - (IVAAcreditable * TipoCambioPago), 2) 'FLUCTUACION CAMBIARIA DE IVA
If FluctuacionCambiariaIVA < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
If Math.Abs(FluctuacionCambiariaIVA) <> 0 Then
If Not Conta.AddMovimiento(IDPoliza, CtaFluctuacion, tempMovto, Math.Abs(FluctuacionCambiariaIVA), gvrc.FCHiddenField("HdnSerieFolio").Value, "Fluctuación IVA " & ConceptoDetalle, IdSegNeg, Fecha, gvr.DataKey("CveProveedor").ContaReferencia(TipoContaReferencia.Proveedor), 0) Then MsgError = "No se pudo insertar movimiento contable" : Exit For ' no lleva moneda extranjera
@@ -1073,9 +1073,9 @@ Partial Class Contabilidad_DiarioPagos
If Dif < 0 Then
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaGananciaCambiaria : tempMovto = True ' ganancia cambiaria
tempMovto = True ' ganancia cambiaria
Else
CtaFluctuacion = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria : tempMovto = False ' perdida cambiaria
tempMovto = False ' perdida cambiaria
End If
ConceptoDetalle = String.Format("{0} TC:{1} ${2}", gvr.FCTextBox("TxtDescripcion").Text, TipoCambioPago, Math.Abs(Dif).FormatoNumero)

View File

@@ -74,19 +74,6 @@ Partial Class RepCuadreContaAdmon
Case 8 'Ant Proveedores
Return 204
Case 9 'IVA x Acreditar
Return UsuarioActual.Empresa.IdCuentaIVAxAcreditar
Case 10 'IVA Acreditado
Return UsuarioActual.Empresa.IdCuentaIVAAcreditable
Case 11 'IVA x Trasladar
Return UsuarioActual.Empresa.IdCuentaIVAxTrasladar
Case 12 'IVA Trasladado
Return UsuarioActual.Empresa.IdCuentaIVATrasladado
Case 13 'Ingresos
Return 222

View File

@@ -83,18 +83,6 @@ Partial Class RepCuadreContaAdmonDetalle
Case 8 'Ant Proveedores
Return 204
Case 9 'IVA x Acreditar
Return UsuarioActual.Empresa.IdCuentaIVAxAcreditar
Case 10 'IVA Acreditado
Return UsuarioActual.Empresa.IdCuentaIVAAcreditable
Case 11 'IVA x Trasladar
Return UsuarioActual.Empresa.IdCuentaIVAxTrasladar
Case 12 'IVA Trasladado
Return UsuarioActual.Empresa.IdCuentaIVATrasladado
Case 13 'Ingresos
Return 222

View File

@@ -790,17 +790,12 @@ Partial Class Contratos_FacturacionMasiva
End If
importeMovimiento = 0
Case 13 'Iva por Trasladar
importeMovimiento = ObjFactura.IVA * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
End Select
If importeMovimiento <> 0 Then

View File

@@ -867,7 +867,6 @@ Partial Class Inventarios_Remanufactura
importeMovimiento = ObjFactura.IVA * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
Case 38 'IEPS por Trasladar

View File

@@ -156,7 +156,7 @@ Partial Class Nomina_ReportePTU
If Not IsNothing(rowc) Then
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
Else
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1)
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, -1)
End If
If CveConcepto < 1 Then
continuar = False

View File

@@ -888,7 +888,6 @@ Partial Class Ventas_PortalCliente
importeMX = importeMX.RoundSQL()
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 61 'IVA TRASLADADO
@@ -905,7 +904,6 @@ Partial Class Ventas_PortalCliente
importeMX = importeMX.RoundSQL()
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 8 'RETIVA X TRASLADAR
@@ -1024,7 +1022,6 @@ Partial Class Ventas_PortalCliente
importeMX = importeMX.RoundSQL()
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 39 'IEPS TRASLADADO
@@ -1041,13 +1038,11 @@ Partial Class Ventas_PortalCliente
importeMX = importeMX.RoundSQL()
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 64 'GANANCIA
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1062,7 +1057,6 @@ Partial Class Ventas_PortalCliente
Case 65 'PERDIDA
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)

View File

@@ -340,93 +340,93 @@ Partial Class Sistemas_Empresa
CargaCuentasContables()
CargaDDLs()
Dim Row As DataRow
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxAcreditar.ToString))
If Not IsNothing(Row) Then
DdlIVAxAcreditar.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAxAcreditar.ToString))
DdlIVAxAcreditar.SelectedValue = .IdCuentaIVAxAcreditar.ToString
End If
'Dim Row As DataRow
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxAcreditar.ToString))
'If Not IsNothing(Row) Then
' DdlIVAxAcreditar.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAxAcreditar.ToString))
' DdlIVAxAcreditar.SelectedValue = .IdCuentaIVAxAcreditar.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAAcreditable.ToString))
If Not IsNothing(Row) Then
DdlIVAAcreditable.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAAcreditable.ToString))
DdlIVAAcreditable.SelectedValue = .IdCuentaIVAAcreditable.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAAcreditable.ToString))
'If Not IsNothing(Row) Then
' DdlIVAAcreditable.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAAcreditable.ToString))
' ' DdlIVAAcreditable.SelectedValue = .IdCuentaIVAAcreditable.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString))
If Not IsNothing(Row) Then
DdlIVAxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIVAxTrasladar.ToString))
DdlIVAxTrasladar.SelectedValue = .IdCuentaIVAxTrasladar.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString))
'If Not IsNothing(Row) Then
' DdlIVAxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIVAxTrasladar.ToString))
' DdlIVAxTrasladar.SelectedValue = .IdCuentaIVAxTrasladar.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString))
If Not IsNothing(Row) Then
DdlIVATrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIVATrasladado.ToString))
DdlIVATrasladado.SelectedValue = .IdCuentaIVATrasladado.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString))
'If Not IsNothing(Row) Then
' DdlIVATrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIVATrasladado.ToString))
' DdlIVATrasladado.SelectedValue = .IdCuentaIVATrasladado.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString))
If Not IsNothing(Row) Then
DdlIVARetenciones.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetIVACirculacion.ToString))
DdlIVARetenciones.SelectedValue = .IdCuentaRetIVACirculacion.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString))
'If Not IsNothing(Row) Then
' DdlIVARetenciones.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetIVACirculacion.ToString))
' DdlIVARetenciones.SelectedValue = .IdCuentaRetIVACirculacion.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString))
If Not IsNothing(Row) Then
DdlISRCirculacion.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetISRCirculacion.ToString))
DdlISRCirculacion.SelectedValue = .IdCuentaRetISRCirculacion.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString))
'If Not IsNothing(Row) Then
' DdlISRCirculacion.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetISRCirculacion.ToString))
' DdlISRCirculacion.SelectedValue = .IdCuentaRetISRCirculacion.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString))
If Not IsNothing(Row) Then
DdlCuentaPerdidaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaPerdidaCambiaria.ToString))
DdlCuentaPerdidaCambiaria.SelectedValue = .IdCuentaPerdidaCambiaria.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString))
'If Not IsNothing(Row) Then
' DdlCuentaPerdidaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaPerdidaCambiaria.ToString))
' DdlCuentaPerdidaCambiaria.SelectedValue = .IdCuentaPerdidaCambiaria.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString))
If Not IsNothing(Row) Then
DddlCuentaGananciaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaGananciaCambiaria.ToString))
DddlCuentaGananciaCambiaria.SelectedValue = .IdCuentaGananciaCambiaria.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString))
'If Not IsNothing(Row) Then
' DddlCuentaGananciaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaGananciaCambiaria.ToString))
' DddlCuentaGananciaCambiaria.SelectedValue = .IdCuentaGananciaCambiaria.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString))
If Not IsNothing(Row) Then
DdlDSV.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString))("CtaCodigo").ToString, .IdCuentaDSV.ToString))
DdlDSV.SelectedValue = .IdCuentaDSV.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString))
'If Not IsNothing(Row) Then
' DdlDSV.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString))("CtaCodigo").ToString, .IdCuentaDSV.ToString))
' DdlDSV.SelectedValue = .IdCuentaDSV.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString))
If Not IsNothing(Row) Then
DdlImpuestosLocales.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString))("CtaCodigo").ToString, .IdCuentaImpuestosLocales.ToString))
DdlImpuestosLocales.SelectedValue = .IdCuentaImpuestosLocales.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString))
'If Not IsNothing(Row) Then
' DdlImpuestosLocales.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString))("CtaCodigo").ToString, .IdCuentaImpuestosLocales.ToString))
' DdlImpuestosLocales.SelectedValue = .IdCuentaImpuestosLocales.ToString
'End If
'NUEVOS DATOS
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString))
If Not IsNothing(Row) Then
DdlIEPSxAcreditar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxAcreditar.ToString))
DdlIEPSxAcreditar.SelectedValue = .IdCuentaIEPSxAcreditar.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString))
'If Not IsNothing(Row) Then
' DdlIEPSxAcreditar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxAcreditar.ToString))
' DdlIEPSxAcreditar.SelectedValue = .IdCuentaIEPSxAcreditar.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString))
If Not IsNothing(Row) Then
DdlIEPSAcreditable.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString))("CtaCodigo").ToString, .IdCuentaIEPSAcreditable.ToString))
DdlIEPSAcreditable.SelectedValue = .IdCuentaIEPSAcreditable.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString))
'If Not IsNothing(Row) Then
' DdlIEPSAcreditable.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString))("CtaCodigo").ToString, .IdCuentaIEPSAcreditable.ToString))
' DdlIEPSAcreditable.SelectedValue = .IdCuentaIEPSAcreditable.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString))
If Not IsNothing(Row) Then
DdlIEPSxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxTrasladar.ToString))
DdlIEPSxTrasladar.SelectedValue = .IdCuentaIEPSxTrasladar.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString))
'If Not IsNothing(Row) Then
' DdlIEPSxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxTrasladar.ToString))
' DdlIEPSxTrasladar.SelectedValue = .IdCuentaIEPSxTrasladar.ToString
'End If
Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString))
If Not IsNothing(Row) Then
DdlIEPSTrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIEPSTrasladado.ToString))
DdlIEPSTrasladado.SelectedValue = .IdCuentaIEPSTrasladado.ToString
End If
'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString))
'If Not IsNothing(Row) Then
' DdlIEPSTrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIEPSTrasladado.ToString))
' DdlIEPSTrasladado.SelectedValue = .IdCuentaIEPSTrasladado.ToString
'End If
End If
@@ -665,7 +665,7 @@ Partial Class Sistemas_Empresa
Next
End If
GlobalDTClasificacionPorcentaje(CveEmpresa) = Nothing
' GlobalDTClasificacionPorcentaje(CveEmpresa) = Nothing
End If

View File

@@ -193,7 +193,7 @@ Partial Class CatMetasVendedores
DtExcel.Rows.Add(dr)
Next
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim FileExcel As New ExcelFile()
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)

View File

@@ -2504,11 +2504,11 @@ Partial Class Ventas_ClientesAbonar
End If
If TCPago > TCVenta Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
@@ -2525,12 +2525,11 @@ Partial Class Ventas_ClientesAbonar
Dim IdCtaIVAXTrasladar As Integer = 0
Dim CveCuentaIVAxTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAxTrasladar").ToString.ToEntero
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
' CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAxTrasladar").ToString.ToEntero
'End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
@@ -2540,7 +2539,6 @@ Partial Class Ventas_ClientesAbonar
MsgError = "Ocurrio un error al saldar el movimiento"
End If
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If

View File

@@ -13863,10 +13863,10 @@ Partial Class Ventas
SeContabiliza = False
End If
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString().ToEntero()
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
' IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
' IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString().ToEntero()
'End If
Dim UsaComplementariaClientes As Boolean = True
@@ -14237,14 +14237,12 @@ Partial Class Ventas
If IngresoIVA > 0 Then
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
Exit For
End If
'IVA PAGADO
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
@@ -14256,14 +14254,14 @@ Partial Class Ventas
If IngresoIEPS > 0 Then
'IEPS X TRASLADAR
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, 0, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
'IEPS PAGADO
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, 0, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
@@ -14320,11 +14318,9 @@ Partial Class Ventas
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL)
@@ -14430,11 +14426,9 @@ Partial Class Ventas
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL)
@@ -14791,30 +14785,30 @@ Partial Class Ventas
' If UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
'For i = 0 To TmpDTDetalle.Rows.Count - 1
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097", "24479") Then
'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
' Else
' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
' End If
' 'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
' ' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
' ' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
' ' Else
' ' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
' ' End If
' Else
' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
' End If
' ' Else
' ' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
' ' End If
'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows(0)("CveClasificacion").ToString()
End If
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows.Count > 0 Then
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows(0)("CveClasificacion").ToString()
' End If
End If
' End If
Next
'Next
' End If
@@ -14864,23 +14858,23 @@ Partial Class Ventas
Dim CveVentaAplicar = ObjFactura.CveVenta
Dim CveVentaAmortizacionAplicar = -1
If UsuarioActual.CveEmpresa = 119 Then
'If UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
' For i = 0 To TmpDTDetalle.Rows.Count - 1
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString()
End If
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString()
' End If
End If
' End If
Next
' Next
End If
'End If
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
@@ -15091,13 +15085,8 @@ Partial Class Ventas
ConceptoContable = 61
importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Else
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
End If
CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
End If
@@ -15246,13 +15235,10 @@ Partial Class Ventas
End If
If ObjFactura.IVA <> 0 Then
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
'IVA X TRASLADAR
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
@@ -15260,7 +15246,6 @@ Partial Class Ventas
End If
'IVA PAGADO
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
@@ -15268,21 +15253,19 @@ Partial Class Ventas
End If
End If
If ObjFactura.IEPS <> 0 Then
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIEPS").ToDecimal
'IEPS X TRASLADAR
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, 0, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
Exit For
End If
'IEPS PAGADO
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, 0, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
ErrorPrepoliza = True
Exit For
End If
@@ -16969,17 +16952,17 @@ Partial Class Ventas
Dim FechaMovimiento As Date = Now
Dim Concepto As String = ViewState("VentaFolio").ToString()
Dim PrePolizaCorrecta = True
Dim PorcentajeImpuesto As Decimal = 0
' Dim PorcentajeImpuesto As Decimal = 0
Dim IdCtaIVAXTrasladar As Integer = 0
'13 Iva x Trasladar
ImporteMovimiento = Importe13 * PorcentajeAmortizacion
ImporteMX = Math.Round(ImporteMovimiento, 2) * TipoCambio
PorcentajeImpuesto = TmpDT.MAX("PorcentajeIVA").ToDecimal
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
'PorcentajeImpuesto = TmpDT.MAX("PorcentajeIVA").ToDecimal
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
'End If
'IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
' CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
If ImporteMovimiento > 0 Then
@@ -16989,7 +16972,7 @@ Partial Class Ventas
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX) Then
PrePolizaCorrecta = False
End If
End If
@@ -17066,11 +17049,10 @@ Partial Class Ventas
ImporteMovimiento = TxtIVA.Text.ToDecimal * PorcentajeAmortizacion
ImporteMX = Math.Round(ImporteMovimiento * TipoCambio, 2)
PorcentajeImpuesto = TmpDT.MAX("PorcentajeIVA").ToDecimal
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString().ToEntero()
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString().ToEntero()
' CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
'End If
'CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
If ImporteMovimiento > 0 Then
@@ -27397,11 +27379,11 @@ Partial Class Ventas
Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
If TCPago > TCVenta Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), SerieFolio, 64, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), SerieFolio, 64, ConceptoPartida, FechaPago, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), SerieFolio, 65, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), SerieFolio, 65, ConceptoPartida, FechaPago, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
@@ -27413,15 +27395,14 @@ Partial Class Ventas
Dim IdCtaIVAXTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString().ToEntero()
'End If
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, SerieFolio, 13, ConceptoPartida, FechaPago, IdCtaIVAXTrasladar, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=If(tCveMoneda = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, SerieFolio, 38, ConceptoPartida, FechaPago, IdCtaContable, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=If(tCveMoneda = 1, IEPS, IEPS * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If