Compras prodcutos servicios agrupador

This commit is contained in:
rakcsle
2021-11-08 10:49:08 -07:00
parent ab2c44d7ca
commit 97e0543c81
8 changed files with 285 additions and 95 deletions

View File

@@ -2906,13 +2906,14 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoResultadosGet") DataAdapter("PA_Inv_InventarioFisicoResultadosGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = GPO .Add("@GPO", SqlDbType.Int).Value = GPO
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2923,13 +2924,14 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance") DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = GPO .Add("@GPO", SqlDbType.Int).Value = GPO
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -191,6 +191,13 @@ Partial Class Compras_RepProductosServicios
DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10"))
DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11"))
DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) 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.DataBind()
DdlGrupo.SelectedValueExist("8") DdlGrupo.SelectedValueExist("8")
End Sub 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 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 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 If e.Row.DBCampo("GpoID") = "1" Then
e.Row.Cells(0).Text = e.Row.DBCampo("Moneda") e.Row.Cells(0).Text = e.Row.DBCampo("Moneda")
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"

View File

@@ -296,6 +296,12 @@ Partial Class Compras_RepProductosServiciosDetalle
DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10"))
DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11"))
DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) 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.DataBind()
DdlGrupo.SelectedValueExist("8") DdlGrupo.SelectedValueExist("8")
End Sub End Sub

View File

@@ -269,9 +269,10 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento
If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count = 2 Then If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count = 2 Then
Try Try
HDSegmentos.Value = DSDatos.Tables(2).Rows(0)(0).ToString HDSegmentos.Value = DSDatos.Tables(2).Rows(0)(0).ToString
liLnkDescarPersonalizado.Visible = True liLnkDescarPersonalizado.Visible = True
Catch ex As Exception Catch ex As Exception
End Try End Try

View File

