diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 1a8716066..26432a79f 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -163,6 +163,25 @@ Public Class ClsVentas Return Retorno End Function + + Public Function Embarque_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_AGRO_Embarque_ManifiestoUpvta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = cveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@cveEmbarqueManifiesto", SqlDbType.Int).Value = cveEmbarqueManifiesto + .Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetTerminal") @@ -1612,7 +1631,7 @@ Public Class ClsVentas Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean + Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPS") @@ -1646,6 +1665,7 @@ Public Class ClsVentas .Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 End With @@ -1665,7 +1685,7 @@ Public Class ClsVentas Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean + Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPSDetalle") @@ -1703,6 +1723,7 @@ Public Class ClsVentas .Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 End With Try @@ -4792,7 +4813,7 @@ Public Class ClsVentas End Try Return retorno End Function - Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer) As Boolean + Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer, CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -4803,6 +4824,7 @@ Public Class ClsVentas .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try SqlAdapter.Fill(Data) diff --git a/Bin/BarcodeStandard.dll b/Bin/BarcodeStandard.dll new file mode 100644 index 000000000..49901517b Binary files /dev/null and b/Bin/BarcodeStandard.dll differ diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 221b694d8..34fda73c0 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -261,8 +261,8 @@ Partial Class PopUpVerFactura Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio")) Rem1Placa = row("Rem1Placa").ToString() NoFactura = row("NoFactura").ToString() - Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio")) - Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional") + Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio")) + Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional") NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString()) @@ -394,11 +394,12 @@ Partial Class PopUpVerFactura NoCajas = row("NoCajas").ToString() Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper() CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero() - NumberOfCode = String.Format("(01)00856977005186(13){0:ddMMyy}(10){0}01", Regex.Match(row("Cuadro").ToString(), "\\d+"), row("Fecha")) + NumberOfCode = String.Format("(01)00856977005186(13){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha")) 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)) @@ -410,16 +411,44 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo))) params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase))) + + 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}", noPallet), 50, 10) + 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 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/PalletEtiquetaCaja.rdlc" diff --git a/GPS/PalletEtiquetaCaja.rdlc b/GPS/PalletEtiquetaCaja.rdlc index 113da5366..50449af53 100644 --- a/GPS/PalletEtiquetaCaja.rdlc +++ b/GPS/PalletEtiquetaCaja.rdlc @@ -2,6 +2,13 @@ 0 + + + System.Data.DataSet + /* Local Connection */ + + 06ae5329-8ff5-42b5-b7f4-6d68e5186421 + System.Data.DataSet @@ -11,6 +18,26 @@ + + + dsImagenes + /* Local Query */ + + + + ImagenByte + System.Byte[] + + + + dsImagenes + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd + dtImagenes + + + + + DataSet @@ -72,7 +99,7 @@ - 0.6cm + 0.2825cm @@ -667,7 +694,7 @@ KM12 HERMOSILLO, SONORA - 0.52062cm + 0.4677cm @@ -856,7 +883,7 @@ KM12 HERMOSILLO, SONORA - 0.52062cm + 0.4677cm @@ -953,7 +980,7 @@ KM12 HERMOSILLO, SONORA - 0.54708cm + 0.4677cm @@ -1036,7 +1063,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.46771cm @@ -1197,7 +1224,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.46771cm @@ -1392,7 +1419,7 @@ KM12 HERMOSILLO, SONORA - 0.41479cm + 0.3258cm @@ -1475,7 +1502,7 @@ KM12 HERMOSILLO, SONORA - 0.09729cm + 0.07938cm @@ -1820,7 +1847,7 @@ KM12 HERMOSILLO, SONORA - 0.49417cm + 0.38834cm @@ -1963,7 +1990,7 @@ KM12 HERMOSILLO, SONORA - 0.46771cm + 0.36188cm @@ -2168,7 +2195,7 @@ KM12 HERMOSILLO, SONORA - 0.46771cm + 0.41479cm @@ -2315,7 +2342,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.52062cm @@ -2456,13 +2483,14 @@ KM12 HERMOSILLO, SONORA - 1.18209cm + 0.99688cm - - Embedded - CodBarr + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png FitProportional 5 + true @@ -2499,7 +2529,7 @@ KM12 HERMOSILLO, SONORA - 0.49417cm + 0.36188cm @@ -2580,7 +2610,7 @@ KM12 HERMOSILLO, SONORA - 1.12917cm + 1.0498cm @@ -2981,9 +3011,10 @@ Produce of MX. + DataSet1 0.07228cm 0.05625cm - 10.19917cm + 8.58414cm 10.52136cm - 4.23096in + 3.53304in