From ac689171c296e52cded1a858a4bddf163b4166ef Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 17 Nov 2020 10:14:43 -0700 Subject: [PATCH] formato de fecha mejorado --- Compras/PopUpVerFactura.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 9f1b22c04..a9908b91c 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4346,7 +4346,7 @@ Partial Class PopUpVerFactura 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 FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate 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) @@ -4392,16 +4392,16 @@ Partial Class PopUpVerFactura ObjInventarios.Dispose() End Sub - Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As String, PS As String) As Byte() + Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte() Dim QrDescarga As String = "" Dim Cfdi As New RVCFDI33.GeneraCFDI() - Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, FechaCaducidad)) + Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString())) QrDescarga = Convert.ToBase64String(b) Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("QR", QrDescarga)) params.Add(New ReportParameter("PS", PS)) params.Add(New ReportParameter("Lote", Lote)) - params.Add(New ReportParameter("FechaCad", FechaCaducidad)) + params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString())) Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params) End Function #End Region