diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb
index 5b34123a5..8540c06cf 100644
--- a/App_Code/ClsContratos.vb
+++ b/App_Code/ClsContratos.vb
@@ -2985,7 +2985,7 @@ Public Class ClsContratos
End Function
- Public Function AddPresupuestosDetalle(CvePresupuesto As Integer, CveClasificacion As Integer, CveTipoGasto As Integer, Importe As Decimal, Observacion As String) As Boolean
+ Public Function AddPresupuestosDetalle(CvePresupuesto As Integer, CveClasificacion As Integer, CveTipoGasto As Integer, Importe As Decimal, Observacion As String, Optional CveConceptoContableNom As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_PresupuestosDetalleAdd")
@@ -2996,6 +2996,7 @@ Public Class ClsContratos
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
+ .Add("@CveConceptoContableNom", SqlDbType.Int).Value = CveConceptoContableNom
End With
Try
@@ -3029,7 +3030,7 @@ Public Class ClsContratos
Return Retorno
End Function
- Public Function UpdatePresupuestosDetalle(CvePresupuestoDetalle As Integer, CveClasificacion As Integer, ImporteVigente As Decimal, Observacion As String) As Boolean
+ Public Function UpdatePresupuestosDetalle(CvePresupuestoDetalle As Integer, CveClasificacion As Integer, ImporteVigente As Decimal, Observacion As String, Optional CveConceptoContableNom As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_PresupuestosDetalleUpdate")
@@ -3039,6 +3040,7 @@ Public Class ClsContratos
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@ImporteVigente", SqlDbType.Money).Value = ImporteVigente
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
+ .Add("@CveConceptoContableNom", SqlDbType.Int).Value = CveConceptoContableNom
End With
Try
@@ -3068,7 +3070,7 @@ Public Class ClsContratos
End Try
Return Retorno
End Function
- Public Function GetPresupuestosRep(CvePresupuesto As Integer, CveTipoGasto As Integer, Agrupador As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveUsuarioConsulta As Integer, CveClasificacion As Integer) As Boolean
+ Public Function GetPresupuestosRep(CvePresupuesto As Integer, CveTipoGasto As Integer, Agrupador As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveUsuarioConsulta As Integer, CveAgrupador As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_PresupuestosRep")
@@ -3082,7 +3084,7 @@ Public Class ClsContratos
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
- .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+ .Add("@CveAgrupador", SqlDbType.Int).Value = CveAgrupador
End With
Try
@@ -3121,7 +3123,7 @@ Public Class ClsContratos
Return Retorno
End Function
- Public Function GetPresupuestosRepDetalle(CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveTipoGasto As Integer, Agrupador As Integer, Gpo As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
+ Public Function GetPresupuestosRepDetalle(CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveTipoGasto As Integer, Agrupador As Integer, Gpo As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveUsuario As Integer, Optional CveConceptoContableNom As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_PresupuestosRepDetalle")
@@ -3129,6 +3131,7 @@ Public Class ClsContratos
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+ .Add("@CveConceptoContableNom", SqlDbType.Int).Value = CveConceptoContableNom
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
.Add("@Agrupador", SqlDbType.Int).Value = Agrupador
.Add("@Gpo", SqlDbType.Int).Value = Gpo
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 4019544a7..a2a76e664 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -605,7 +605,12 @@ Public Class ClsNominas
End If
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al registrar la provisión de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ If ex.Message.Contains("No se puede registrar una prepóliza en un periodo cerrado") Then
+ OnError("No se puede registrar la provisión, periodo contable cerrado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Else
+ OnError("Ocurrió un error al registrar la provisión de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+
+ End If
End Try
Return retorno
End Function
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index eb20408ad..96d4d0143 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -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}"
@@ -6326,6 +6326,10 @@ Public Class ClsPaginas
Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
lrds.Add(rds4)
If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimulsoft Then
+ If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
+ params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
+ End If
+
If Vta.DtDocumentosRelacionados IsNot Nothing AndAlso Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
params.Add(New ReportParameter("TieneDocumentosRelacionados", "True"))
Else
@@ -7321,6 +7325,7 @@ Public Class ClsPaginas
Dim Importe = ""
Dim TotalLetra = ""
Dim FechaRecibo = ""
+ Dim ProveedorIntermediario As String = ""
Dim RegimenFiscalCodigo As String = ""
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
@@ -7385,6 +7390,7 @@ Public Class ClsPaginas
CveCliente = ObjBancos.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero
CveMoneda = ObjBancos.DtResultados.FiltroPrimeroValor("CveMoneda").ToEntero
FechaComprobante = ObjBancos.DtResultados.FiltroPrimeroValor("Fecha").ToDate
+ ProveedorIntermediario = ObjBancos.DtResultados.FiltroPrimeroValor("ProveedorIntermediario")
SerieFolio = $"{Serie}-{Folio}"
End If
ObjBancos.Dispose()
@@ -7628,6 +7634,11 @@ Public Class ClsPaginas
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
+
+ If UsuarioActual.CveEmpresa = 145 Then
+ params.Add(New ReportParameter("ProveedorIntermediario", ProveedorIntermediario))
+ End If
+
If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then
rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc"
Else
@@ -7772,9 +7783,10 @@ Public Class ClsPaginas
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
End If
End If
+
'si tiene otros gastos/ingresos
- ImporteMovimiento = Pago.OtroGastoIngreso
- If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then
+ If Not ErrorMovtos AndAlso Pago.OtroGastoIngreso <> 0 Then
+ ImporteMovimiento = (Pago.OtroGastoIngreso * If(Pago.CveMonedaPago = 1, 1, Pago.TCPago)).RoundSQL ' cuando hay pagos en diferente moneda hay TC en ambos lados
Dim tOtCveCon As Integer = 211
Dim tOtTipoMovto As Boolean = False
Dim IdCta As Integer = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.Funcionalidad(266).ToEntero(), 0)
@@ -7834,10 +7846,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
@@ -7913,18 +7925,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
@@ -8283,8 +8295,9 @@ Public Class ClsPaginas
End If
End If
'si tiene otros gastos/ingresos
- ImporteMovimiento = Pago.OtroGastoIngreso
- If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then
+
+ If Not ErrorMovtos AndAlso Pago.OtroGastoIngreso <> 0 Then
+ ImporteMovimiento = (Pago.OtroGastoIngreso * If(Pago.CveMonedaPago = 1, 1, Pago.TCPago)).RoundSQL ' cuando hay pagos en diferente moneda hay TC en ambos lados
Dim tOtCveCon As Integer = 78
Dim tOtTipoMovto As Boolean = True
If ImporteMovimiento < 0 Then
@@ -8300,10 +8313,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
diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb
index 2ca94fb56..97542eac4 100644
--- a/App_Code/ClsSisEmpresas.vb
+++ b/App_Code/ClsSisEmpresas.vb
@@ -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
diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb
index 666880f07..de0648139 100644
--- a/App_Code/Empresa.vb
+++ b/App_Code/Empresa.vb
@@ -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
diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index 640d0d915..7033ba0c5 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -158,8 +158,13 @@ Public Class LogicNominas
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
CvePersonal = drow("CvePersonal").ToString().ToEntero()
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
- totalDb = drow("Total").ToString().ToDecimal()
- subTotalDb = drow("SubTotal").ToString().ToDecimal()
+ If TimbreIndemnizacion Then
+ totalDb = drow("TotalFin").ToString().ToDecimal()
+ subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
+ Else
+ totalDb = drow("Total").ToString().ToDecimal()
+ subTotalDb = drow("SubTotal").ToString().ToDecimal()
+ End If
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
Serie = objNomina.Serie
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 888460422..26c66ef60 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -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
diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb
index d56227c77..4ed591cec 100644
--- a/App_Code/Timbres.vb
+++ b/App_Code/Timbres.vb
@@ -1,176 +1,176 @@
-Imports System.Data
-Imports Extensiones
-
-Public Class Timbres
- Private _MsgError As StringBuilder
- Private _MensajeAlert As StringBuilder
- Public Property TieneError As Boolean
- Public ReadOnly Property MsgError As String
- Get
- Return _MsgError.ToString
- End Get
- End Property
-
- Public ReadOnly Property MensajeAlert As String
- Get
- Return _MensajeAlert.ToString
- End Get
- End Property
-
- Private Property CveMovimiento As Integer
- Private Property UsuarioActual As Usuario
- Private Property AplicaCP As Boolean
- Private Property FechaSalida As Date
- Private Property Serie As String
- Private Property Folio As Integer
- Private Property CveTimbre As Integer
-
- Private Property CPCliente As Integer
- Public Property ObjFactura As Modelos.Factura
-
- Public Sub New()
-
- End Sub
-
- Public Sub New(TipoDocto As String, tCveTimbre As Integer, tUsuarioActual As Usuario)
- _MsgError = New StringBuilder
- UsuarioActual = tUsuarioActual
- CveTimbre = tCveTimbre
- CreaObjetosTraslados(TipoDocto, tCveTimbre)
- End Sub
-
-
- Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
+Imports System.Data
+Imports Extensiones
+
+Public Class Timbres
+ Private _MsgError As StringBuilder
+ Private _MensajeAlert As StringBuilder
+ Public Property TieneError As Boolean
+ Public ReadOnly Property MsgError As String
+ Get
+ Return _MsgError.ToString
+ End Get
+ End Property
+
+ Public ReadOnly Property MensajeAlert As String
+ Get
+ Return _MensajeAlert.ToString
+ End Get
+ End Property
+
+ Private Property CveMovimiento As Integer
+ Private Property UsuarioActual As Usuario
+ Private Property AplicaCP As Boolean
+ Private Property FechaSalida As Date
+ Private Property Serie As String
+ Private Property Folio As Integer
+ Private Property CveTimbre As Integer
+
+ Private Property CPCliente As Integer
+ Public Property ObjFactura As Modelos.Factura
+
+ Public Sub New()
+
+ End Sub
+
+ Public Sub New(TipoDocto As String, tCveTimbre As Integer, tUsuarioActual As Usuario)
+ _MsgError = New StringBuilder
+ UsuarioActual = tUsuarioActual
+ CveTimbre = tCveTimbre
+ CreaObjetosTraslados(TipoDocto, tCveTimbre)
+ End Sub
+
+
+ Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
ObjFactura = New Modelos.Factura
- ObjFactura.Version = "3.3"
+ ObjFactura.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
- ObjFactura.CveUsuario = UsuarioActual.CveUsuario
- ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
- ObjFactura.UsuarioActual = UsuarioActual
- 'ObjFactura.TipoCambio = 1
- ObjFactura.ConvertirPesos = False
- ObjFactura.CveMoneda = 1
- ObjFactura.Moneda = "XXX"
- ObjFactura.MonedaSAT = "XXX"
- ObjFactura.MonedaAbreviatura = "XXX"
- ObjFactura.TipoDocto = TipoDocto
- ObjFactura.TipoComprobante = "T"
-
- ObjFactura.Fecha = Now
- ObjFactura.FechaPago = Now
- ObjFactura.FechaEjecucion = Now
- ObjFactura.UsuarioCreo = UsuarioActual.Usuario
- ObjFactura.TipoDocumento = "Traspaso"
-
-
- ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
-
- ObjFactura.Inv_CveMovimiento = CveMovimiento
- ObjFactura.CveTimbre = CveTimbre
-
- If CveTimbre > 0 AndAlso ObjFactura.TipoComprobante = "T" Then
-
- ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
-
- End If
-
- End Sub
-
- Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
- Dim Timbre As New CFDITimbre
- Timbre.Comprobante.TipoComprobante = "T"
- Timbre.Comprobante.Fecha = Obj.Fecha
- Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
- Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
- Timbre.Comprobante.SubTotal = Obj.SubTotal
- Timbre.Comprobante.Descuentos = Obj.Descuento
- Timbre.Comprobante.Moneda = "XXX"
+ ObjFactura.CveUsuario = UsuarioActual.CveUsuario
+ ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
+ ObjFactura.UsuarioActual = UsuarioActual
+ 'ObjFactura.TipoCambio = 1
+ ObjFactura.ConvertirPesos = False
+ ObjFactura.CveMoneda = 1
+ ObjFactura.Moneda = "XXX"
+ ObjFactura.MonedaSAT = "XXX"
+ ObjFactura.MonedaAbreviatura = "XXX"
+ ObjFactura.TipoDocto = TipoDocto
+ ObjFactura.TipoComprobante = "T"
+
+ ObjFactura.Fecha = Now
+ ObjFactura.FechaPago = Now
+ ObjFactura.FechaEjecucion = Now
+ ObjFactura.UsuarioCreo = UsuarioActual.Usuario
+ ObjFactura.TipoDocumento = "Traspaso"
+
+
+ ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
+
+ ObjFactura.Inv_CveMovimiento = CveMovimiento
+ ObjFactura.CveTimbre = CveTimbre
+
+ If CveTimbre > 0 AndAlso ObjFactura.TipoComprobante = "T" Then
+
+ ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
+
+ End If
+
+ End Sub
+
+ Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
+ Dim Timbre As New CFDITimbre
+ Timbre.Comprobante.TipoComprobante = "T"
+ Timbre.Comprobante.Fecha = Obj.Fecha
+ Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
+ Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
+ Timbre.Comprobante.SubTotal = Obj.SubTotal
+ Timbre.Comprobante.Descuentos = Obj.Descuento
+ Timbre.Comprobante.Moneda = "XXX"
Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
Timbre.Receptor.UsoCFDI = "S01"
- If ObjFactura.Version = "3.3" Then Timbre.Receptor.UsoCFDI = "P01"
-
- Dim totSubTotal As Decimal = Obj.SubTotal
- Dim totIVA As Decimal = Obj.IVA
- Dim totRetIVA As Decimal = Obj.RetIVA
- Dim totRetISR As Decimal = Obj.RetISR
- Dim i As Integer = 1
-
-
- Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
-
-
- 'DETALLES
- Dim tPS As String = ""
-
- Dim CartaPorte As New CFDICartaPorte
- CartaPorte.TranspInternac = "No"
- CartaPorte.EntradaSalidaMercancia = ""
- CartaPorte.ViaEntradaSalida = ""
-
- CartaPorte.Mercancias.UnidadPeso = "KGM"
- CartaPorte.Mercancias.CargoporTasacion = 0
-
- Dim FI As Date = New Date(1900, 1, 1)
- Dim FF As Date = New Date(9999, 1, 1)
-
- Dim FechaLlegada As DateTime
- Dim Distancia As Integer = 1
-
- Dim ObjGrales As New ClsGenerales
-
- If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
-
- If ObjGrales.DtResultados.Rows.Count = 1 Then
- Dim DtMovimientos As DataTable = Nothing
- Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
-
- Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
- Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
- Timbre.Receptor.DomicilioFiscalReceptor = drT("DomicilioFiscalReceptor").ToString
- Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
-
- CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
- FechaSalida = drT("FechaEntrega").ToString.ToDateTime
- FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
- Distancia = drT("Distancia").ToString.ToEntero
-
- ObjFactura.Folio = drT("Folio").ToString.ToEntero
- ObjFactura.Serie = drT("Serie").ToString
- Timbre.Comprobante.Serie = Obj.Serie
- Timbre.Comprobante.Folio = Obj.Folio.ToString
-
- If drT("FolioFiscalRelacionado").ToString <> "" Then
-
- Timbre.CFDIRelacionados.TipoRelacion = "05"
- Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
-
- End If
-
- If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
- DtMovimientos = ObjGrales.DtResultados
- Else
- TieneError = True
- _MsgError.AppendLine("Error al obtener Movimientos")
- End If
-
- ObjFactura.DtDetalle = DtMovimientos
-
- AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
-
- ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
-
- ObjFactura.SetSubProyecto()
- ObjFactura.SetSubProyectoMatriz()
-
- If AplicaCP Then
-
- CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
- CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
-
+ If ObjFactura.Version = "3.3" Then Timbre.Receptor.UsoCFDI = "P01"
+
+ Dim totSubTotal As Decimal = Obj.SubTotal
+ Dim totIVA As Decimal = Obj.IVA
+ Dim totRetIVA As Decimal = Obj.RetIVA
+ Dim totRetISR As Decimal = Obj.RetISR
+ Dim i As Integer = 1
+
+
+ Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
+
+
+ 'DETALLES
+ Dim tPS As String = ""
+
+ Dim CartaPorte As New CFDICartaPorte
+ CartaPorte.TranspInternac = "No"
+ CartaPorte.EntradaSalidaMercancia = ""
+ CartaPorte.ViaEntradaSalida = ""
+
+ CartaPorte.Mercancias.UnidadPeso = "KGM"
+ CartaPorte.Mercancias.CargoporTasacion = 0
+
+ Dim FI As Date = New Date(1900, 1, 1)
+ Dim FF As Date = New Date(9999, 1, 1)
+
+ Dim FechaLlegada As DateTime
+ Dim Distancia As Integer = 1
+
+ Dim ObjGrales As New ClsGenerales
+
+ If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
+
+ If ObjGrales.DtResultados.Rows.Count = 1 Then
+ Dim DtMovimientos As DataTable = Nothing
+ Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
+
+ Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
+ Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
+ Timbre.Receptor.DomicilioFiscalReceptor = drT("DomicilioFiscalReceptor").ToString
+ Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
+
+ CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
+ FechaSalida = drT("FechaEntrega").ToString.ToDateTime
+ FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
+ Distancia = drT("Distancia").ToString.ToEntero
+
+ ObjFactura.Folio = drT("Folio").ToString.ToEntero
+ ObjFactura.Serie = drT("Serie").ToString
+ Timbre.Comprobante.Serie = Obj.Serie
+ Timbre.Comprobante.Folio = Obj.Folio.ToString
+
+ If drT("FolioFiscalRelacionado").ToString <> "" Then
+
+ Timbre.CFDIRelacionados.TipoRelacion = "05"
+ Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
+
+ End If
+
+ If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
+ DtMovimientos = ObjGrales.DtResultados
+ Else
+ TieneError = True
+ _MsgError.AppendLine("Error al obtener Movimientos")
+ End If
+
+ ObjFactura.DtDetalle = DtMovimientos
+
+ AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
+
+ ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
+
+ ObjFactura.SetSubProyecto()
+ ObjFactura.SetSubProyectoMatriz()
+
+ If AplicaCP Then
+
+ CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
+ CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
+
If Obj.DtDetalle IsNot Nothing AndAlso Obj.DtDetalle.Rows.Count > 0 Then
If Obj.DtDetalle.MAX("ClaveMaterialPeligroso") <> "" Then
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
@@ -178,43 +178,43 @@ Public Class Timbres
End If
End If
- CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
- CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
-
- If drT("ClaveTipoRemolque1").ToString <> "" Then
- Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
- CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
- End If
-
- If drT("ClaveTipoRemolque2").ToString <> "" Then
- Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
- CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
- End If
-
- Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
- DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
- .Colonia = drT("DirOriClaveSATColonia").ToString,
- .CP = drT("DirOriCP").ToString,
- .Estado = drT("DirOriClaveSATEstado").ToString,
- .Pais = drT("DirOriClaveSATPais").ToString,
- .Municipio = drT("DIrOriClaveSATMunicipio").ToString,
- .Localidad = drT("DirOriClaveSATLocalidad").ToString}
-
- Dim DomDestino As CFDICartaPorteDomicilio = Nothing
-
-
- DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString,
- .Colonia = drT("DirDesClaveSATColonia").ToString,
- .CP = drT("DirDesCP").ToString,
- .Estado = drT("DirDesClaveSATEstado").ToString,
- .Pais = drT("DirDesClaveSATPais").ToString,
- .Municipio = drT("DirDesClaveSATMunicipio").ToString,
- .Localidad = drT("DirDesClaveSATLocalidad").ToString}
-
- Dim NumRegIdTrib As String = ""
+ CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
+ CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
+
+ If drT("ClaveTipoRemolque1").ToString <> "" Then
+ Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
+ CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
+ End If
+
+ If drT("ClaveTipoRemolque2").ToString <> "" Then
+ Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
+ CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
+ End If
+
+ Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
+ DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
+ .Colonia = drT("DirOriClaveSATColonia").ToString,
+ .CP = drT("DirOriCP").ToString,
+ .Estado = drT("DirOriClaveSATEstado").ToString,
+ .Pais = drT("DirOriClaveSATPais").ToString,
+ .Municipio = drT("DIrOriClaveSATMunicipio").ToString,
+ .Localidad = drT("DirOriClaveSATLocalidad").ToString}
+
+ Dim DomDestino As CFDICartaPorteDomicilio = Nothing
+
+
+ DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString,
+ .Colonia = drT("DirDesClaveSATColonia").ToString,
+ .CP = drT("DirDesCP").ToString,
+ .Estado = drT("DirDesClaveSATEstado").ToString,
+ .Pais = drT("DirDesClaveSATPais").ToString,
+ .Municipio = drT("DirDesClaveSATMunicipio").ToString,
+ .Localidad = drT("DirDesClaveSATLocalidad").ToString}
+
+ Dim NumRegIdTrib As String = ""
Dim ResidenciaFiscal As String = ""
If drT("DestinatarioRFC").ToString.Contiene("XEXX010101000") Then ' cuando es Extranjero, debe de llevar un numregidtrib
ResidenciaFiscal = DomDestino.Pais
@@ -324,62 +324,62 @@ Public Class Timbres
'' T R A S L A D O S
'DETALLES
- If Obj.DtDetalle IsNot Nothing Then
- For Each drr As DataRow In Obj.DtDetalle.Rows
-
- If drr("PS").ToString.Length = 1 Then
- tPS = drr("Obs").ToString
- Else
- If drr("PS").ToString.Length = 0 Then
- tPS = ""
- Else
- tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
- End If
- End If
-
- 'CONDICIONANTE, ESPECIAL
- If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
-
- Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
- .Descripcion = tPS,
- .ValorUnitario = drr("PU").ToString.ToDecimal,
- .Importe = drr("TotalImporte").ToString.ToDecimal,
- .Descuento = drr("Descuento").ToString.ToDecimal,
- .Unidad = drr("UM").ToString,
- .ClaveUnidad = drr("SATClaveUM").ToString,
- .ClaveProdServ = drr("SATClaveProdServ").ToString,
- .Noidentificacion = drr("Noidentificacion").ToString,
- .CuentaPredial = "",
- .ObjetoImpuesto = "01"}
- 'VERIFICA SUMA SUBTOTALES
- If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
- concepto.Importe = totSubTotal
- End If
- totSubTotal = totSubTotal - concepto.Importe
-
- Timbre.Conceptos.Add(concepto)
- i += 1
- Next
- Else
- TieneError = True
- _MsgError.AppendLine("timbrado son detalle de productos")
- End If
-
- End If
-
- Else
- TieneError = True
- _MsgError.AppendLine("Consultar datos de timbrado")
- End If
-
- ObjGrales.Dispose()
- Else
- Timbre = Nothing
- _MsgError.AppendLine("Consultar datos de timbrado")
- End If
- Return Timbre
- End Function
-
+ If Obj.DtDetalle IsNot Nothing Then
+ For Each drr As DataRow In Obj.DtDetalle.Rows
+
+ If drr("PS").ToString.Length = 1 Then
+ tPS = drr("Obs").ToString
+ Else
+ If drr("PS").ToString.Length = 0 Then
+ tPS = ""
+ Else
+ tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ End If
+ End If
+
+ 'CONDICIONANTE, ESPECIAL
+ If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
+
+ Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
+ .Descripcion = tPS,
+ .ValorUnitario = drr("PU").ToString.ToDecimal,
+ .Importe = drr("TotalImporte").ToString.ToDecimal,
+ .Descuento = drr("Descuento").ToString.ToDecimal,
+ .Unidad = drr("UM").ToString,
+ .ClaveUnidad = drr("SATClaveUM").ToString,
+ .ClaveProdServ = drr("SATClaveProdServ").ToString,
+ .Noidentificacion = drr("Noidentificacion").ToString,
+ .CuentaPredial = "",
+ .ObjetoImpuesto = "01"}
+ 'VERIFICA SUMA SUBTOTALES
+ If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
+ concepto.Importe = totSubTotal
+ End If
+ totSubTotal = totSubTotal - concepto.Importe
+
+ Timbre.Conceptos.Add(concepto)
+ i += 1
+ Next
+ Else
+ TieneError = True
+ _MsgError.AppendLine("timbrado son detalle de productos")
+ End If
+
+ End If
+
+ Else
+ TieneError = True
+ _MsgError.AppendLine("Consultar datos de timbrado")
+ End If
+
+ ObjGrales.Dispose()
+ Else
+ Timbre = Nothing
+ _MsgError.AppendLine("Consultar datos de timbrado")
+ End If
+ Return Timbre
+ End Function
+
Public Class MMensajeCartaPorte
Public Property TieneError As Boolean
Public Property Mensaje As String
@@ -633,4 +633,4 @@ Public Class Timbres
End Function
-End Class
+End Class
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index a8437e242..9b8998052 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -3975,6 +3975,7 @@ Namespace Extensiones
HeaderBar = New StringBuilder("
")
MenuHTML = New StringBuilder()
modpadres = New List(Of String)
+ headerstr = New List(Of String)
End Sub
Property CveModuloSeleccionado As Integer
@@ -3986,6 +3987,7 @@ Namespace Extensiones
Property ScriptColorGrupoModulo As String
Property strdomain As String
Property modpadres As List(Of String)
+ Property headerstr As List(Of String)
End Class
diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx
index 0bfb003be..7f6bf47cb 100644
--- a/Ashx/E141.ashx
+++ b/Ashx/E141.ashx
@@ -1851,7 +1851,8 @@ Public Class E141 : Implements IHttpHandler
New JProperty("short_description", ""),
New JProperty("description", ""),
New JProperty("currency", 1),
- New JProperty("promo_price", RowPS("PrecioPromocion"))
+ New JProperty("promo_price", RowPS("PrecioPromocion")),
+ New JProperty("product_related", RowPS("CodigosRelacionados"))
)
ArrayPS.Add(producto)
diff --git a/Bancos/DepositoTerminal.aspx.vb b/Bancos/DepositoTerminal.aspx.vb
index 1a4095086..aea73499c 100644
--- a/Bancos/DepositoTerminal.aspx.vb
+++ b/Bancos/DepositoTerminal.aspx.vb
@@ -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
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index 9bcabe81d..a3bf3ec35 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -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";
}
diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx
index c7634465c..db024ed8d 100644
--- a/Bancos/FluctuacionCambiaria.aspx
+++ b/Bancos/FluctuacionCambiaria.aspx
@@ -758,8 +758,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -806,17 +858,7 @@
-
-
-
-
-
-
-
-
+
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb
index 75f553751..ec1245098 100644
--- a/Bancos/FluctuacionCambiaria.aspx.vb
+++ b/Bancos/FluctuacionCambiaria.aspx.vb
@@ -36,6 +36,8 @@ Partial Class Bancos_FluctuacionCambiaria
CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreeedoresAnt, Nothing, LblSubProyectoAcreedoresAnt, "")
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "")
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "")
+ CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedoresDiversos, Nothing, LblSubProyectoAcreedoresDiversos, "")
+
CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores, "")
CargaUltimaFluctuacion()
@@ -66,6 +68,10 @@ Partial Class Bancos_FluctuacionCambiaria
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+ End Sub
+
+ Private Sub CargaDatos()
CargaTipoCambio()
If T.ActiveTabIndex = 0 Then CargaDatosProveedores()
If T.ActiveTabIndex = 1 Then CargaDatosProveedoresAnticipos()
@@ -77,7 +83,7 @@ Partial Class Bancos_FluctuacionCambiaria
If T.ActiveTabIndex = 7 Then CargaDatosAcreedoresDiversos() 'CargaDatosFiliales()
If T.ActiveTabIndex = 8 Then CargaDatosDeudores()
- UpTabs.Update()
+ UpTabs.Update()
End Sub
@@ -288,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
@@ -379,9 +386,17 @@ Partial Class Bancos_FluctuacionCambiaria
Private Sub CargaDatosAcreedoresDiversos()
Dim ObjBancos As New ClsBancos
LblTotalAcreedores.Text = "0.00"
- If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 88, UsuarioActual.CveEmpresa) Then
- GvAcreedorDiversos.DataSource = ObjBancos.DtResultados.FiltraParametros("Saldo > 0")
- LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
+ If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 88, UsuarioActual.CveEmpresa) Then
+ HdnAcreedoresDiversosCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
+ HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
+ BtnAcreedoresDiversosRemove.Visible = HdnAcreedoresDiversosCvePrePoliza.Value.ToEntero > 0
+ BtnGeneraAcreeedoresDiversos.Visible = Not HdnAcreedoresDiversosCvePrePoliza.Value.ToEntero > 0
+
+ HplAcreedoresDiversosPoliza.Visible = HdnAcreedoresDiversosCvePrePoliza.Value.ToEntero > 0
+ HplAcreedoresDiversosPoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
+
+ GvAcreedorDiversos.DataSource = ObjBancos.DtResultados
+ LblTotalAcreedoresDiversos.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
Else
GvAcreedorDiversos.DataSource = Nothing
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
@@ -413,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
@@ -493,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
@@ -577,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()
@@ -674,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()
@@ -780,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
@@ -869,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
@@ -952,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
@@ -1038,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
@@ -1102,8 +1101,8 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
- Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
- ObjContPaq.IniciaTransacSQL()
+ 'Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
+ 'ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoFiliales.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
@@ -1116,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
@@ -1157,9 +1154,6 @@ Partial Class Bancos_FluctuacionCambiaria
Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa)
End If
-
-
-
Next
If Not ErrorRegistrar Then
@@ -1168,28 +1162,96 @@ Partial Class Bancos_FluctuacionCambiaria
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta Then
- If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
+ If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Else
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
- End If
-
- If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
- 'Fin autoconta
+ End If
+
+ ' If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
+ 'Fin autoconta
Conta.Commit()
- Alert(String.Format("La Fluctuación se ha generado Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion)
+ Alert(String.Format("La Fluctuación se ha generado Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion)
Else
Conta.RollBack()
- ObjContPaq.RollBack()
+ 'ObjContPaq.RollBack()
End If
Conta.Dispose()
Banco.Dispose()
- ObjContPaq.Dispose()
+ 'ObjContPaq.Dispose()
End Sub
+
+
#End Region
+
+#Region "FLUCTUACION ACREEDORES DIVEROS"
+ Protected Sub BtnGeneraAcreeedoresDiversos_Click(sender As Object, e As EventArgs)
+
+ Dim Conta As New ClsContabilidad
+ Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
+ Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaAD", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedoresDiversos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ Dim CveConceptoContable As Integer
+ Dim TipoMovto As Boolean
+ Dim ErrorRegistrar As Boolean = False
+
+ Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
+ Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
+ Dim TotalAcumulado As Decimal = 0
+ Dim ConceptoFluctuacion As String = String.Format("Fluctuación Acreedores Diversos {0:d} ", FechaUltimoDiaMes)
+
+
+ For Each gvr As GridViewRow In GvAcreedorDiversos.Rows
+ TotalAcumulado += gvr.DataKey("Fluctuacion").ToDecimal
+ Next
+ 'TotalAcumulado = GvAcreedorDiversos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) Convert.ToDecimal(GvAcreedorDiversos.DataKeys(gvr.RowIndex)("Fluctuacion")))
+
+
+ If TotalAcumulado < 0 Then
+ CveConceptoContable = 64 : TipoMovto = True
+ Else
+ CveConceptoContable = 65 : TipoMovto = False
+ End If
+
+ 'saco las cuentas de pérdida y ganancia
+ For Each gvr As GridViewRow In GvAcreedorDiversos.Rows
+
+ If gvr.DataKey("Fluctuacion").ToDecimal <> 0 Then
+ 'movimiento de complementaria
+ If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, gvr.DataKey("Fluctuacion").ToDecimal, ConceptoFluctuacion, 351, ConceptoFluctuacion & gvr.DataKey("RazonSocial"), Now, 0, 0, TipoCambio:=TC, ImporteMX:=gvr.DataKey("Fluctuacion").ToDecimal, ImporteME:=gvr.DataKey("Fluctuacion").ToDecimal, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveSubProyecto:=DdlSubProyectoAcreedoresDiversos.SelectedValue.ToEntero) Then
+ ErrorRegistrar = True
+ Exit For
+ End If
+ End If
+
+ Next
+ If Not ErrorRegistrar Then
+
+ If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(TotalAcumulado), ConceptoFluctuacion, CveConceptoContable, ConceptoFluctuacion, Now, 0, 0, ImporteMX:=Math.Abs(TotalAcumulado), CveSubProyecto:=DdlSubProyectoAcreedoresDiversos.SelectedValue.ToEntero) Then
+ ErrorRegistrar = True
+ End If
+ End If
+
+ If Not ErrorRegistrar Then
+
+ If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 9, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+
+ Conta.Commit()
+
+ Alert(String.Format("La Fluctuación se ha generado Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion)
+ Else
+ Conta.RollBack()
+ 'ObjContPaq.RollBack()
+ End If
+ Conta.Dispose()
+ Banco.Dispose()
+ 'ObjContPaq.Dispose()
+ End Sub
+#End Region
#Region "GRIDVIEWS"
@@ -1236,7 +1298,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnProveedoresRemove.visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1251,7 +1313,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorAntCvePrePoliza.Value.ToEntero, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnProveedoresAntRemove.Visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1265,7 +1327,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteCvePrePoliza.Value.ToEntero, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnClientesRemove.Visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1279,7 +1341,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteAntCvePrePoliza.Value.ToEntero, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnClientesAntRemove.Visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1293,7 +1355,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorCvePrePoliza.Value.ToEntero, 5, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnAcreedoresRemove.Visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1307,7 +1369,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorAntCvePrePoliza.Value.ToEntero, 6, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnAcreedoresAntRemove.Visible = False
- Alert("Flucturación eliminada.")
+ Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
@@ -1352,4 +1414,19 @@ Partial Class Bancos_FluctuacionCambiaria
End Sub
#End Region
+
+ Protected Sub BtnAcreedoresDiversosRemove_Click(sender As Object, e As EventArgs)
+ Dim Banco As New ClsBancos
+ Banco.IniciaTransacSQL()
+
+ If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedoresDiversosCvePrePoliza.Value.ToEntero, 9, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ Banco.Commit()
+ BtnAcreedoresDiversosRemove.Visible = False
+ CargaDatos()
+ Alert("Fluctuación eliminada.")
+ Else
+ Banco.RollBack()
+ End If
+ Banco.Dispose()
+ End Sub
End Class
diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx
index a707d96a5..f7095185e 100644
--- a/Bancos/IE.aspx
+++ b/Bancos/IE.aspx
@@ -265,6 +265,7 @@
ClientesProveedorViáticos
+ Acreedor
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index d887529d1..a1c19340e 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -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
diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs
index 5dbf0ec6c..d7fb87350 100644
--- a/Bancos/PagoAcreedor.aspx.cs
+++ b/Bancos/PagoAcreedor.aspx.cs
@@ -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();
diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs
index 3a210032b..df9520fbd 100644
--- a/Bancos/PagoDeudor.aspx.cs
+++ b/Bancos/PagoDeudor.aspx.cs
@@ -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;
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb
index 33211d3ff..0b28dc305 100644
--- a/Bancos/PolizaCheque.aspx.vb
+++ b/Bancos/PolizaCheque.aspx.vb
@@ -108,7 +108,7 @@ Partial Class Bancos_PolizaCheque
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
Dim dt As DataTable = Nothing
- If UsuarioActual.Empresa.UsaContabilidad Then
+ If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
If Conta.GetCuentas(-1, "-1", 1) Then
@@ -118,6 +118,17 @@ Partial Class Bancos_PolizaCheque
End If
Conta.Dispose()
+ End If
+ If UsuarioActual.Empresa.TipoContabilidad = 1 Then
+ Dim Conta As New ClsContabilidad
+
+ If Conta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
+ dt = Conta.DtResultados
+ DtCuentasContables = Conta.DtResultados
+ Session("DtCuentas") = Conta.DtResultados
+ End If
+ Conta.Dispose()
+
End If
TipoPlantilla = 0
@@ -405,9 +416,8 @@ Partial Class Bancos_PolizaCheque
NombreCuenta = ""
If UsuarioActual.Empresa.UsaContabilidad Then
- 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 = 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
@@ -416,41 +426,43 @@ Partial Class Bancos_PolizaCheque
'Cuenta = drr("Nombre").ToString()
End If
EsComodin = 0
+ End If
+ 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))
-
- 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
+ IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
- ' Cuenta = drr("Nombre").ToString()
- EsComodin = 1
- Else
-
- ' Rad.Checked = False
- If UsuarioActual.CveEmpresa <> 126 Then
- Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
- GvMov.DataBind()
- UPMovs.Update()
- Exit Sub
- End If
-
+ 'Cuenta = drr("Nombre").ToString()
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
+ 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
- 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
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 0ee519115..28ee2316a 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -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)
diff --git a/Bancos/PrestamoPersonal.aspx b/Bancos/PrestamoPersonal.aspx
index 332b6e4ad..10daa5b36 100644
--- a/Bancos/PrestamoPersonal.aspx
+++ b/Bancos/PrestamoPersonal.aspx
@@ -115,18 +115,18 @@
-
+
-
+
-
+
-
+
<%--
@@ -137,18 +137,18 @@
-
+
-
+
-
+
-
+
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
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 008afe0f8..c4a1c727b 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -5908,10 +5908,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 '**********************
@@ -6363,11 +6363,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
@@ -6828,10 +6826,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)
@@ -7368,11 +7364,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()
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 15dc5bff8..17f4b9ac2 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -1823,11 +1823,8 @@ Partial Class Compras_Proveedores
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
'ACTUALIZAR GLOBAL
- 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
- 'Else
- ' ErrorBancos = True
- 'End If
+ GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
Alert("El Proveedor se guardó correctamente. " & " " & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();"))
RecargaGlobalCuentasBancarias()
@@ -3416,7 +3413,9 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then
If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
- DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
+ 'recargar las cuentas
+ GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
+ DTCuentasBancos = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor)
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
Else
@@ -3430,12 +3429,11 @@ Partial Class Compras_Proveedores
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
ObjCuentasBancos.Dispose()
- RecargaGlobalCuentasBancarias()
+
End Sub
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
-
End If
End Sub
diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx
index 20b3912ae..41d634712 100644
--- a/Compras/RepComprasAF.aspx
+++ b/Compras/RepComprasAF.aspx
@@ -1,330 +1,326 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepComprasAF.aspx.vb" Inherits="Compras_RepComprasAF" %>
-
-
-
-
-
-
-
- Reporte de Compras Activo Fijo
-
-
-
-
-
+
+
-
-
+
+
+
diff --git a/Contratos/Presupuestos.aspx.vb b/Contratos/Presupuestos.aspx.vb
index dc344f772..15b704ed9 100644
--- a/Contratos/Presupuestos.aspx.vb
+++ b/Contratos/Presupuestos.aspx.vb
@@ -5,10 +5,10 @@ Imports System.Data
Imports Extensiones
Partial Class Contratos_Presupuestos
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "P R O P I E D A D E S"
-
+
Public Property CvePresupuesto() As Integer
Get
Return ViewState("CvePresupuesto").ToString.ToEntero
@@ -37,10 +37,10 @@ Partial Class Contratos_Presupuestos
Set(ByVal value As DataTable)
ViewState("DtClasificaciones") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CvePresupuesto = IfNull(Request("CvePresupuesto"), -1).ToString.ToEntero
@@ -56,8 +56,8 @@ Partial Class Contratos_Presupuestos
UpGvClasificaciones.Update()
UpIndicadores.Update()
End If
- End Sub
-
+ End Sub
+
#Region "I N I C I A L I Z A - V A L O R E S"
Private Sub InicializaValores()
TxtFechaI.Text = $"01/01/{Now.Year}"
@@ -125,13 +125,13 @@ Partial Class Contratos_Presupuestos
End Select
End If
If e.Row.RowType = DataControlRowType.Footer Then
- Dim Importe = DtClasificaciones.SUM("Importe", "CveClasificacion IS NOT NULL")
+ Dim Importe = DtClasificaciones.SUM("Importe", "CveAgrupador IS NOT NULL")
e.Row.FCLabel("LblTotal").Text = String.Format("{0:C}", Importe)
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "C A R G A - D A T O S"
Private Sub CargaDatos()
CargaMoneda()
@@ -245,9 +245,9 @@ Partial Class Contratos_Presupuestos
HlModificar.Visible = True
HlModificar.NavigateUrl = $"/Contratos/ModificarPresupuesto.aspx?CvePresupuesto={CvePresupuesto}"
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "G U A R D A R "
Private Function ValidaDatos() As Boolean
If String.IsNullOrEmpty(TxtPresupuesto.Text.Trim) Then
@@ -327,23 +327,39 @@ Partial Class Contratos_Presupuestos
For Each GvRow As GridViewRow In GvPresupuestos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
- Dim CveClasificacion = GvRow.DataKey("CveClasificacion").ToEntero
- Dim CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero
+ Dim CveAgrupador = GvRow.DataKey("CveAgrupador").ToEntero
+ Dim Tipo As Integer = GvRow.DataKey("Tipo").ToEntero
+
+ Dim CveTipoGasto = -1
+ Dim CveClasificacion As Integer = -1
+ Dim CveConceptoContableNom As Integer = -1
+
+ If Tipo = 1 Then
+ CveClasificacion = CveAgrupador
+ CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero
+ End If
+
+ If Tipo = 2 Then
+ CveConceptoContableNom = CveAgrupador
+ End If
+
+
Dim CvePresupuestoDetalle = GvRow.DataKey("CvePresupuestoDetalle").ToEntero
Dim Importe = GvRow.FCTextBox("TxtImporteClasi").Text.ToDecimal
Dim Obs = GvRow.FCTextBox("TxtObservacion").Text.Trim
+
'ACTUALIZA EL REGISTRO EXISTENTE
If CvePresupuestoDetalle > 0 Then
- TieneError = Not ObjCont.UpdatePresupuestosDetalle(CvePresupuestoDetalle, CveClasificacion, Importe, Obs)
+ TieneError = Not ObjCont.UpdatePresupuestosDetalle(CvePresupuestoDetalle, CveClasificacion, Importe, Obs, CveConceptoContableNom:=CveConceptoContableNom)
If TieneError Then
Exit For
End If
'AGREGA LA CLASIFICACION SI NO EXISTE EN EN EL DT DETALLE
Else
- If Importe > 0 And CveClasificacion > 0 Then
- TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuesto, CveClasificacion, CveTipoGasto, Importe, Obs)
+ If Importe > 0 And CveAgrupador > 0 Then
+ TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuesto, CveClasificacion, CveTipoGasto, Importe, Obs, CveConceptoContableNom:=CveConceptoContableNom)
If TieneError Then
Exit For
End If
@@ -385,18 +401,33 @@ Partial Class Contratos_Presupuestos
If CvePresupuestoNuevo > 0 Then
Dim ImporteClasi = 0.0D
- Dim CveClasificacion = -1
Dim ObsDetalle = ""
For Each GvRow As GridViewRow In GvPresupuestos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
- ImporteClasi = GvRow.FCTextBox("TxtImporteClasi").Text.ToDecimal
- CveClasificacion = GvRow.DataKey("CveClasificacion").ToEntero
- Dim CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero
+ ImporteClasi = GvRow.FCTextBox("TxtImporteClasi").Text.ToDecimal
+
ObsDetalle = GvRow.FCTextBox("TxtObservacion").Text.Trim
+
+ Dim CveAgrupador = GvRow.DataKey("CveAgrupador").ToEntero
+ Dim Tipo As Integer = GvRow.DataKey("Tipo").ToEntero
+
+ Dim CveClasificacion As Integer = -1
+ Dim CveConceptoContableNom As Integer = -1
+ Dim CveTipoGasto As Integer = -1
+
+ If Tipo = 1 Then
+ CveClasificacion = CveAgrupador
+ CveTipoGasto = GvRow.DataKey("CveTipoGasto").ToEntero
+ End If
+
+ If Tipo = 2 Then
+ CveConceptoContableNom = CveAgrupador
+ End If
+
If CveClasificacion > 0 Then
If ImporteClasi > 0 Then
- TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuestoNuevo, CveClasificacion, CveTipoGasto, ImporteClasi, ObsDetalle)
+ TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuestoNuevo, CveClasificacion, CveTipoGasto, ImporteClasi, ObsDetalle, CveConceptoContableNom:=CveConceptoContableNom)
If TieneError Then
Exit For
End If
@@ -427,11 +458,11 @@ Partial Class Contratos_Presupuestos
Alert("Se agregó el presupuesto correctamente.", TipoMensaje.MsgInformacion, Liga)
End If
- End Sub
+ End Sub
#End Region
-
-
-
+
+
+
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs) Handles LnkAutorizar.Click
If ValidaDatos() Then
If ActualizarPresupuesto() Then
diff --git a/Contratos/RepPresupuestos.aspx b/Contratos/RepPresupuestos.aspx
index ba7cfd71f..500e6ef34 100644
--- a/Contratos/RepPresupuestos.aspx
+++ b/Contratos/RepPresupuestos.aspx
@@ -233,7 +233,7 @@
Clasificacion:
-
+
Tipo Gasto:
diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb
index 07cfc6d1f..4800f3850 100644
--- a/Contratos/RepPresupuestos.aspx.vb
+++ b/Contratos/RepPresupuestos.aspx.vb
@@ -8,9 +8,9 @@ Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Contratos_RepPresupuestos
- Inherits ClsPaginas
+ Inherits ClsPaginas
#Region "P R O P I E D A D E S"
-
+
Public Property DtPresupuestos() As DataTable
Get
Return DirectCast(ViewState("DtPresupuestos"), DataTable)
@@ -18,15 +18,15 @@ Partial Class Contratos_RepPresupuestos
Set(ByVal value As DataTable)
ViewState("DtPresupuestos") = value
End Set
- End Property
-
+ End Property
+
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
- End Sub
-
+ End Sub
+
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
@@ -36,9 +36,14 @@ Partial Class Contratos_RepPresupuestos
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
- DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
+ Dim dtAgrupador = (From dr In GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
+ Select New With {.CveAgrupador = dr("CveClasificacion").ToString().ToEntero(), .Agrupador = dr("Clasificacion").ToString()}
+ ).Union(From dr In GlobalDTContaConceptosContables(-1)
+ Select New With {.CveAgrupador = dr("CveConceptoContable").ToString().ToEntero(), .Agrupador = dr("ConceptoContable").ToString()}).QueryToDataTable(True)
+
+ DdlClasificacion.DataSource = dtAgrupador
+ DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlClasificacion.DataBind()
DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}))
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -46,12 +51,12 @@ Partial Class Contratos_RepPresupuestos
CargaSubProyecto()
UpFiltros.Update()
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region " CARGA DATOS "
-
+
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
If DdlProyecto.SelectedValue.ToEntero > 0 Or UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
@@ -362,15 +367,15 @@ Partial Class Contratos_RepPresupuestos
EsProyecto = True
End If
Dim Css = "Texto"
- Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
+ Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
e.Row.Cells(0).Text = "" + e.Row.Cells(0).Text + ""
End If
End If
- End Sub
+ End Sub
#End Region
-
-
-
+
+
+
Protected Sub ChkMensual_CheckedChanged(sender As Object, e As EventArgs) Handles ChkMensual.CheckedChanged
DivRepDatos.Visible = Not ChkMensual.Checked
@@ -492,7 +497,7 @@ Partial Class Contratos_RepPresupuestos
Dim FechaFin = e.Row.DBCampo("FechaFFiltro").ToDate.ToShortDateString
Dim FechaInicio = e.Row.DBCampo("FechaIFiltro").ToDate.ToShortDateString
Dim Css = "Texto"
- Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={True}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
+ Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={True}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
e.Row.Cells(0).Text = "" + e.Row.Cells(0).Text + ""
End If
Else
@@ -506,7 +511,7 @@ Partial Class Contratos_RepPresupuestos
Dim FechaFin = e.Row.DBCampo("FechaFFiltro").ToDate.ToShortDateString
Dim FechaInicio = e.Row.DBCampo("FechaIFiltro").ToDate.ToShortDateString
Dim Css = "Texto"
- Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={True}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
+ Dim Liga = $"/Contratos/RepPresupuestosDetalle.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={True}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
e.Row.Cells(0).Text = "" + e.Row.Cells(0).Text + ""
End If
End If
@@ -515,8 +520,8 @@ Partial Class Contratos_RepPresupuestos
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaSubProyecto()
- End Sub
-
+ End Sub
+
#Region " IMPRESION - NUEVO "
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
GenerarPDF("EXCEL")
@@ -555,7 +560,7 @@ Partial Class Contratos_RepPresupuestos
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
- End Sub
+ End Sub
#End Region
-
+
End Class
diff --git a/Contratos/RepPresupuestosDetalle.aspx b/Contratos/RepPresupuestosDetalle.aspx
index 05b3668d8..35ed80fe3 100644
--- a/Contratos/RepPresupuestosDetalle.aspx
+++ b/Contratos/RepPresupuestosDetalle.aspx
@@ -226,7 +226,7 @@