From 02134ff7c76832a9dd20f9e460b774dd5945f0b8 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 17 Nov 2020 10:06:16 -0700 Subject: [PATCH] =?UTF-8?q?en=20la=20recepci=C3=B3n=20de=20almac=C3=A9n=20?= =?UTF-8?q?se=20pueden=20generar=20etiquetas=20de=20la=20mercanc=C3=ADa=20?= =?UTF-8?q?que=20llega?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/PopUpVerFactura.aspx.vb | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 599678e03..9f1b22c04 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4343,13 +4343,12 @@ Partial Class PopUpVerFactura d.Open() If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then If ObjInventarios.DtResultados IsNot Nothing Then - If Modalidad = "Individual" Then - For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows - Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero - Dim Lote As String = DetalleRow.Item("Lote").ToString - Dim FechaCaducidad As String = DetalleRow.Item("FechaCaducidad").ToString - Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString) - + For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows + Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero + Dim Lote As String = DetalleRow.Item("Lote").ToString + Dim FechaCaducidad As String = DetalleRow.Item("FechaCaducidad").ToString + Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString) + If Modalidad = "Individual" Then Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS) Dim reader As New PdfReader(reporteByte) @@ -4359,13 +4358,7 @@ Partial Class PopUpVerFactura Contador += 1 Copy.AddPage(Copy.GetImportedPage(reader, Contador)) End While - Next - Else - For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows - Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero - Dim Lote As String = DetalleRow.Item("Lote").ToString - Dim FechaCaducidad As String = DetalleRow.Item("FechaCaducidad").ToString - Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString) + Else Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1 For contador As Integer = 0 To Cant @@ -4379,8 +4372,8 @@ Partial Class PopUpVerFactura Copy.AddPage(Copy.GetImportedPage(reader, Cont)) End While Next - Next - End If + End If + Next End If End If d.Close()