Ferretera. cambios en la generacion de codigo de barras.
This commit is contained in:
@@ -2208,7 +2208,7 @@ Partial Class ProductosyServicios
|
||||
#Region "Codigo Barras"
|
||||
|
||||
'Codigo barras/QR se retorna como una imagen bmp
|
||||
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String) As Byte()
|
||||
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||
|
||||
Dim barcodeWriter As New BarcodeWriter
|
||||
Dim opciones As New ZXing.Common.EncodingOptions
|
||||
@@ -2218,7 +2218,7 @@ Partial Class ProductosyServicios
|
||||
opciones.Height = Alto
|
||||
opciones.Width = Largo
|
||||
opciones.Margin = Margen
|
||||
|
||||
opciones.PureBarcode = PureBacode
|
||||
barcodeWriter.Options = opciones
|
||||
|
||||
Select Case Formato
|
||||
@@ -3582,6 +3582,13 @@ Partial Class ProductosyServicios
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtPrecios IsNot Nothing Then
|
||||
|
||||
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||
|
||||
For Each Row As DataRow In DtPrecios.Rows
|
||||
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||
Next
|
||||
|
||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||
|
||||
Reference in New Issue
Block a user