Compras prodcutos servicios agrupador
This commit is contained in:
@@ -97,11 +97,11 @@ Partial Class Inventarios_RepAnomalias
|
||||
End If
|
||||
|
||||
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
|
||||
End If
|
||||
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
|
||||
End If
|
||||
End If
|
||||
@@ -189,61 +189,103 @@ Partial Class Inventarios_RepAnomalias
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Inventario.Dispose()
|
||||
|
||||
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 GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
|
||||
If DdlVista.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
||||
GvS.DataBind()
|
||||
BanderaSerieLoteCad(GvS, DtS)
|
||||
DVNormal.Visible = True
|
||||
DVGrupos.Visible = False
|
||||
|
||||
GvF.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||
Dim DtF As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||
GvF.DataBind()
|
||||
BanderaSerieLoteCad(GvF, DtF)
|
||||
LnkPDF.Visible = True
|
||||
ImgExcel.Visible = True
|
||||
ImgExcel2.Visible = True
|
||||
ImgExcelProdcutosCoinciden.Visible = True
|
||||
LnkDescarExcelGrupos.Visible = False
|
||||
|
||||
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
|
||||
GvC.DataSource = DtC
|
||||
GvC.DataBind()
|
||||
BanderaSerieLoteCad(GvC, DtC)
|
||||
|
||||
Dim Script = ""
|
||||
If (GvF.Rows.Count > 0) Then
|
||||
GvF.UseAccessibleHeader = True
|
||||
GvF.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
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 GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
||||
GvS.DataBind()
|
||||
BanderaSerieLoteCad(GvS, DtS)
|
||||
|
||||
GvF.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||
Dim DtF As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||
GvF.DataBind()
|
||||
BanderaSerieLoteCad(GvF, DtF)
|
||||
|
||||
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
|
||||
GvC.DataSource = DtC
|
||||
GvC.DataBind()
|
||||
BanderaSerieLoteCad(GvC, DtC)
|
||||
|
||||
|
||||
If (GvF.Rows.Count > 0) Then
|
||||
GvF.UseAccessibleHeader = True
|
||||
GvF.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosFaltan.Visible = True
|
||||
LtlTotalRegistrosFaltan.Text = GvF.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvS.Rows.Count > 0) Then
|
||||
GvS.UseAccessibleHeader = True
|
||||
GvS.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosSobran.Visible = True
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvC.Rows.Count > 0) Then
|
||||
GvC.UseAccessibleHeader = True
|
||||
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosCoinciden.Visible = True
|
||||
LtlCoincidentes.Text = GvC.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
PSIguales()
|
||||
|
||||
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.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()
|
||||
|
||||
divRegistradosFaltan.Visible = True
|
||||
LtlTotalRegistrosFaltan.Text = GvF.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvS.Rows.Count > 0) Then
|
||||
GvS.UseAccessibleHeader = True
|
||||
GvS.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosSobran.Visible = True
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
UpGeneral.Update()
|
||||
UPAcciones.Update()
|
||||
|
||||
If (GvC.Rows.Count > 0) Then
|
||||
GvC.UseAccessibleHeader = True
|
||||
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosCoinciden.Visible = True
|
||||
LtlCoincidentes.Text = GvC.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
PSIguales()
|
||||
RegistraScript(Script)
|
||||
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -274,6 +316,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
|
||||
|
||||
Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
@@ -288,10 +331,12 @@ Partial Class Inventarios_RepAnomalias
|
||||
e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
@@ -306,6 +351,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
@@ -386,6 +432,11 @@ Partial Class Inventarios_RepAnomalias
|
||||
GvC.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString)
|
||||
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
|
||||
|
||||
Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable)
|
||||
@@ -531,20 +582,66 @@ Partial Class Inventarios_RepAnomalias
|
||||
Private Sub PSIguales()
|
||||
Dim contadorF As Integer = 0
|
||||
Dim contadorS As Integer = 0
|
||||
For Each dtF As GridViewRow In GvF.Rows
|
||||
contadorS = 0
|
||||
For Each dtS As GridViewRow In GvS.Rows
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvS.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvF.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
contadorS += 1
|
||||
|
||||
If DdlVista.SelectedValue.ToEntero = 1 Then
|
||||
For Each dtF As GridViewRow In GvF.Rows
|
||||
contadorS = 0
|
||||
For Each dtS As GridViewRow In GvS.Rows
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvS.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvF.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
contadorS += 1
|
||||
Next
|
||||
contadorF += 1
|
||||
Next
|
||||
contadorF += 1
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user