From 8156264b1ed0cc3de18d335ddd4bc3645c66b6e2 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Sat, 26 Nov 2022 15:16:36 -0700 Subject: [PATCH] --- App_Code/ClsNominas.vb | 12 + App_Code/ClsPaginas.vb | 1 + Compras/PopUpVerFactura.aspx.vb | 138 ++ GPS/PalletEtiquetaWalmart.rdlc | 2485 +++++++++++++++++++++++++++++++ Nomina/RepFiniquito.aspx | 140 ++ Nomina/RepFiniquito.aspx.cs | 49 + RH/Asistencias.aspx | 2 +- RH/Asistencias.aspx.vb | 4 +- 8 files changed, 2828 insertions(+), 3 deletions(-) create mode 100644 GPS/PalletEtiquetaWalmart.rdlc create mode 100644 Nomina/RepFiniquito.aspx create mode 100644 Nomina/RepFiniquito.aspx.cs diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 2c3753280..077de40dc 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3208,6 +3208,18 @@ Public Class ClsNominas Return retorno End Function + Public Function RepFiniquitos(cveSubproyecto As Int32, CveEstatusFiniquito As Int32, cveEmpresa As Int32, FechaInicio As String, FechaFin As String) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Nom_RepFiniquitos", CommandType.StoredProcedure) + addParameters("@CveSubProyecto", SqlDbType.Int, cveSubproyecto) + addParameters("@CveEstatusFiniquito", SqlDbType.Int, CveEstatusFiniquito) + addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) + addParameters("@FechaInicio", SqlDbType.VarChar, FechaInicio) + addParameters("@FechaFin", SqlDbType.VarChar, FechaFin) + retorno = RunQuery("Ocurrió un error al obtener el Embarque Manifiesto .") + Return retorno + End Function + Public Function EmbarquePalletGet(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, Optional agrupado As Boolean = False) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7bb89b66e..27356ad4f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5163,6 +5163,7 @@ Public Class ClsPaginas PaginaDict.Add("/Nomina/ConceptoNomina.aspx".ToUpper(), 172) PaginaDict.Add("/Nomina/CatPeriodos.aspx".ToUpper(), 177) PaginaDict.Add("/Nomina/Finiquito.aspx".ToUpper(), 197) + PaginaDict.Add("/Nomina/RepFiniquito.aspx".ToUpper(), 989) PaginaDict.Add("/Nomina/CatSatBancos.aspx".ToUpper(), 255) PaginaDict.Add("/Nomina/CatSatConceptos.aspx".ToUpper(), 256) PaginaDict.Add("/Nomina/CatSatRegimenContratacion.aspx".ToUpper(), 257) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 95e4fa60c..58c329720 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -211,6 +211,9 @@ Partial Class PopUpVerFactura If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then imprimirpallet(Request("CvePallet").ToString.ToEntero()) End If + If Request("onlyPrint").ToString() = "PalletCaja2" AndAlso Not IsNothing(Request("CvePallet")) Then + imprimirpalletWalamart(Request("CvePallet").ToString.ToEntero()) + End If If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero()) @@ -857,6 +860,141 @@ Partial Class PopUpVerFactura '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet", Content_Disposition:="Inline") End Sub + + + Private Sub imprimirpalletWalamart(cvePallet As Integer) + Dim Envase As String = "" + Dim Tamano As String = "" + Dim Cultivo As String = "" + Dim Cultivoingles As String = "" + Dim noPallet As String = "" + Dim FormatoImpresion As String = "" + Dim Consecutivo As String = "" + Dim Fecha As String = "" + Dim NoCajas As String = "" + Dim NumberOfCode As String = "" + Dim CvetypeImpresion As Integer + Dim NumberSmall As String = "" + Dim NumberBig As String = "" + Dim GTINAll As String = "" + Dim Peso As String = "" + Dim GTIN As String = "" + Dim PLU As String = "" + 'Envase = "1 1/9" + 'Tamano = "Small" + 'Cultivo = "Tomate" + 'noPallet = "000001" + Using objnom As New ClsNominas + If objnom.EmbarquePalletGet(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() + Cultivoingles = row("Cultivoingles").ToString() + noPallet = row("Codigo").ToString() + FormatoImpresion = row("FormatoImpresion").ToString() + Consecutivo = row("Consecutivo").ToString() + NoCajas = row("NoCajas").ToString() + Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper() + CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero() + NumberOfCode = String.Format("(00)00000000000000(00){1:ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha")) + 'NumberSmall = String.Format("{0:00}", noPallet.ToEntero()) + 'NumberBig = String.Format("{0:00}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha")) + + + NumberSmall = row("NumberSmall").ToString() + NumberBig = row("NumberBig").ToString() + GTINAll = row("GTINAll").ToString() + Peso = row("PesoText").ToString() + GTIN = row("GTIN").ToString() + PLU = row("PLU").ToString() + + End If + End Using + Dim params As New List(Of ReportParameter) + + params.Add(New ReportParameter("Tamano", Tamano)) + params.Add(New ReportParameter("noPallet", noPallet)) + params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion)) + params.Add(New ReportParameter("Consecutivo", Consecutivo)) + params.Add(New ReportParameter("Fecha", Fecha)) + params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower().Contains("tomate"), "3", CvetypeImpresion.ToString()))) + params.Add(New ReportParameter("NoCajas", NoCajas)) + params.Add(New ReportParameter("NumberOfCode", NumberOfCode)) + params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo))) + params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase))) + params.Add(New ReportParameter("NumberSmall", NumberSmall)) + params.Add(New ReportParameter("NumberBig", NumberBig)) + params.Add(New ReportParameter("GTINAll", GTINAll)) + params.Add(New ReportParameter("Peso", Peso)) + params.Add(New ReportParameter("GTIN", GTIN)) + params.Add(New ReportParameter("PLU", PLU)) + + + + Dim tablaReporte As New DataTable + tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String))) + tablaReporte.Rows.Add(tablaReporte.NewRow) + tablaReporte.Rows.Add(tablaReporte.NewRow) + + Dim lrds As New List(Of ReportDataSource) + + 'img + Dim dtqr As New DataTable + Dim column As DataColumn = New DataColumn("ImagenByte") + column.DataType = System.Type.[GetType]("System.Byte[]") + column.AllowDBNull = True + column.Caption = "ImagenByte" + dtqr.Columns.Add(column) + Dim rowqr As DataRow = dtqr.NewRow() + + + Dim bcode As New BarcodeLib.Barcode() + Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTIN), 500, 200) + Dim barcodebyte As Byte() + Using ms = New MemoryStream() + img.Save(ms, System.Drawing.Imaging.ImageFormat.Png) + barcodebyte = ms.ToArray() + End Using + rowqr("ImagenByte") = barcodebyte + + dtqr.Rows.Add(rowqr) + Dim rds2 As New ReportDataSource With {.Name = "dsImagenes", .Value = dtqr} + rds2.Name = "dsImagenes" + rds2.Value = dtqr + lrds.Add(rds2) + 'endimg + + + Dim dtqr2 As DataTable = dtqr.Clone() + + Dim bcode2 As New BarcodeLib.Barcode() + Dim img2 = bcode2.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTINAll.Replace("(", "").Replace(")", "")), 900, 100) + Dim barcodebyte2 As Byte() + Using ms = New MemoryStream() + img2.Save(ms, System.Drawing.Imaging.ImageFormat.Png) + barcodebyte2 = ms.ToArray() + End Using + Dim rowqr2 As DataRow = dtqr2.NewRow() + rowqr2("ImagenByte") = barcodebyte2 + dtqr2.Rows.Add(rowqr2) + Dim rds22 As New ReportDataSource With {.Name = "dsImagenesGTIN", .Value = dtqr2} + lrds.Add(rds22) + + + + Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte} + lrds.Add(rds) + + '"Empresas/Grales/Formatos/EquiposGPS.rdlc" + '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" + Dim ruta As String = "GPS/PalletEtiquetaWalmart.rdlc" + 'If CvetypeImpresion = 2 Then + ' ruta = "GPS/PalletEtiqueta_2.rdlc" + 'End If + ImprimirPDF(ruta, lrds, params, "Pallet Caja", Content_Disposition:="Inline") + End Sub + Private Sub imprimirpallet(cvePallet As Integer) Dim Envase As String = "" Dim Tamano As String = "" diff --git a/GPS/PalletEtiquetaWalmart.rdlc b/GPS/PalletEtiquetaWalmart.rdlc new file mode 100644 index 000000000..05f8985f9 --- /dev/null +++ b/GPS/PalletEtiquetaWalmart.rdlc @@ -0,0 +1,2485 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 06ae5329-8ff5-42b5-b7f4-6d68e5186421 + + + + System.Data.DataSet + /* Local Connection */ + + 06ae5329-8ff5-42b5-b7f4-6d68e5142861 + + + + System.Data.DataSet + /* Local Connection */ + + db271139-498f-42f1-b0bc-9c6d57014da7 + + + + + + dsImagenes + /* Local Query */ + + + + ImagenByte + System.Byte[] + + + + dsImagenes + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd + dtImagenes + + + + + + + + dsImagenesGTIN + /* Local Query */ + + + + ImagenByte + System.Byte[] + + + + dsImagenesGTIN + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd + dtImagenesGTIN + + + + + + + + DataSet + /* Local Query */ + + + + Codigo + System.String + + + + DataSet + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd + DataTable1 + + + + + + + + + + + + + + + 1.6cm + + + 1.07125cm + + + 0.60348cm + + + 0.16cm + + + 0.84cm + + + 0.85cm + + + 0.25cm + + + 1.6cm + + + 0.84cm + + + 0.46cm + + + 0.16cm + + + 0.84cm + + + 0.95583cm + + + + + 0.70407cm + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenesGTIN") + image/png + FitProportional + + + 1pt + + + 6 + + + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenesGTIN") + image/png + FitProportional + + + 1pt + + + 6 + + + + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Parameters!GTINAll.Value + + + + + + + Textbox129 + + + 1pt + 1pt + + + 6 + + + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!GTINAll.Value + + + + + + + Textbox135 + + + 1pt + 1pt + + + 6 + + + + + + + + + + + 0.36187cm + + + + + true + true + + + + + =Microsoft.VisualBasic.Strings.Trim(Parameters!Cultivo.Value) + + + + + + 1pt + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + Harvest Date + + + + + + + Textbox628 + + + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Microsoft.VisualBasic.Strings.Trim(Parameters!Cultivo.Value) + + + + + + 1pt + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + Harvest Date + + + + + + + Textbox628 + + + 1pt + 1pt + + + 3 + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Parameters!Peso.Value + + + + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox71 + + + 1pt + 1pt + 1pt + 1pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Peso.Value + + + + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox71 + + + 1pt + 1pt + 1pt + 1pt + + + 2 + + + + + + + 0.2825cm + + + + + true + true + + + + + US #1 + + + + + + + + 2 + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + PLU + + + + + + + Textbox149 + + + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + US #1 + + + + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + PLU + + + + + + + Textbox149 + + + + + 2 + + + + + + + 0.38834cm + + + + + true + true + + + + + Product of México + + + + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!PLU.Value + + + + + + + Textbox208 + + + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Product of México + + + + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!PLU.Value + + + + + + + Textbox208 + + + + + 2 + + + + + + + 0.36187cm + + + + + true + true + + + + + AGROPECUARIA JAM, S.A. DE C.V. + + + + + + + + 6 + + + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + AGROPECUARIA JAM, S.A. DE C.V. + + + + + + + + 6 + + + + + + + + + + + 0.6cm + + + + + true + true + + + + + CARR. A BAHIA DE KINO KM12 HERMOSILLO, SONORA + + + + + + + + 6 + + + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CARR. A BAHIA DE KINO KM12 HERMOSILLO, SONORA + + + + + + + + 6 + + + + + + + + + + + 0.6cm + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png + FitProportional + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!NumberSmall.Value + + + + + + + Textbox851 + + + Black + Middle + + + + + + + + true + true + + + + + =Parameters!NumberBig.Value + + + + + + + Textbox852 + + + Black + Middle + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png + FitProportional + + + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!NumberSmall.Value + + + + + + + Textbox851 + + + Black + Middle + + + + + + + + true + true + + + + + =Parameters!NumberBig.Value + + + + + + + Textbox852 + + + Black + Middle + + + + + + + + 0.30896cm + + + + + true + true + + + + + =Parameters!GTIN.Value + + + + + + + Textbox558 + + + 1pt + 1pt + + + 2 + true + + + + + + + true + true + + + + + + + + + + + + Textbox42 + + + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!GTIN.Value + + + + + + + Textbox558 + + + 1pt + 1pt + + + 2 + + + + + + + true + true + + + + + + + + + + + + Textbox44 + + + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + =Parameters!FormatoImpresion.Value = "Sencillas" + + + + + + =Parameters!FormatoImpresion.Value = "Sencillas" + + + + + =Parameters!FormatoImpresion.Value = "Sencillas" + + + + + =Parameters!FormatoImpresion.Value = "Sencillas" + + + + + =Parameters!FormatoImpresion.Value = "Sencillas" + + + + + + + + + + + + + + + + + + + + + + + + DataSet1 + 4.49011cm + 10.23056cm + + + + + + 1.82354in +