diff --git a/AF/AF.aspx b/AF/AF.aspx index 7660f2441..741f42d39 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -1182,7 +1182,7 @@ - + @@ -2188,7 +2188,7 @@ - + diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 66b751121..5da9f7191 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -14,7 +14,11 @@ Partial Class AF_AF 'Configuración #Region "PROPIEDADES" Private Property CveActivoFijo As Integer - Get + Get + + If ViewState("CveActivoFijo") Is Nothing Then + ViewState("CveActivoFijo") = -1 + End If Return ViewState("CveActivoFijo").ToString.ToEntero End Get Set(value As Integer) @@ -22,7 +26,10 @@ Partial Class AF_AF End Set End Property Private Property CodigoAF As String - Get + Get + If ViewState("CodigoAF") Is Nothing Then + ViewState("CodigoAF") = "" + End If Return ViewState("CodigoAF").ToString End Get Set(value As String) @@ -294,6 +301,8 @@ Partial Class AF_AF CargaCuentasContables() End If + CargaCombos() + If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then ViewState("CveActivoFijo") = Request("CveActivoFijo") CargaDatos() @@ -311,8 +320,8 @@ Partial Class AF_AF HlEvento.Visible = True HlEvento.NavigateUrl = String.Format("/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveActivoFijo=" & CveActivoFijo & "&TB_iframe=true&height=370&width=600;") Else - ViewState("CveActivoFijo") = -1 - CargaCombos() + ViewState("CveActivoFijo") = -1 + 'Configuración de Modalidad Insert ImgAddObs.Visible = False @@ -422,18 +431,38 @@ Partial Class AF_AF CveEmpresaActual = UsuarioActual.CveEmpresa End Sub - Private Sub ModalidadesPaginaAF(Op As String) + Private Sub ModalidadesPaginaAF(Optional Op As String = "") - Select Case Op - Case "AR" 'Arbol Frutal etc - LblFechaCompra.Text = "Fecha de Nacimiento" - LblFechaBaja.Text = "Fecha de Muerte" - TabProduccion.Visible = True - Exit Select - Case Else - Exit Select - End Select + TabProduccion.Visible = False + TabPlagaEnfermedad.Visible = False + TabServyMant.Visible = False + LblFechaCompra.Text = "Fecha de Compra:" + LblFechaBaja.Text = "Fecha de Baja:" + + 'Arbol Frutal + If DdlTipoActivoFijo.SelectedValue.ToEntero = 150 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1936 And CveActivoFijo > 0 Then + LblFechaCompra.Text = "Fecha de Nacimiento" + LblFechaBaja.Text = "Fecha de Muerte" + TabProduccion.Visible = True + End If + + 'Arbol Apicola + If DdlTipoActivoFijo.SelectedValue.ToEntero = 151 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1937 And CveActivoFijo > 0 Then + TabPlagaEnfermedad.Visible = True + End If + + 'Pozos + If DdlTipoActivoFijo.SelectedValue.ToEntero = 152 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1938 And CveActivoFijo > 0 Then + TabServyMant.Visible = True + End If + + 'Inmuebles + If DdlTipoActivoFijo.SelectedValue.ToEntero = 153 And DdlSubTipoActivoFijo.SelectedValue.ToEntero = 1939 And CveActivoFijo > 0 Then + + End If + + UpDatos.Update() End Sub @@ -467,13 +496,18 @@ Partial Class AF_AF Private Sub CargaTipoActivoFijo() DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(CveEmpresaActual).FiltraParametros("", "TipoActivoFijo") DdlTipoActivoFijo.DataBind() + CargaSubTipoActivoFijo() End Sub Private Sub CargaSubTipoActivoFijo() + DdlSubTipoActivoFijo.Items.Clear() DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(CveEmpresaActual).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFijo.SelectedValue), "SubTipoActivoFijo") DdlSubTipoActivoFijo.DataBind() DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubTipoActivoFijo.SelectedIndex = 0 + + UpDatos.Update() + End Sub Private Sub CargaDispositivos() DivDispositivo.Visible = False @@ -556,6 +590,7 @@ Partial Class AF_AF Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged CargaFolios() + ModalidadesPaginaAF() End Sub Private Sub CargaFolios() @@ -2744,6 +2779,7 @@ Partial Class AF_AF Protected Sub DdlSubTipoActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTipoActivoFijo.SelectedIndexChanged CargaCaracteristicas() CargaDispositivos() + ModalidadesPaginaAF() End Sub #Region "CARGAR CUENTA CONTABLE" diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index d5b839932..fa2e5a85b 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -81,16 +81,27 @@ + ToolTip="Listado de Movimientos" DataKeyNames="EsDistribuidor,Codigo,Codigo_Clientes,Total,CveCliente,NombreComercial,CvePS,CveVenta,SerieFolio,Cantidad" CssClass="Widthall table table-striped table-hover ScrollAD" GridLines="None"> + + + <%----%> + + + + - - <%--OnClick="CargarVentasGrupo"--%> - + + + + + + + diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 25e180f3d..cae0e6c31 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -65,10 +65,25 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then + If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" And e.Row.DataKey("CveVenta").ToString.ToEntero = 0 Then e.Row.CssClass = "SubTotales2" End If + + If e.Row.DataKey("CveVenta").ToString.ToEntero > 0 Then + e.Row.Cells(1).Text = $"{e.Row.DataKey("SerieFolio")}" + Else + e.Row.Cells(2).Text = "" + e.Row.Cells(3).Text = "" + e.Row.Cells(4).Text = "" + 'e.Row.Cells(6).Text = "" + End If + + If e.Row.DataKey("EsDistribuidor") <> "" Then + e.Row.Cells(5).Text = $"{e.Row.DataKey("Total").ToDecimal.ToString("###,###,###.00")}" + End If + + End If End Sub diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 2d7da6a41..75e8cd605 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1156,7 +1156,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoDetalle As Integer = -1) As Boolean + Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoDetalle As Integer = -1, Optional Resumen As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleGet") @@ -1165,6 +1165,8 @@ Public Class ClsInventarios .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCompra", SqlDbType.Int).Value = CveCompra .Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle + .Add("@Resumen", SqlDbType.Int).Value = Resumen + End With Try SqlAdapter.Fill(Data) @@ -1209,13 +1211,14 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosDetalleImpresion(CveMovimiento As Integer, CveEmpresa As Integer) As Boolean + Public Function GetMovimientosDetalleImpresion(CveMovimiento As Integer, CveEmpresa As Integer, Optional Resumen As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleImpresionGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Resumen", SqlDbType.Bit).Value = Resumen End With Try SqlAdapter.Fill(Data) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 61ecb326a..c07e6faa8 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -539,6 +539,12 @@ Partial Class PopUpVerFactura End If End If + If UrlParametros("OP").ToString = "Almr" Then + If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then + CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=True) + End If + End If + If UrlParametros("OP").ToString = "Etiqueta" Then If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then ImprimirEtiqueta(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, UrlParametros("MODALIDAD").ToString) @@ -2270,7 +2276,7 @@ Partial Class PopUpVerFactura #Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN " - Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer) + Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False) Dim ObjInventarios As New ClsInventarios ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) @@ -2366,11 +2372,11 @@ Partial Class PopUpVerFactura Dim CantidadUsados As Decimal = 0 If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE - If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then + If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then DtMovimientos = ObjInventarios.DtResultados If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then - If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then + If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimientoRelacionado, UsuarioActual.CveEmpresa, Resumen:=Resumen) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then Dim CveAlmacenRelacionado As Integer = ObjInventarios.DtResultados.Rows(0)("CveAlmacen").ToString().ToEntero() Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero @@ -2400,7 +2406,7 @@ Partial Class PopUpVerFactura DtMovimientos.PrimaryKey = keys End If Else - If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then + If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then DtMovimientos = ObjInventarios.DtResultados.Copy() CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal() If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then diff --git a/Empresas/140/Formatos/RepEntradasUsadosClientes.rdlc b/Empresas/140/Formatos/RepEntradasUsadosClientes.rdlc index b3872bef7..71646abd5 100644 --- a/Empresas/140/Formatos/RepEntradasUsadosClientes.rdlc +++ b/Empresas/140/Formatos/RepEntradasUsadosClientes.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -25,10 +25,34 @@ Codigo_Clientes System.String + + SerieFolio + System.String + + + CveVenta + System.Int + + + Folio + System.String + + + Fecha + System.Date + + + SubProyecto + System.String + Total System.String + + TotalImporte + System.String + EsHeader System.String @@ -55,15 +79,27 @@ 1.60534cm - 15.36419cm + 5.44232cm - 3.08282cm + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm - 0.58521cm + 0.37354cm @@ -110,7 +146,7 @@ - =Fields!Codigo_Clientes.Value + =IIF( Fields!CveVenta.Value > 0, Fields!SerieFolio.Value,Fields!Codigo_Clientes.Value) + + + + + + Folio + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + + SubProyecto + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + @@ -150,12 +295,12 @@ @@ -174,6 +319,43 @@ + + + + true + true + + + + + =Fields!TotalImporte.Value + + + + + + + TotalImporte + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + @@ -183,6 +365,10 @@ + + + + @@ -195,8 +381,8 @@ DataSet1 0.17639cm 0.08377cm - 0.58521cm - 20.05235cm + 0.37354cm + 19.54766cm @@ -423,7 +609,7 @@ 3.27766cm 1.68911cm 0.6cm - 15.36419cm + 5.44232cm 5 @@ -456,9 +642,9 @@ Textbox1 3.27766cm - 17.0533cm + 17.13143cm 0.6cm - 3.08282cm + 2.5cm 6 + + true + true + + + + + Mov. Amacen + + + + + + + Textbox3 + 3.27766cm + 7.13143cm + 0.6cm + 2.5cm + 7 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox3 + 3.27766cm + 9.63143cm + 0.6cm + 2.5cm + 8 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Proyecto + + + + + + + Textbox3 + 3.27766cm + 12.13143cm + 0.6cm + 2.5cm + 9 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cantidad + + + + + + + Textbox3 + 3.27766cm + 14.63143cm + 0.6cm + 2.5cm + 10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + - 1.05208in + 1.03125in @@ -204,7 +204,7 @@ Textbox4 1.93416in - 0.56139in + 0.53361in 3.62386in 4