From 97e0543c813821a15f91c65e1709c51f00a9c202 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 8 Nov 2021 10:49:08 -0700 Subject: [PATCH] Compras prodcutos servicios agrupador --- App_Code/ClsInventarios.vb | 6 +- Compras/RepProductosServicios.aspx.vb | 9 +- Compras/RepProductosServiciosDetalle.aspx.vb | 6 + .../RepEstadoResultadosPorSegmento.aspx.vb | 3 +- Contabilidad2/RepEstadoActividades.aspx.vb | 8 +- Empresas/160/Formatos/Factura.rdlc | 16 +- Inventarios/RepAnomalias.aspx | 131 ++++++++++-- Inventarios/RepAnomalias.aspx.vb | 201 +++++++++++++----- 8 files changed, 285 insertions(+), 95 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 605070a2a..34bdd0d95 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2906,13 +2906,14 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean + Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try SqlAdapter.Fill(Data) @@ -2923,13 +2924,14 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultadosAvance(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean + Public Function GetInventarioFisicoResultadosAvance(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadoAvance") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try SqlAdapter.Fill(Data) diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb index bed86756b..b3d4480b2 100644 --- a/Compras/RepProductosServicios.aspx.vb +++ b/Compras/RepProductosServicios.aspx.vb @@ -191,6 +191,13 @@ Partial Class Compras_RepProductosServicios DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) + + 'Agrega el grupo si es una empresa Agricola + If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15")) + End If + + DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("8") End Sub @@ -296,7 +303,7 @@ Partial Class Compras_RepProductosServicios Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If DdlGrupo.SelectedValue.ToEntero < 13 Then + If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Then If e.Row.DBCampo("GpoID") = "1" Then e.Row.Cells(0).Text = e.Row.DBCampo("Moneda") e.Row.CssClass = "Totales" diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index 9e444510f..879869d8f 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -296,6 +296,12 @@ Partial Class Compras_RepProductosServiciosDetalle DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) + + 'Agrega el grupo si es una empresa Agricola + If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15")) + End If + DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("8") End Sub diff --git a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb index a62d5c72a..f1953d5d4 100644 --- a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb +++ b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb @@ -269,9 +269,10 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count = 2 Then Try - HDSegmentos.Value = DSDatos.Tables(2).Rows(0)(0).ToString + liLnkDescarPersonalizado.Visible = True + Catch ex As Exception End Try diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index c9d8051e6..4f11a4492 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -254,8 +254,8 @@ Partial Class AC_RepEstadoActividades End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If @@ -283,8 +283,8 @@ Partial Class AC_RepEstadoActividades End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then diff --git a/Empresas/160/Formatos/Factura.rdlc b/Empresas/160/Formatos/Factura.rdlc index e33bc8fad..d5a7c40d2 100644 --- a/Empresas/160/Formatos/Factura.rdlc +++ b/Empresas/160/Formatos/Factura.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -1368,19 +1368,6 @@ - - -