This commit is contained in:
2022-04-19 21:41:56 -07:00
49 changed files with 5106 additions and 4598 deletions

View File

@@ -360,10 +360,37 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Cultivo", Cultivo))
params.Add(New ReportParameter("noPallet", noPallet))
params.Add(New ReportParameter("Variedad", Variedad))
Dim tablaReporte As New DataTable
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), 500, 100)
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
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Pallet")
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet")
End Sub
Private Sub imprimirpallet(cvePallet As Integer)
Dim Envase As String = ""
@@ -377,6 +404,8 @@ Partial Class PopUpVerFactura
Dim NoCajas As String = ""
Dim NumberOfCode As String = ""
Dim CvetypeImpresion As Integer
Dim NumberSmall As String = ""
Dim NumberBig As String = ""
'Envase = "1 1/9"
'Tamano = "Small"
'Cultivo = "Tomate"
@@ -394,8 +423,9 @@ 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){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
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"))
End If
End Using
Dim params As New List(Of ReportParameter)
@@ -405,11 +435,13 @@ Partial Class PopUpVerFactura
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() = "tomate", "3", CvetypeImpresion.ToString())))
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))
@@ -431,10 +463,10 @@ Partial Class PopUpVerFactura
Dim bcode As New BarcodeLib.Barcode()
' Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim barcodebyte As Byte()
Using ms = New MemoryStream()
' img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
barcodebyte = ms.ToArray()
End Using
rowqr("ImagenByte") = barcodebyte
@@ -807,15 +839,15 @@ Partial Class PopUpVerFactura
DtCortesVentasResumen = ObjVenta.DtResultados
End If
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
DtCortesVentas = ObjPuntoVenta.DtResultados
If DtCortesVentas.Rows.Count > 0 Then
Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
' DtCortesVentas = ObjPuntoVenta.DtResultados
' If DtCortesVentas.Rows.Count > 0 Then
' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
Fecha = RowInfo("FechaInicial").ToString
Nombre = RowInfo("Nombre").ToString
End If
End If
' Fecha = RowInfo("FechaInicial").ToString
' Nombre = RowInfo("Nombre").ToString
' End If
'End If
ObjVenta.Dispose()
ObjPuntoVenta.Dispose()
Dim FechaCorte As String = $"&emsp;<b>Fecha fin:</b> {Fecha}"