diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 5ed7caf39..92cd449be 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2978,6 +2978,53 @@ Public Class ClsNominas End Function #End Region + + + Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object) + SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor + End Sub + Public Function RunQuery(errormsg As String) As Boolean + Dim retorno As Boolean = False + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + retorno = False + OnError(errormsg, ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + + Public Function PA_AGRO_Embarque_ManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_AGRO_Embarque_ManifiestoGet", CommandType.StoredProcedure) + addParameters("@CveSubproyecto", SqlDbType.Int, cveSubproyecto) + addParameters("@CveUsuario", SqlDbType.Int, cveUsuario) + addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) + addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto) + retorno = RunQuery("Ocurrió un error al obtener el PA_AGRO_Embarque_ManifiestoGet.") + Return retorno + End Function + + Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure) + addParameters("@CvePallet", SqlDbType.Int, cvePallet) + addParameters("@CveCultivo", SqlDbType.Int, cveCultivo) + addParameters("@CveCultivoVariedad", SqlDbType.Int, cveCultivoVariedad) + addParameters("@CveEnvase", SqlDbType.Int, cveEnvase) + addParameters("@CveEtiqueta", SqlDbType.Int, cveEtiqueta) + addParameters("@CveEtiquetasporTarima", SqlDbType.Int, cveEtiquetasporTarima) + addParameters("@CveFormatoImpresion", SqlDbType.Int, cveFormatoImpresion) + addParameters("@CveTamaño", SqlDbType.Int, cveTamaño) + addParameters("@CveTipoTarima", SqlDbType.Int, cveTipoTarima) + addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) + addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto) + addParameters("@CveTemporada", SqlDbType.Int, cveTemporada) + retorno = RunQuery("Ocurrió un error al obtener el PA_Agro_Embarque_PalletGet.") + Return retorno + End Function + #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 63358b70f..bb6c90d07 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -3178,10 +3178,14 @@ Namespace Extensiones Public Sub SelectedValueExistInsert(Obj As DropDownList, Valor As Object, Texto As String) If (Obj.Items.FindByValue(Valor.ToString()) IsNot Nothing) Then - Obj.SelectedValue = Valor.ToString + Obj.SelectedValue = Valor.ToString() Else - Obj.Items.Insert(1, New ListItem(Texto, Valor.ToString)) - Obj.SelectedValue = Valor.ToString + If Obj.Items.Count > 0 Then + Obj.Items.Insert(1, New ListItem(Texto, Valor.ToString())) + Else + Obj.Items.Insert(0, New ListItem(Texto, Valor.ToString())) + End If + Obj.SelectedValue = Valor.ToString() End If End Sub diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index a92ab17f2..9250a2f5f 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -271,7 +271,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Response = context.Response Dim tablaReporte As New DataTable '"Empresas/Grales/Formatos/EquiposGPS.rdlc" - ImprimirPDF("D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS") + '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" + ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS") Return retorno End Function Private Function GetTokenAngular(context As HttpContext) As String diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 78b16ec63..eb9ccbd04 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -195,11 +195,84 @@ Partial Class PopUpVerFactura SeleccionaReporte(UrlParametros) End If End If - + If Request("onlyPrint") IsNot Nothing Then + If Request("onlyPrint").ToString() = "Pallet" Then + imprimirpallet2(Request("CvePallet").ToString.ToEntero()) + End If + If Request("onlyPrint").ToString() = "PalletCaja" Then + imprimirpallet(Request("CvePallet").ToString.ToEntero()) + End If + End If End If End Sub + Private Sub imprimirpallet2(cvePallet As Integer) + Dim Envase As String = "" + Dim Tamano As String = "" + Dim Cultivo As String = "" + Dim noPallet As String = "" + Dim Variedad As String = "" + + 'Envase = "1 1/9" + 'Tamano = "Small" + 'Cultivo = "Tomate" + 'noPallet = "000001" + 'Variedad = "Golden" + Using objnom As New ClsNominas + If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then + Dim row As DataRow = objnom.DtResultados.Rows(0) + Envase = row("Envase").ToString() + Tamano = row("Tamaño").ToString() + Cultivo = row("Cultivo").ToString() + noPallet = row("Codigo").ToString() + Variedad = row("CultivoVariedad").ToString() + + End If + + End Using + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("Envase", Envase)) + params.Add(New ReportParameter("Tamano", Tamano)) + params.Add(New ReportParameter("Cultivo", Cultivo)) + params.Add(New ReportParameter("noPallet", noPallet)) + params.Add(New ReportParameter("Variedad", Variedad)) + Dim tablaReporte As New DataTable + '"Empresas/Grales/Formatos/EquiposGPS.rdlc" + '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" + ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS") + End Sub + Private Sub imprimirpallet(cvePallet As Integer) + Dim Envase As String = "" + Dim Tamano As String = "" + Dim Cultivo As String = "" + Dim noPallet As String = "" + + 'Envase = "1 1/9" + 'Tamano = "Small" + 'Cultivo = "Tomate" + 'noPallet = "000001" + Using objnom As New ClsNominas + If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then + Dim row As DataRow = objnom.DtResultados.Rows(0) + Envase = row("Envase").ToString() + Tamano = row("Tamaño").ToString() + Cultivo = row("Cultivo").ToString() + noPallet = row("Codigo").ToString() + + End If + + End Using + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("Envase", Envase)) + params.Add(New ReportParameter("Tamano", Tamano)) + params.Add(New ReportParameter("Cultivo", Cultivo)) + params.Add(New ReportParameter("noPallet", noPallet)) + Dim tablaReporte As New DataTable + '"Empresas/Grales/Formatos/EquiposGPS.rdlc" + '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" + ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS") + End Sub #Region "U S U A R I O - T O K E N" Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario diff --git a/Documentacion/TableroMaterialidad.aspx b/Documentacion/TableroMaterialidad.aspx index 967e0483e..c7a5d2ecc 100644 --- a/Documentacion/TableroMaterialidad.aspx +++ b/Documentacion/TableroMaterialidad.aspx @@ -178,9 +178,64 @@ Información: Los documentos cargados serán relacionados en el periodo: - -
- +
+ +
+
+
+ + Paso 1: Procesar 'ZIP' +
+
+ +
+
+
+ Procesar +
+
+
+
+
+ +
+
+
+
+
+
+ + Paso 2: Guardar +
+
+ +
+
+
@@ -188,7 +243,7 @@