diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 868b5c508..6d8c2930f 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -7,8 +7,7 @@ Imports System.Xml Imports Extensiones Imports iText.Barcodes.Dmcode Imports Microsoft.Reporting.WebForms -Imports Stimulsoft.Report -Imports Stimulsoft.Report.Web + Partial Class PopUpVerFactura Inherits ClsPaginas @@ -3400,12 +3399,8 @@ Partial Class PopUpVerFactura If Archivo.Exists Then If RegenerarPDF Then Archivo.Delete() - If UsuarioActual.Empresa.CvePlataforma = 2 Then - GeneraPDFVtaPyMe(Vta, "PDF") - Else - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF") - Vta = Nothing - End If + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF") + Vta = Nothing Else HttpContext.Current.Response.Clear() HttpContext.Current.Response.ClearContent() @@ -3418,20 +3413,11 @@ Partial Class PopUpVerFactura Archivo = Nothing End If Else - - '04/05/2018 - Se agrega seccion pruebas para generar factura venta .mrt para PyME - If UsuarioActual.Empresa.CvePlataforma = 2 Then - GeneraPDFVtaPyMe(Vta, "PDF") - Else - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF") - Vta = Nothing - End If + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF") + Vta = Nothing End If End If - - End If - End Sub #End Region @@ -6530,65 +6516,6 @@ Partial Class PopUpVerFactura End Sub #End Region -#Region "OP = VTA - PyME" - - ' 04/05/2018 - Pruebas de impresion de factura PyME - Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF") - Dim Directorio1 As String = String.Format("{0}Formatos\Factura.mrt", UsuarioActual.Empresa.Ruta) - Dim File As FileInfo = New FileInfo(Directorio1) - - If File.Exists Then - Dim Reporte As StiReport = New StiReport() - Reporte.Load(Directorio1) - Reporte.Dictionary.DataSources.Clear() - - Dim ds As DataSet = New DataSet() - Venta.DtDetalle.TableName = "Datos" - - ds.Tables.Add(Venta.DtDetalle) - - Reporte.RegData(ds) - - Reporte.Dictionary.Variables("Empresa").Value = UsuarioActual.Empresa.Empresa - - Reporte.Dictionary.Variables("Tipo").Value = "Ingreso" - Reporte.Dictionary.Variables("RFC").Value = UsuarioActual.Empresa.RFC - Reporte.Dictionary.Variables("Serie").Value = Venta.Serie - Reporte.Dictionary.Variables("Folio").Value = Venta.Folio.ToString() - - Reporte.Dictionary.Variables("ClienteNombre").Value = Venta.Cliente.Nombre - Reporte.Dictionary.Variables("ClienteDireccion").Value = Venta.Cliente.Direccion - Reporte.Dictionary.Variables("ClienteLugar").Value = Venta.Cliente.Ciudad - Reporte.Dictionary.Variables("ClienteRFC").Value = Venta.Cliente.RFC - - Reporte.Dictionary.Variables("DomicilioExpedicion").Value = Venta.SubProyecto.Direccion - - Dim SubtTotal As Decimal = (Venta.DtDetalle.SUM("PU") * Venta.DtDetalle.SUM("Cantidad")) '* 0.16 lleva el IVA? - Dim IVA As Decimal = SubtTotal * 0.16D 'lleva IVA? - Dim Total As Decimal = SubtTotal + IVA - - 'Reporte.Dictionary.Variables("Importe").Value = - Reporte.Dictionary.Variables("ImporteLetra").Value = Total.Texto2Letras() - - Reporte.Dictionary.Variables("SubTotal").Value = SubtTotal.ToString() - Reporte.Dictionary.Variables("IVA").Value = IVA.ToString() - Reporte.Dictionary.Variables("Total").Value = Total.ToString() - - Reporte.Dictionary.Variables("UsoCFDI").Value = Venta.UsoCFDI - Reporte.Dictionary.Variables("MetodoPago").Value = Venta.MetodoPago33 - Reporte.Dictionary.Variables("FormaPago").Value = Venta.FormaPago33 - - Reporte.Dictionary.Variables("QR").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Variables("SelloCFDI").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Variables("SelloSAT").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Synchronize() - - StiReportResponse.ResponseAsPdf(Me, Reporte) - Else - RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')") - End If - End Sub -#End Region #Region "OP = ENTREGAS - Entregas por realizar" Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)