diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index f4cf2ee95..d5be1124a 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -105,6 +105,14 @@ Partial Class AF_AF Set(value As Integer) ViewState("AFInvCveAlmacen") = value End Set + End Property + Private Property AFInvCveSeccionAlmacen As Integer + Get + Return If(ViewState("AFInvCveSeccionAlmacen") Is Nothing, -1, ViewState("AFInvCveSeccionAlmacen").ToString.ToEntero()) + End Get + Set(value As Integer) + ViewState("AFInvCveSeccionAlmacen") = value + End Set End Property Private Property AFInvSerie As String Get @@ -2102,8 +2110,8 @@ Partial Class AF_AF If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero If CveUMInv > 0 Then - CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}") - If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie) Then + CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") + If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then ErrorGuardar = True End If Else @@ -3051,6 +3059,7 @@ Partial Class AF_AF AFInvSerie = "" AFInvCvePS = -1 AFInvCveAlmacen = -1 + AFInvCveSeccionAlmacen = -1 Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("") If DrPS Is Nothing Then Exit Sub @@ -3076,6 +3085,7 @@ Partial Class AF_AF AFInvSerie = "" AFInvCvePS = -1 AFInvCveAlmacen = -1 + AFInvCveSeccionAlmacen = -1 Alert("No hay existencias suficientes del producto. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") @@ -3094,7 +3104,7 @@ Partial Class AF_AF AFInvCvePS = DdlAFInvPS.SelectedValue.ToEntero AFInvCveAlmacen = DdlAFInvAlmacen.SelectedValue.ToEntero - + AFInvCveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero RegistraScript("$('#ModalAFInv').modal('hide')", "hide") DivAFInvAdvertencia.Visible = True @@ -3652,12 +3662,12 @@ Partial Class AF_AF DivSeccion.Visible = CBool(drr("AplicaSeccion")) DdlSeccionAlmacen.Items.Clear() If CBool(drr("AplicaSeccion")) Then - CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) - 'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero) - 'DdlSeccionAlmacen.DataSource = dtt - 'DdlSeccionAlmacen.DataBind() + 'CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) + Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero) + DdlSeccionAlmacen.DataSource = dtt + DdlSeccionAlmacen.DataBind() - 'dtt.Dispose() + dtt.Dispose() End If diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index b3d744b4c..f68808600 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -3876,6 +3876,32 @@ Public Class ClsContabilidad Return Retorno End Function + + Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + 'SqlAdapter.SelectCommand.t + + DataAdapter("PA_Conta_LibroDiario") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + SqlAdapter.SelectCommand.CommandTimeout = 0 + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener libro diario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + #End Region #Region "I N C O N S I S T E N C I A S" @@ -4096,7 +4122,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetAnexoCatalogoMensual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean + Public Function GetAnexoCatalogoMensual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean Dim Retorno = False DataAdapter("PA_Conta_AnexoCatalogoMensualGet") @@ -4108,18 +4134,19 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Periodo", SqlDbType.Int).Value = Periodo End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal CC", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal Mensual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function - Public Function GetAnexoCatalogoAnual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, EjercicioFinal As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean + Public Function GetAnexoCatalogoAnual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, EjercicioFinal As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean Dim Retorno = False DataAdapter("PA_Conta_AnexoCatalogoAnualGet") @@ -4133,6 +4160,7 @@ Public Class ClsContabilidad .Add("@EjercicioFinal", SqlDbType.Int).Value = EjercicioFinal .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Periodo", SqlDbType.Int).Value = Periodo End With @@ -4140,12 +4168,13 @@ Public Class ClsContabilidad SqlAdapter.Fill(DSet) Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal CC", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function - Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer) As Boolean + + Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer) As Boolean Dim Retorno = False DataAdapter("PA_Conta_AnexoCatalogoCCGet") @@ -4155,6 +4184,10 @@ Public Class ClsContabilidad .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio .Add("@CveSubproyecto", SqlDbType.Int).Value = CveSubproyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Divisor", SqlDbType.Int).Value = Divisor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Periodo", SqlDbType.Int).Value = Periodo + End With Try @@ -6211,7 +6244,7 @@ Public Class ClsContabilidad End Function - Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean Dim Retorno = False DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") @@ -6224,6 +6257,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Periodo", SqlDbType.Int).Value = Periodo End With diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 6abe367d1..78af613be 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -2836,7 +2836,7 @@ Public Class ClsOIEventos #End Region #Region "OI_DocumentosSubCategoria" - Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1") As Boolean + Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1", Optional CveCategoria As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2845,6 +2845,7 @@ Public Class ClsOIEventos With SqlAdapter.SelectCommand.Parameters .Add("@CveSubCategoria", SqlDbType.Int).Value = CveSubCategoria .Add("@SubCategoria", SqlDbType.NVarChar).Value = SubCategoria + .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria End With Try @@ -3089,6 +3090,48 @@ Public Class ClsOIEventos Return Retorno End Function + + Public Function UpdateDocumentoAutorizacion(CveAutorizacion As Integer, CveDocumento As Integer, Comentarios As String, Adjunto As String, FechaAprobacion As Date) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_DocumentosAutorizacionesUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion + .Add("@CveDocumento", SqlDbType.Int).Value = CveDocumento + .Add("@Comentarios", SqlDbType.NVarChar).Value = Comentarios + .Add("@Adjunto", SqlDbType.NVarChar).Value = Adjunto + .Add("@FechaAprobacion", SqlDbType.Date).Value = FechaAprobacion + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el usuario para autorizar el documento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function DesaprobarDocumentoAutorizacion(CveAutorizacion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_OI_DocumentosAutorizacionesDesaprobar") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al desaprobar la autorización del documento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function #End Region #End Region diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7cdb07053..40f6c1946 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4257,6 +4257,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoCC.aspx".ToUpper(), 594) PaginaDict.Add("/Contabilidad2/RepVariacionHaciendaPublica.aspx".ToUpper(), 595) PaginaDict.Add("/Contabilidad2/CatCuentas.aspx".ToUpper(), 596) + PaginaDict.Add("/Contabilidad2/RepLibroDiario.aspx".ToUpper(), 544) PaginaDict.Add("/Contabilidad2/RepSituacionFinancieraSAT.aspx".ToUpper(), 615) PaginaDict.Add("/Contabilidad2/RepEstadoActividadesSAT.aspx".ToUpper(), 616) @@ -4627,7 +4628,7 @@ Public Class ClsPaginas PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), 760) PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), 761) PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), 762) - PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), 763) + PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1) #End Region #Region "Planeacion" 'PLANEACIÓN diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 58d72438a..5d65c848e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3146,6 +3146,8 @@ Partial Class Compras_Compras ViewState("CveProveedor") = ObjProveedor.CveProveedor ViewState("CveTipoProveedor") = ObjProveedor.CveTipoProveedor + If ObjProveedor.CveTipoProveedor = 1 Then LblProveedor.Text = "Proveedor:" Else LblProveedor.Text = "Acreedor:" + CveTipoConcepto = ObjProveedor.CveTipoProveedor 'Conta ContPAQ ViewState("CtaProveedor") = ObjProveedor.IdCtaContProveedores diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 3e8f29ec9..39658a220 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1444,9 +1444,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("CveTipoAlmacen", Almacen)) - + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + + params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0, dr("SerieFolio").ToString, ""))) @@ -1456,6 +1456,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Fecha", Fecha)) End If + If UsuarioActual.CveEmpresa = 72 Then + params.Add(New ReportParameter("CveTipoAlmacen", CveTipoAlmacen.ToString())) + End If + params.Add(New ReportParameter("Observaciones", Observaciones)) If UsuarioActual.CveEmpresa.Contiene(72, 80) Then diff --git a/Contabilidad2/RepAnexoCatalogoAnual.aspx b/Contabilidad2/RepAnexoCatalogoAnual.aspx index ffe9e4e8a..569e1ad17 100644 --- a/Contabilidad2/RepAnexoCatalogoAnual.aspx +++ b/Contabilidad2/RepAnexoCatalogoAnual.aspx @@ -25,17 +25,38 @@