+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AF/RegistroRevision.aspx.vb b/AF/RegistroRevision.aspx.vb
new file mode 100644
index 000000000..b1a64a62e
--- /dev/null
+++ b/AF/RegistroRevision.aspx.vb
@@ -0,0 +1,74 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+
+Partial Class AF_RegistroRevision
+ Inherits ClsPaginas
+
+#Region " PROPIEDADES"
+
+#End Region
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ CargaCombos()
+
+ CargaDatos()
+
+ End If
+ End Sub
+
+
+#Region " CARGA PARAMETROS "
+
+#End Region
+
+#Region " CARGA COMBOS "
+ Protected Sub CargaCombos()
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
+ End Sub
+
+
+#End Region
+
+#Region " CARGA DATOS "
+ Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+
+ End Sub
+
+
+#End Region
+
+#Region " GV DATOS "
+
+ Private Sub CargaDatos()
+
+ Dim ObjAF As New ClsAF
+
+
+ ObjAF.Dispose()
+
+ End Sub
+
+
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+
+
+ End If
+
+ End Sub
+
+#End Region
+
+
+
+
+End Class
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index ee7e27b43..410a4db11 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -3241,6 +3241,198 @@ Public Class ClsAF
Return Retorno
End Function
#End Region
+#Region "M E T R I C A S"
+ Public Function GetMetricas(CveMetrica As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener las métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function AddMetricas(Metrica As String) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Metrica", SqlDbType.Int).Value = Metrica
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar la métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function DeleteMetricas(CveMetrica As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasRemove")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar la métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetMetricasValores(Optional CveMetricaValor As Integer = -1, Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
+ Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+ .Add("@CveAF", SqlDbType.Int).Value = CveAF
+ .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
+ .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function AddMetricasValores(Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
+ Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveAF", SqlDbType.Int).Value = CveAF
+ .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
+ .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar el valor de métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function RemoveMetricasValores(CveMetricaValor As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresRemove")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el valor de métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresDetalleGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function AddMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1, Optional Valor As String = "-1") As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresDetalleAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ .Add("@Valor", SqlDbType.NVarChar).Value = Valor
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar el detalle de los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function DeleteMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1, Optional Valor As String = "-1") As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresDetalleAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ .Add("@Valor", SqlDbType.NVarChar).Value = Valor
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el detalle de los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+#End Region
#Region " IDisposable Support "
diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index 93abdad57..b9f29edb9 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -943,7 +943,7 @@ Public Class ClsBancos
#Region "Complemento Pagos"
- Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsCancelacion As Boolean = False, Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
+ Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now
Dim Serie As String = "Pag"
@@ -954,11 +954,11 @@ Public Class ClsBancos
Dim dttpagos As DataTable = Nothing
Dim dr As Data.DataRow = Nothing
- If GetComplementoPagosRep(-1, Now.AddYears(-2), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsCancelacion OrElse EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
+ If GetComplementoPagosRep(-1, Now.AddYears(-2), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
dr = DtResultados.FiltroPrimero("CveVenta IS NULL")
dttpagos = DtResultados.FiltraParametros("CveVenta > 0")
End If
- If EsCancelacion Then Estatus = 2
+ 'If EsCancelacion Then Estatus = 2
If EsRegeneracion Then Estatus = 3
@@ -1044,9 +1044,9 @@ Public Class ClsBancos
End Select
- If EsCancelacion AndAlso (CFDIRelacionado = "-1" OrElse CFDIRelacionado = "") Then
- Mensaje += " La cancelación debe de tener documento relacionado"
- End If
+ 'If EsCancelacion AndAlso (CFDIRelacionado = "-1" OrElse CFDIRelacionado = "") Then
+ ' Mensaje += " La cancelación debe de tener documento relacionado"
+ 'End If
If Not Mensaje.Length = 0 Then
GuardaLog(Mensaje)
@@ -1061,7 +1061,7 @@ Public Class ClsBancos
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDouble,
- UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDouble, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=EsCancelacion)
+ UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDouble, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=False)
''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index f68808600..0fa040293 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1211,11 +1211,11 @@ Public Class ClsContabilidad
CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero
Select Case CveConceptoContable
- Case 6, 5, 17, 14, 19, 15, 16, 272, 275
+ Case 6, 5, 17, 14, 19, 15, 16, 272, 275, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316
SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra)
- Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226
+ Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226, 291, 292, 293, 294, 295, 296
SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta)
- Case 30, 66, 92
+ Case 30, 66, 92, 204
SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco)
End Select
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 974bce081..7d260f7a6 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -4632,7 +4632,7 @@ Public Class ClsInventarios
#Region "INVENTARIOS - REPORTE UNIFORMES RESGUARDO"
- Public Function GetResguardoUniformesRep(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveDepartamento As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1") As Boolean
+ Public Function GetResguardoUniformesRep(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveDepartamento As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional Todo As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ResguardoUniformesRep")
@@ -4643,6 +4643,7 @@ Public Class ClsInventarios
.Add("@CveDepartamento", SqlDbType.Int).Value = CveDepartamento
.Add("@FechaInicio", SqlDbType.VarChar).Value = FechaInicio
.Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin
+ .Add("@Todo", SqlDbType.Bit).Value = Todo
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 40f6c1946..68a9d44e3 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3950,6 +3950,7 @@ Public Class ClsPaginas
PaginaDict.Add("/AF/RepServicios.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
+ PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251)
#End Region
'AIMMGM
#Region "AIMMGM"
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index ad137e7d5..b29e7d852 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -2197,6 +2197,7 @@ Namespace Modelos
Dim ImporteAcumulado91 As Decimal = 0
Dim CveUltimaVenta As Integer = 0
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
+ IdCtaContable = 0
If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
@@ -2600,8 +2601,12 @@ Namespace Modelos
'CTACONTABLE
'IdCtaContable = IdCtaContAnticipos
'CveCuenta = CveCuentaAnticipos
- IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
- CveCuenta = ObjFactura.Cliente.CveCuentaClientes
+
+ If tipoCambio = 1 Then
+ IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
+ Else
+ IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
+ End If
CveSubProyectoContabilizar = CveSubProyectoVenta
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index bd5cbd3fa..7b3891368 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -2469,17 +2469,25 @@ Partial Class Bancos_IE
- 'If CveOCSolicitudAnticipo > 0 Then
- ' If TxtImporte.Text.ToDecimal > SaldoOCAnticipo Then
- ' EsValido = False
- ' Alert($"El importe del movimiento es mayor al saldo de la orden de compra importe movmiento {TxtImporte.Text.FormatoNumero } saldo orden de compra: {SaldoOCAnticipo.ToString.FormatoNumero}", TipoMensaje.MsgAdvertencia)
+ If CveOCSolicitudAnticipo > 0 Then
- ' End If
- 'End If
-
+ Dim ObjOC As New ClsOC
+ If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
+ SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal
+ Else
+ SaldoOCAnticipo = 0
+ End If
+ ObjOC.Dispose()
+
+ If TxtImporte.Text.ToDecimal > SaldoOCAnticipo Then
+ EsValido = False
+ Alert($"El importe del movimiento es mayor al saldo de la orden de compra importe movmiento {TxtImporte.Text.FormatoNumero } saldo orden de compra: {SaldoOCAnticipo.ToString.FormatoNumero}", TipoMensaje.MsgAdvertencia)
+ End If
+ End If
Return EsValido
+
End Function
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
diff --git a/Bancos/RepComplementoPago.aspx b/Bancos/RepComplementoPago.aspx
index 82e03fe94..9b28d447a 100644
--- a/Bancos/RepComplementoPago.aspx
+++ b/Bancos/RepComplementoPago.aspx
@@ -114,7 +114,7 @@
diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb
index 287bbdbdb..bcfde9140 100644
--- a/Bancos/RepComplementoPago.aspx.vb
+++ b/Bancos/RepComplementoPago.aspx.vb
@@ -300,23 +300,72 @@ Partial Class Bancos_RepComplementoPago
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
Dim SerieFolioPago As String = Gvr.DataKey("SerieFolioPago").ToString
- Dim CFDIRelacionado As String = Gvr.DataKey("FolioFiscalComplemento").ToString
+ Dim FolioFiscalCancelar As String = Gvr.DataKey("FolioFiscalComplemento").ToString
+ Dim CveComplementoPagoCancelar As Integer = Gvr.DataKey("CveComplementoPago").ToEntero
+ Dim CvePACCancelacion As Integer = UsuarioActual.Empresa.CvePAC
+ Dim RFCReceptorCancelar As String = Gvr.DataKey("RFC").ToString
- If CFDIRelacionado <> "" Then
- Dim objBancos As New ClsBancos
+ If FolioFiscalCancelar <> "" Then
+ Dim ObjCancelacion As New Timbrado
+ Dim ObjBanco As New ClsBancos
+
+ If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
+
+ If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
+
+ Alert("El complemento se cancelo correctamente.")
+ End If
- If objBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, CFDIRelacionado, True) Then
- Alert($"Complemento {SerieFolioPago} cancelado correctamente.")
Else
- Alert($"Se presento un error al cancelar el complementob {SerieFolioPago}.", TipoMensaje.MsgError)
+
+ If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
+
+ If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
+
+ Alert("El complemento se cancelo correctamente.")
+ End If
+ Else
+ Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
+ End If
+
End If
- objBancos.Dispose()
+ ObjBanco.Dispose()
+
+ 'Dim objBancos As New ClsBancos
+
+ 'If objBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, CFDIRelacionado, True) Then
+ ' Alert($"Complemento {SerieFolioPago} cancelado correctamente.")
+ 'Else
+ ' Alert($"Se presento un error al cancelar el complementob {SerieFolioPago}.", TipoMensaje.MsgError)
+ 'End If
+
+ 'objBancos.Dispose()
End If
End Sub
+ Function EstatusSATCancelado(FolioFiscal As String, RFCDe As String, RFCReceptor As String) As Boolean
+
+ Dim respuesta As Boolean = False
+
+ Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True)
+
+ If Vigencia IsNot Nothing Then
+ If Vigencia.Estado.ToUpper = "CANCELADO" Then
+ respuesta = True
+ Else
+ respuesta = False
+ End If
+ Else
+ respuesta = False
+ End If
+
+ Return respuesta
+ End Function
+
+
Protected Sub LnkSendMail_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
HdnSerieFolioPago.Value = gvRow.DataKey("SerieFolioPago").ToString
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 5d65c848e..9db681e2b 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -5714,7 +5714,7 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento / TipoCambioCompra
End If
importeMN = importeMovimiento * TipoCambioCompra * Multiplicador
- IdCtaContable = CtaProveedor
+ IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
CveCuenta = CveCuentaProveedor
@@ -5755,11 +5755,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
+
End If
Next
@@ -6371,11 +6367,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
+
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6817,7 +6809,7 @@ Partial Class Compras_Compras
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307
If tipoCambioActual = 1 Then
- IdCtaContable = CtaProveedor
+ IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
CveCuenta = CveCuentaProveedor
Else
IdCtaContable = CtaProveedorComplementaria
@@ -6860,11 +6852,6 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
@@ -7120,11 +7107,6 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- idCuentaContabilizacion = 0
- End If
'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA
If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
@@ -7457,11 +7439,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'COnta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
+
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
@@ -16874,14 +16852,8 @@ Partial Class Compras_Compras
'VALIDA IMPORTES
'VALIDA TOTAL CON LOS IMPORTES TOTALES
Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double
- 'Dim TempPorcentajeRetIVA = LblRetIVA.Text.ToDouble / 100
- 'Dim TempPorcentajeRetISR = LblRetISR.Text.ToDouble / 100
- Dim Amortizacion As Decimal = 0
- If UsuarioActual.CveEmpresa = 119 Then
- Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
- TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
- End If
+ Dim Amortizacion As Decimal = 0
Dim TieneAmortizacion As Boolean = False
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
TieneAmortizacion = True
@@ -16891,6 +16863,12 @@ Partial Class Compras_Compras
LblAmortizacion.Text = "0.00"
End If
+ If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then
+ Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
+ TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
+ End If
+
+
TempSubTotal = TxtSubTotal.Text.ToDouble
SubTotalOriginal = TxtSubTotal.Text.ToDouble
SubTotal2Original = TxtSubTotal2.Text.ToDouble
diff --git a/Contabilidad/LibroDiario.aspx.vb b/Contabilidad/LibroDiario.aspx.vb
index d3507a095..fd61a89cf 100644
--- a/Contabilidad/LibroDiario.aspx.vb
+++ b/Contabilidad/LibroDiario.aspx.vb
@@ -51,11 +51,12 @@ Partial Class Contabilidad_LibroDiario
InicializaValores()
- If UsuarioActual.Empresa.UsaAC Then
- BtnConsultar.Enabled = True
- Else
- Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
- End If
+ BtnConsultar.Enabled = True
+ 'If UsuarioActual.Empresa.UsaAC Then
+ ' BtnConsultar.Enabled = True
+ 'Else
+ ' Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
+ 'End If
End If
End Sub
@@ -212,7 +213,6 @@ Partial Class Contabilidad_LibroDiario
#Region " IMPRIMIR "
-#End Region
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
@@ -245,5 +245,6 @@ Partial Class Contabilidad_LibroDiario
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
End Sub
+#End Region
End Class
diff --git a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb
index 64d542999..d0582aa0c 100644
--- a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb
+++ b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb
@@ -71,7 +71,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoVertical
Private Sub CargaDatos()
Dim Conta As New ClsContabilidad
- If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, 12) Then
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
GvCC.DataSource = Conta.DSResultados.Tables(1)
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
index 111600ced..28d168f57 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
@@ -1663,7 +1663,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Next IndiceInicio
- e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={-1}"
+ e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
diff --git a/Contabilidad2/RepLibroDiario.aspx b/Contabilidad2/RepLibroDiario.aspx
index 4224c2fa5..33fb505ac 100644
--- a/Contabilidad2/RepLibroDiario.aspx
+++ b/Contabilidad2/RepLibroDiario.aspx
@@ -83,8 +83,8 @@
-
-
+
+
diff --git a/Contabilidad2/RepLibroDiario.aspx.vb b/Contabilidad2/RepLibroDiario.aspx.vb
index 3f01252dc..60dd72327 100644
--- a/Contabilidad2/RepLibroDiario.aspx.vb
+++ b/Contabilidad2/RepLibroDiario.aspx.vb
@@ -90,28 +90,40 @@ Partial Class Contabilidad2_RepLibroDiario
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
-
- ''CABECERA
- 'If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
- ' e.Row.Font.Bold = True
- ' e.Row.Cells(4).Text = ""
- ' e.Row.Cells(5).Text = ""
- ' e.Row.Cells(6).Text = ""
- ' e.Row.Cells(7).Text = ""
- ' e.Row.Cells(8).Text = ""
- ' e.Row.CssClass = "SubTotales" '
- 'End If
+ 'CABECERA
+ If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
+ e.Row.Font.Bold = True
+ e.Row.Cells(4).Text = ""
+ e.Row.Cells(4).Visible = False
+ e.Row.Cells(5).Text = ""
+ e.Row.Cells(5).Visible = False
+ e.Row.Cells(6).Text = ""
+ e.Row.Cells(6).Visible = False
+ e.Row.Cells(7).Text = ""
+ e.Row.Cells(7).Visible = False
+ e.Row.Cells(8).Text = ""
+ e.Row.Cells(8).Visible = False
+ e.Row.Cells(3).ColumnSpan = 6
+ e.Row.CssClass = "SubTotales" '
+ End If
'DETALLE
- If e.Row.DBCampo("Codigo") <> "" Then
+ If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 2 Then
e.Row.Cells(0).Text = ""
e.Row.Cells(1).Text = ""
e.Row.Cells(2).Text = ""
e.Row.Cells(3).Text = ""
+ If e.Row.DBCampo("TipoMovto") = "True" Then
+ e.Row.Cells(7).Text = ""
+ Else
+ e.Row.Cells(8).Text = ""
+ End If
+ 'e.Row.Cells(7).Text = If(e.Row.Cells(7).Text.ToEntero() > 0, e.Row.Cells(7).Text, "")
+ 'e.Row.Cells(8).Text = If(e.Row.Cells(8).Text.ToEntero() > 0, e.Row.Cells(8).Text, "")
End If
'SUBTOTAL
- If e.Row.DBCampo("Codigo") = "" Then
+ If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 3 Then
e.Row.Font.Bold = True
e.Row.Cells(0).Text = ""
e.Row.Cells(1).Text = ""
@@ -141,4 +153,39 @@ Partial Class Contabilidad2_RepLibroDiario
End If
End Sub
+#Region " IMPRIMIR "
+
+ Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
+ 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
+ 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
+ 'DtDatos = DtDatos
+ ImprimirReporte()
+ End Sub
+
+ Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
+ 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
+ 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
+ 'DtDatos = DtDatos
+ ImprimirReporte("EXCEL")
+ End Sub
+
+ Private Sub ImprimirReporte(Optional Formato As String = "PDF")
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ Dim lista = New List(Of CrystalParametro)
+ lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
+ lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
+ lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy")))
+ lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
+
+ If Imagen.Exists Then
+ lista.Add(New CrystalParametro("LogoPath", logouri))
+ Else
+ lista.Add(New CrystalParametro("LogoPath", ""))
+ End If
+
+ ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
+ End Sub
+#End Region
End Class
diff --git a/Contratos/Contrato.aspx b/Contratos/Contrato.aspx
index e28415dcf..8483f7265 100644
--- a/Contratos/Contrato.aspx
+++ b/Contratos/Contrato.aspx
@@ -373,7 +373,7 @@
-
+ Proyecto:
@@ -383,7 +383,7 @@
-
+
diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb
index b124bd0a3..dce2ecdcf 100644
--- a/Contratos/Contrato.aspx.vb
+++ b/Contratos/Contrato.aspx.vb
@@ -1488,14 +1488,15 @@ Partial Class Contratos_Default
#Region "COMBOS - INFO GENERAL"
Private Sub CargaProyecto()
- If UsuarioActual.Empresa.GralSoloProyecto Then
- CargaSubProyectoContrato(-1)
- trddlproyecto.Visible = False
- lblsubproyecto.Text = "Proyecto"
- Else
- DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", "", {"CveProyecto", "Proyecto"})
- DdlProyecto.DataBind()
- End If
+ CargarCentrosDeCosto(DdlProyecto, DdlSubProyectoContrato, LblProyecto, lblsubproyecto)
+ trddlproyecto.Visible = LblProyecto.Visible
+ 'If UsuarioActual.Empresa.GralSoloProyecto Then
+ ' CargaSubProyectoContrato(-1)
+ ' lblsubproyecto.Text = "Proyecto"
+ 'Else
+ ' DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", "", {"CveProyecto", "Proyecto"})
+ ' DdlProyecto.DataBind()
+ 'End If
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyectoContrato(DdlProyecto.SelectedValue.ToEntero)
diff --git a/Contratos/PopUpBuscarContrato.aspx b/Contratos/PopUpBuscarContrato.aspx
index c0311468f..c77389ac3 100644
--- a/Contratos/PopUpBuscarContrato.aspx
+++ b/Contratos/PopUpBuscarContrato.aspx
@@ -70,11 +70,11 @@