From bff887d80838513b04e8b2282342e7f15ee30ed8 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 11 Jul 2023 08:30:39 -0700 Subject: [PATCH] inventarios --- App_Code/ClsCGame.vb | 6 ++--- Compras/PopUpVerFactura.aspx.vb | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index 1752e237e..1014e8fb0 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -3450,10 +3450,9 @@ Public Class ClsCGame With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa .Add("@FechaCalculo", SqlDbType.Date).Value = fechaCalculo - .Add("@ErrorMostrarADS", SqlDbType.VarChar).Direction = ParameterDirection.Output End With Try - SqlAdapter.Fill(DTSet) + SqlAdapter.Fill(Data) retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el reporte de inventario diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) @@ -3469,10 +3468,9 @@ Public Class ClsCGame With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa .Add("@FechaCalculo", SqlDbType.Date).Value = fechaCalculo - .Add("@ErrorMostrarADS", SqlDbType.VarChar).Direction = ParameterDirection.Output End With Try - SqlAdapter.Fill(DTSet) + SqlAdapter.Fill(Data) retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el reporte de inventario diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index be81921ca..0705365f3 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -229,6 +229,9 @@ Partial Class PopUpVerFactura If Request("onlyPrint").ToString() = "Recibo" Then ReciboAgropecuaria() End If + If Request("onlyPrint").ToString() = "CitrusInventarioDiario" Then + imprimirRepcitrusInventarioDiario("") + End If End If End If @@ -336,6 +339,47 @@ Partial Class PopUpVerFactura Response.End() End Sub + + Private Sub imprimirRepcitrusInventarioDiario(fecha As String) + Dim totalPallets As String = "" + Dim totalBachas As String = "" + Dim fechas As String = "" + Dim totalcajas As String = "" + + + Dim tablaReportePallets As New DataTable + Dim tablaReporteBins As New DataTable + + Using objnom As New ClsCGame + If objnom.REPInventarioDiarioPallets(DateTime.Now, UsuarioActual.CveEmpresa, "") And objnom.DtResultados.Rows.Count > 0 Then + tablaReportePallets = objnom.DtResultados + totalPallets = tablaReportePallets.SUM("Pallets", "GroupId =1").FormatoNumero(0) + totalBachas = tablaReportePallets.SUM("Bachas", "GroupId =1").FormatoNumero(0) + totalcajas = tablaReportePallets.SUM("CajasTotal", "GroupId =1").FormatoNumero(0) + End If + If objnom.REPInventarioDiarioBins(DateTime.Now, UsuarioActual.CveEmpresa, "") And objnom.DtResultados.Rows.Count > 0 Then + tablaReporteBins = objnom.DtResultados + End If + 'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f + End Using + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("totalPallets", totalPallets)) + params.Add(New ReportParameter("totalBachas", totalBachas)) + params.Add(New ReportParameter("totalcajas", totalcajas)) + params.Add(New ReportParameter("Fecha", fechas)) + + Dim lrds As New List(Of ReportDataSource) + Dim rds As New ReportDataSource With {.Name = "DataSetsPallets", .Value = tablaReportePallets} + lrds.Add(rds) + Dim rds2 As New ReportDataSource With {.Name = "DataSetBins", .Value = tablaReporteBins} + lrds.Add(rds2) + + '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" + Dim rutardlc = "Formatos\RepAgroInventarioDiario.rdlc" + ImprimirPDF(rutardlc, lrds, params, "Inventario") ', Content_Disposition:="Inline") + End Sub + + Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer) Dim NoEmbarque As String = "" Dim Fecha As String = ""