From ab27abd95a4df18cc6e66c712f874679a9deabe2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 17 Mar 2022 10:53:52 -0700 Subject: [PATCH] RepAnexocatalogoSegmento, ligas a Anexo --- App_Code/ClsContPAQi.vb | 260 ++++++++++++++++-- Contabilidad/RepAnexoCatalogoSegmento.aspx.vb | 39 ++- .../RepMovimientosAuxiliaresCatalogo.aspx | 4 +- Inventarios/ResguardoMaterial.aspx.vb | 3 +- 4 files changed, 281 insertions(+), 25 deletions(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index 040f69b24..6660b2f77 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -6606,15 +6606,15 @@ Public Class ClsContPAQi Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, Optional IdSegNeg As Integer = -1) As Boolean Dim Retorno = False - If Not FNC_Total() Then + If Not FNC_Total_Segmento() Then Return Retorno End If - If Not FNC_Cargos() Then + If Not FNC_Cargos_Segmento() Then Return Retorno End If - If Not FNC_Abonos() Then + If Not FNC_Abonos_Segmento() Then Return Retorno End If @@ -6659,12 +6659,12 @@ Public Class ClsContPAQi StrSQL.Append(" ) ") StrSQL.Append(" INSERT INTO #TEMP ") 'StrSQL.AppendLine(" -- SE LLENA LA TABLA TEMPORAL CON EL ARBOL DEL WITH CON JOINS DE CUENTAS SUPERIORES ") - StrSQL.Append(" SELECT T.*, ISNULL (dbo.FNC_Total(T.Id, CAST('1900-01-01' AS DATE),@FechaF,@CveMoneda,@IdSegNeg), 0) As SaldoActual ") '-- CASE WHEN Tipo IN ('A','B') THEN ISNULL(T.SaldoInicial + T.Cargos - T.Abonos,0) ELSE ISNULL(T.SaldoInicial + T.Abonos - T.Cargos,0) END AS SaldoActual + StrSQL.Append(" SELECT T.*, ISNULL (dbo.FNC_Total_Segmento(T.Id, CAST('1900-01-01' AS DATE),@FechaF,@CveMoneda,@IdSegNeg), 0) As SaldoActual ") '-- CASE WHEN Tipo IN ('A','B') THEN ISNULL(T.SaldoInicial + T.Cargos - T.Abonos,0) ELSE ISNULL(T.SaldoInicial + T.Abonos - T.Cargos,0) END AS SaldoActual StrSQL.Append(" FROM (") StrSQL.Append(" Select C.Id, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Orden,") - StrSQL.Append(" ISNULL (dbo.FNC_Total(c.Id, CAST('1900-01-01' AS DATE),EOMONTH(@FechaI, -1 ),@CveMoneda,@IdSegNeg), 0) AS SaldoInicial,") - StrSQL.Append(" ISNULL (dbo.FNC_Cargos(c.Id, @FechaI, @FechaF,@CveMoneda,@IdSegNeg), 0) AS Cargos,") - StrSQL.Append(" ISNULL (dbo.FNC_Abonos(c.Id, @FechaI, @FechaF,@CveMoneda,@IdSegNeg), 0) AS Abonos,") + StrSQL.Append(" ISNULL (dbo.FNC_Total_Segmento(c.Id, CAST('1900-01-01' AS DATE),EOMONTH(@FechaI, -1 ),@CveMoneda,@IdSegNeg), 0) AS SaldoInicial,") + StrSQL.Append(" ISNULL (dbo.FNC_Cargos_Segmento(c.Id, @FechaI, @FechaF,@CveMoneda,@IdSegNeg), 0) AS Cargos,") + StrSQL.Append(" ISNULL (dbo.FNC_Abonos_Segmento(c.Id, @FechaI, @FechaF,@CveMoneda,@IdSegNeg), 0) AS Abonos,") StrSQL.Append(" Level as Nivel,") StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), (SELECT REPLACE (Mascarilla, 'X', '0') FROM Parametros)) ELSE C.Codigo END AS Codigo,") StrSQL.Append(" CASE WHEN ISNUMERIC (CT.Codigo) = 1 THEN FORMAT (CAST (CT.Codigo AS FLOAT), (SELECT REPLACE (Mascarilla, 'X', '0') FROM Parametros)) ELSE CT.Codigo END AS CodigoSup, Ct.Nombre as Sup,") @@ -11002,6 +11002,230 @@ Public Class ClsContPAQi StrSQL.Append(" @IdCtaSup INT, ") StrSQL.Append(" @FechaI DATE, ") StrSQL.Append(" @FechaF DATE, ") + StrSQL.Append(" @CveMoneda INT = 1 ") + StrSQL.Append(" ) ") + StrSQL.Append(" RETURNS FLOAT ") + StrSQL.Append(" AS ") + StrSQL.Append(" BEGIN ") + StrSQL.Append(" ") + StrSQL.Append(" DECLARE ") + StrSQL.Append(" @Total FLOAT, ") + StrSQL.Append(" @TipoCuenta VARCHAR(1), ") + StrSQL.Append(" @FechaFF DATE; ") + StrSQL.Append(" ") + StrSQL.Append(" SET @TipoCuenta = (SELECT Tipo FROM Cuentas WHERE id = @IdCtaSup); ") + StrSQL.Append(" ") + StrSQL.Append(" WITH Estructura(IdCtaSup, IdSubCtade) AS ") + StrSQL.Append(" ( ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" WHERE a.IdSubCtade = @IdCtaSup ") + StrSQL.Append(" ") + StrSQL.Append(" UNION ALL ") + StrSQL.Append(" ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Estructura e ON a.IdCtaSup = e.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" ) ") + StrSQL.Append(" SELECT @Total = SUM (CASE ") + StrSQL.Append(" WHEN @TipoCuenta IN ('A', 'B', 'E', 'G') THEN CASE WHEN p.TipoMovto = 1 THEN CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY) * -1 ELSE CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY) END ") + StrSQL.Append(" WHEN @TipoCuenta IN ('B', 'D', 'F', 'H', 'C') THEN CASE WHEN p.TipoMovto = 0 THEN CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY) * -1 ELSE CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY) END ") + StrSQL.Append(" ELSE 0 ") + StrSQL.Append(" END ") + StrSQL.Append(" ) ") + StrSQL.Append(" FROM Estructura e ") + StrSQL.Append(" INNER JOIN Asociaciones a ON e.IdSubCtade = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON c.Id = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN MovimientosPoliza p ON IdCuenta = c.Id ") + StrSQL.Append(" LEFT JOIN SegmentosNegocio s ON p.IdSegNeg = s.Id ") + StrSQL.Append(" WHERE CAST (p.Fecha AS DATE)>= @FechaI AND CAST (p.Fecha AS DATE) <= @FechaF; ") + StrSQL.Append(" RETURN @Total; ") + StrSQL.Append(" END; ") + + + + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al crear la funcion FNC_Total", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + + End Function + + Public Function FNC_Cargos() As Boolean + + Dim Retorno = False + StrSQL.Clear() + StrSQL.Append(" IF OBJECT_ID ('FNC_Cargos') IS NOT NULL DROP FUNCTION FNC_Cargos") + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar la funcion FNC_Cargos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + + StrSQL.Clear() + StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Cargos] ") + StrSQL.Append(" ( ") + StrSQL.Append(" @IdCtaSup INT, ") + StrSQL.Append(" @FechaI DATE, ") + StrSQL.Append(" @FechaF DATE, ") + StrSQL.Append(" @CveMoneda INT = 1 ") + StrSQL.Append(" ) ") + StrSQL.Append(" RETURNS FLOAT ") + StrSQL.Append(" AS ") + StrSQL.Append(" BEGIN ") + StrSQL.Append(" ") + StrSQL.Append(" DECLARE @Total FLOAT; ") + StrSQL.Append(" DECLARE @TipoCuenta VARCHAR(1); ") + StrSQL.Append(" SET @TipoCuenta = (SELECT Tipo FROM Cuentas WHERE id = @IdCtaSup); ") + StrSQL.Append(" ") + StrSQL.Append(" WITH Estructura(IdCtaSup, IdSubCtade) AS ") + StrSQL.Append(" ( ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" WHERE a.IdSubCtade = @IdCtaSup ") + StrSQL.Append(" ") + StrSQL.Append(" UNION ALL ") + StrSQL.Append(" ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Estructura e ON a.IdCtaSup = e.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" ) ") + StrSQL.Append(" SELECT @Total = SUM (CASE WHEN p.TipoMovto = 0 THEN CAST (ISNULL (CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY), 0)AS MONEY) ELSE 0 END) ") + StrSQL.Append(" FROM Estructura e ") + StrSQL.Append(" INNER JOIN Asociaciones a ON e.IdSubCtade = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON c.Id = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN MovimientosPoliza p ON IdCuenta = c.Id ") + StrSQL.Append(" LEFT JOIN SegmentosNegocio s ON p.IdSegNeg = s.Id ") + StrSQL.Append(" WHERE CAST (p.Fecha AS DATE)>= @FechaI AND CAST (p.Fecha AS DATE) <= @FechaF; ") + StrSQL.Append(" RETURN @Total; ") + StrSQL.Append(" END; ") + + + + + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al crear la funcion FNC_Cargos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + + End Function + + Public Function FNC_Abonos() As Boolean + + Dim Retorno = False + StrSQL.Clear() + StrSQL.Append(" IF OBJECT_ID ('FNC_Abonos') IS NOT NULL DROP FUNCTION FNC_Abonos") + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar la funcion FNC_Abonos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + + StrSQL.Clear() + StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Abonos] ") + StrSQL.Append(" ( ") + StrSQL.Append(" @IdCtaSup INT, ") + StrSQL.Append(" @FechaI DATE, ") + StrSQL.Append(" @FechaF DATETIME, ") + StrSQL.Append(" @CveMoneda INT = 1 ") + StrSQL.Append(" ) ") + StrSQL.Append(" RETURNS FLOAT ") + StrSQL.Append(" AS ") + StrSQL.Append(" BEGIN ") + StrSQL.Append(" ") + StrSQL.Append(" DECLARE @Total FLOAT; ") + StrSQL.Append(" DECLARE @TipoCuenta VARCHAR(1); ") + StrSQL.Append(" SET @TipoCuenta = (SELECT Tipo FROM Cuentas WHERE id = @IdCtaSup); ") + StrSQL.Append(" ") + StrSQL.Append(" WITH Estructura(IdCtaSup, IdSubCtade) AS ") + StrSQL.Append(" ( ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" WHERE a.IdSubCtade = @IdCtaSup ") + StrSQL.Append(" ") + StrSQL.Append(" UNION ALL ") + StrSQL.Append(" ") + StrSQL.Append(" SELECT a.IdCtaSup, a.IdSubCtade ") + StrSQL.Append(" FROM Asociaciones a ") + StrSQL.Append(" INNER JOIN Estructura e ON a.IdCtaSup = e.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON a.IdSubCtade = c.Id ") + StrSQL.Append(" ) ") + StrSQL.Append(" SELECT @Total = SUM (CASE WHEN p.TipoMovto = 1 THEN CAST (ISNULL (CAST (CASE WHEN @CveMoneda = 1 THEN p.Importe ELSE p.ImporteME END AS MONEY), 0)AS MONEY) ELSE 0 END) ") + StrSQL.Append(" FROM Estructura e ") + StrSQL.Append(" INNER JOIN Asociaciones a ON e.IdSubCtade = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN Cuentas c ON c.Id = a.IdSubCtade ") + StrSQL.Append(" INNER JOIN MovimientosPoliza p ON IdCuenta = c.Id ") + StrSQL.Append(" LEFT JOIN SegmentosNegocio s ON p.IdSegNeg = s.Id ") + StrSQL.Append(" WHERE CAST (p.Fecha AS DATE)>= @FechaI AND CAST (p.Fecha AS DATE) <= @FechaF; ") + StrSQL.Append(" RETURN @Total; ") + StrSQL.Append(" END; ") + + + + + + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al crear la funcion FNC_Abonos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + + End Function + +#End Region + + +#Region "Funciones con Segmento" + + + Public Function FNC_Total_Segmento() As Boolean + + Dim Retorno = False + StrSQL.Clear() + StrSQL.Append(" IF OBJECT_ID ('FNC_Total_Segmento') IS NOT NULL DROP FUNCTION FNC_Total_Segmento") + SqlDataAdapter(StrSQL.ToString, CommandType.Text) + + Try + SqlAdapter.SelectCommand.ExecuteNonQuery() + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar la funcion FNC_Total_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + + StrSQL.Clear() + StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Total_Segmento] ") + StrSQL.Append(" ( ") + StrSQL.Append(" @IdCtaSup INT, ") + StrSQL.Append(" @FechaI DATE, ") + StrSQL.Append(" @FechaF DATE, ") StrSQL.Append(" @CveMoneda INT = 1, ") StrSQL.Append(" @IdSegNeg INT =-1 ") StrSQL.Append(" ) ") @@ -11053,29 +11277,29 @@ Public Class ClsContPAQi SqlAdapter.SelectCommand.ExecuteNonQuery() Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al crear la funcion FNC_Total", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al crear la funcion FNC_Total_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function - Public Function FNC_Cargos() As Boolean + Public Function FNC_Cargos_Segmento() As Boolean Dim Retorno = False StrSQL.Clear() - StrSQL.Append(" IF OBJECT_ID ('FNC_Cargos') IS NOT NULL DROP FUNCTION FNC_Cargos") + StrSQL.Append(" IF OBJECT_ID ('FNC_Cargos_Segmento') IS NOT NULL DROP FUNCTION FNC_Cargos_Segmento") SqlDataAdapter(StrSQL.ToString, CommandType.Text) Try SqlAdapter.SelectCommand.ExecuteNonQuery() Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar la funcion FNC_Cargos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar la funcion FNC_Cargos_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try StrSQL.Clear() - StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Cargos] ") + StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Cargos_Segmento] ") StrSQL.Append(" ( ") StrSQL.Append(" @IdCtaSup INT, ") StrSQL.Append(" @FechaI DATE, ") @@ -11124,29 +11348,29 @@ Public Class ClsContPAQi SqlAdapter.SelectCommand.ExecuteNonQuery() Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al crear la funcion FNC_Cargos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al crear la funcion FNC_Cargos_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function - Public Function FNC_Abonos() As Boolean + Public Function FNC_Abonos_Segmento() As Boolean Dim Retorno = False StrSQL.Clear() - StrSQL.Append(" IF OBJECT_ID ('FNC_Abonos') IS NOT NULL DROP FUNCTION FNC_Abonos") + StrSQL.Append(" IF OBJECT_ID ('FNC_Abonos_Segmento') IS NOT NULL DROP FUNCTION FNC_Abonos_Segmento") SqlDataAdapter(StrSQL.ToString, CommandType.Text) Try SqlAdapter.SelectCommand.ExecuteNonQuery() Catch ex As Exception - Me.OnError("Ocurrió un error al eliminar la funcion FNC_Abonos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al eliminar la funcion FNC_Abonos_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try StrSQL.Clear() - StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Abonos] ") + StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_Abonos_Segmento] ") StrSQL.Append(" ( ") StrSQL.Append(" @IdCtaSup INT, ") StrSQL.Append(" @FechaI DATE, ") @@ -11196,7 +11420,7 @@ Public Class ClsContPAQi SqlAdapter.SelectCommand.ExecuteNonQuery() Retorno = True Catch ex As Exception - Me.OnError("Ocurrió un error al crear la funcion FNC_Abonos", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al crear la funcion FNC_Abonos_Segmento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb index 30f7d6f89..2e02836e7 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb @@ -18,6 +18,20 @@ Partial Class AC_RepAnexoCatalogoSegmento ViewState("DtDatos") = value End Set End Property + + Private Property DTCabeceras As DataTable + Get + DTCabeceras = DirectCast(ViewState("DTCabeceras"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DTCabeceras") = value + End Set + End Property + + + + Private Property FechaInicio As Date Get FechaInicio = ViewState("FechaInicio").ToString.ToDate @@ -225,7 +239,7 @@ Partial Class AC_RepAnexoCatalogoSegmento Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim DTCabeceras As New DataTable + 'Dim DTCabeceras As New DataTable TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) If ObjConta.GetEstadoActividadesSegmentoDetalle(FechaInicio, FechaFin, IdCuenta, Segmentos) Then @@ -250,17 +264,15 @@ Partial Class AC_RepAnexoCatalogoSegmento CType(GvDatos.Columns(IndexGV), BoundField).DataField = Dr("id").ToString GvDatos.Columns(IndexGV).HeaderText = Dr("Nombre").ToString - GvDatos.Columns(IndexGV).Visible = True CType(GvDatos.Columns(IndexGV), BoundField).DataField = Dr("id").ToString GvDatos.Columns(IndexGV).HeaderText = Dr("Nombre").ToString - - IndexActual = IndexActual + 1 If IndexGV >= 200 Then Exit For End If + Next @@ -292,6 +304,25 @@ Partial Class AC_RepAnexoCatalogoSegmento End If + Dim IndexActual As Integer = 0 + For Each Dr As DataRow In DTCabeceras.Rows + + Dim IndexGV As Integer = 3 + IndexActual + + + + e.Row.Cells(IndexGV).Text = $"{e.Row.Cells(IndexGV).Text }" + + + + IndexActual = IndexActual + 1 + If IndexGV >= 200 Then + Exit For + End If + + Next + + End If End Sub #End Region diff --git a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx index 0aef2e969..eb419142f 100644 --- a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx @@ -83,9 +83,9 @@
>
- +
- +
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index 34fa45956..f8c75cb27 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -663,7 +663,8 @@ Partial Class Inventarios_ResguardoMaterial If UsuarioActual.CveEmpresa = 140 Then - If DdlProveedorLiberacion.SelectedValue.ToEntero <= 0 Or DdlPersonalLiberacion.SelectedValue.ToEntero <= 0 Or DdlClienteLiberacion.SelectedValue.ToEntero <= 0 Then + If (DdlTipo.SelectedValue.ToEntero = 1 And DdlPersonalLiberacion.SelectedValue.ToEntero <= 0) Or (DdlTipo.SelectedValue.ToEntero = 2 And DdlClienteLiberacion.SelectedValue.ToEntero <= 0) Or (DdlTipo.SelectedValue.ToEntero = 3 And DdlProveedorLiberacion.SelectedValue.ToEntero <= 0) Then + DVInformacionMoviminetoLiberacion.Visible = False BtnGuardarLiberacion.Visible = False Else