@@ -254,8 +254,8 @@ Partial Class AC_RepEstadoActividades
End If End If
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then 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("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", 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&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
End If End If
@@ -283,8 +283,8 @@ Partial Class AC_RepEstadoActividades
End If End If
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then 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("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", 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&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
End If End If
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh> <AutoRefresh>0</AutoRefresh>
<DataSources> <DataSources>
<DataSource Name="DsOC"> <DataSource Name="DsOC">
@@ -1368,19 +1368,6 @@
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tel:6444153223</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Left>4.32565cm</Left> <Left>4.32565cm</Left>
@@ -4216,7 +4203,6 @@
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="ID2"> <EmbeddedImage Name="ID2">
<MIMEType>image/png</MIMEType> <MIMEType>image/png</MIMEType>

View File

@@ -75,6 +75,13 @@
Reporte de Inventario Fisico Reporte de Inventario Fisico
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional">
<ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton> <asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
</li> </li>
@@ -88,10 +95,9 @@
<li> <li>
<asp:LinkButton ID="ImgExcelProdcutosCoinciden" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos Coincidentes</asp:LinkButton> <asp:LinkButton ID="ImgExcelProdcutosCoinciden" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos Coincidentes</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LnkDescarExcelGrupos" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel </asp:LinkButton>
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional"> </li>
<ContentTemplate>
<li> <li>
<asp:LinkButton ID="btnFin" runat="server" Text="Finalizar Inventario" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" /> <asp:LinkButton ID="btnFin" runat="server" Text="Finalizar Inventario" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" />
</li> </li>
@@ -104,6 +110,11 @@
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:AsyncPostBackTrigger ControlID="btnFin" /> <asp:AsyncPostBackTrigger ControlID="btnFin" />
<asp:PostBackTrigger ControlID="LnkPDF" />
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="ImgExcel2" />
<asp:PostBackTrigger ControlID="ImgExcelProdcutosCoinciden" />
<asp:PostBackTrigger ControlID="LnkDescarExcelGrupos" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -125,6 +136,16 @@
<asp:ListItem Text="Cantidad" Value="2"></asp:ListItem> <asp:ListItem Text="Cantidad" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1 truncate">Vista de Resultados:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlVista" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Text="Ver por Detalle" Value="1"></asp:ListItem>
<asp:ListItem Text="Ver por Grupos" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
@@ -208,6 +229,12 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<br /> <br />
<asp:UpdatePanel runat="server" ID="UpGeneral" UpdateMode="Conditional">
<ContentTemplate>
<div runat="server" id="DVNormal">
<asp:UpdatePanel ID="UPAnomalias" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UPAnomalias" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
@@ -248,8 +275,8 @@
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<%--<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />--%> <asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" /> <asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
@@ -298,7 +325,7 @@
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" /> <%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" /> <asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
@@ -342,7 +369,7 @@
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" /> <%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" /> <asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
@@ -384,6 +411,70 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div runat="server" id="DVGrupos" visible="false" >
<div class="col-md-12">
<div class="row">
<div class="col-md-2" align="left" id="div2" runat="server">
<asp:Label runat="server">Registros Productos que Faltan: <b><asp:Literal ID="LtlGrupos1" runat="server"></asp:Literal></b></asp:Label>
</div>
<div class="col-md-2" align="left" id="div4" runat="server">
<asp:Label runat="server">Registros Productos que Sobran: <b><asp:Literal ID="LtlGrupos2" runat="server"></asp:Literal></b></asp:Label>
</div>
<div class="col-md-2" align="left" id="div5" runat="server">
<asp:Label runat="server">Registros Productos Coincidentes: <b><asp:Literal ID="LtlGrupos3" runat="server"></asp:Literal></b></asp:Label>
</div>
<div class="col-md-6" align="right" id="div3" runat="server">
<input type="text" id="TxtBusqueda4" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvGrupos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvGrupos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<asp:GridView ID="GvGrupos" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;"
GridLines="None" DataKeyNames="CvePS,PS,Grupo,Orden">
<Columns>
<asp:TemplateField Visible="false">
<HeaderTemplate>
<asp:CheckBox ID="ChkAllFaltante" runat="server"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkPSFaltante" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -97,11 +97,11 @@ Partial Class Inventarios_RepAnomalias
End If End If
If EsAvance Then If EsAvance Then
If Inventario.GetInventarioFisicoResultadosAvance(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then If Inventario.GetInventarioFisicoResultadosAvance(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero, DdlVista.SelectedValue.ToEntero) Then
dt = Inventario.DtResultados dt = Inventario.DtResultados
End If End If
Else Else
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero, DdlVista.SelectedValue.ToEntero) Then
dt = Inventario.DtResultados dt = Inventario.DtResultados
End If End If
End If End If
@@ -189,15 +189,29 @@ Partial Class Inventarios_RepAnomalias
End If End If
End If End If
End If End If
Inventario.Dispose() Inventario.Dispose()
If DdlVista.SelectedValue.ToEntero = 1 Then
DVNormal.Visible = True
DVGrupos.Visible = False
LnkPDF.Visible = True
ImgExcel.Visible = True
ImgExcel2.Visible = True
ImgExcelProdcutosCoinciden.Visible = True
LnkDescarExcelGrupos.Visible = False
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
GvS.DataSource = dt.FiltraParametros("Diferencia < 0") GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0") Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
GvS.DataBind() GvS.DataBind()
@@ -213,7 +227,7 @@ Partial Class Inventarios_RepAnomalias
GvC.DataBind() GvC.DataBind()
BanderaSerieLoteCad(GvC, DtC) BanderaSerieLoteCad(GvC, DtC)
Dim Script = ""
If (GvF.Rows.Count > 0) Then If (GvF.Rows.Count > 0) Then
GvF.UseAccessibleHeader = True GvF.UseAccessibleHeader = True
GvF.HeaderRow.TableSection = TableRowSection.TableHeader GvF.HeaderRow.TableSection = TableRowSection.TableHeader
@@ -239,11 +253,39 @@ Partial Class Inventarios_RepAnomalias
End If End If
PSIguales() PSIguales()
RegistraScript(Script)
UPAnomalias.Update() UPAnomalias.Update()
UpdateGvS.Update() UpdateGvS.Update()
UPDatos.Update() UPDatos.Update()
Else
DVNormal.Visible = False
DVGrupos.Visible = True
LnkPDF.Visible = False
ImgExcel.Visible = False
ImgExcel2.Visible = False
ImgExcelProdcutosCoinciden.Visible = False
LnkDescarExcelGrupos.Visible = True
GvGrupos.DataSource = dt
GvGrupos.DataBind()
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
PSIguales()
End If
UpGeneral.Update()
UPAcciones.Update()
End Sub End Sub
#End Region #End Region
@@ -274,6 +316,7 @@ Partial Class Inventarios_RepAnomalias
Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Costo") = "-1" Then If e.Row.DBCampo("Costo") = "-1" Then
e.Row.Cells(8).Text = "0" e.Row.Cells(8).Text = "0"
@@ -288,10 +331,12 @@ Partial Class Inventarios_RepAnomalias
e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);") e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
End If End If
End If End If
End Sub End Sub
Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Costo") = "-1" Then If e.Row.DBCampo("Costo") = "-1" Then
e.Row.Cells(8).Text = "0" e.Row.Cells(8).Text = "0"
@@ -306,6 +351,7 @@ Partial Class Inventarios_RepAnomalias
e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);") e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
End If End If
End If End If
End Sub End Sub
#Region " IMPRIMIR " #Region " IMPRIMIR "
@@ -386,6 +432,11 @@ Partial Class Inventarios_RepAnomalias
GvC.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString) GvC.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString)
End Sub End Sub
Private Sub LnkDescarExcelGrupos_Click(sender As Object, e As EventArgs) Handles LnkDescarExcelGrupos.Click
GvGrupos.ExportToExcel("Reporte de Inventario Fisico" & Now.ToShortDateString)
End Sub
#End Region #End Region
Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable) Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable)
@@ -531,6 +582,8 @@ Partial Class Inventarios_RepAnomalias
Private Sub PSIguales() Private Sub PSIguales()
Dim contadorF As Integer = 0 Dim contadorF As Integer = 0
Dim contadorS As Integer = 0 Dim contadorS As Integer = 0
If DdlVista.SelectedValue.ToEntero = 1 Then
For Each dtF As GridViewRow In GvF.Rows For Each dtF As GridViewRow In GvF.Rows
contadorS = 0 contadorS = 0
For Each dtS As GridViewRow In GvS.Rows For Each dtS As GridViewRow In GvS.Rows
@@ -542,9 +595,53 @@ Partial Class Inventarios_RepAnomalias
Next Next
contadorF += 1 contadorF += 1
Next Next
Else
For Each dtF As GridViewRow In GvGrupos.Rows
contadorS = 0
If dtF.DataKey("Orden").ToEntero = 1 And dtF.DataKey("CvePS").ToEntero > 0 Then
For Each dtS As GridViewRow In GvGrupos.Rows
If dtS.DataKey("Orden").ToEntero = 2 Then
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
GvGrupos.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
GvGrupos.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
End If
End If
contadorS += 1
Next
End If
contadorF += 1
Next
End If
End Sub End Sub
Private Sub GvGrupos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGrupos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("CvePS").ToString.ToEntero = 0 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(1).Text = e.Row.DataKey("Grupo").ToString
End If
End If
End Sub
End Class End Class