From f01acf75350e5d5d4f7ac013d2a609330bcf4da5 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 4 Feb 2020 11:37:14 -0700 Subject: [PATCH] . --- Compras/PopUpVerFactura.aspx.vb | 48 ++++++++++++++++++++------------- Ventas/PV.aspx | 4 --- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c31f4f01a..38f493d93 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1067,39 +1067,51 @@ Partial Class PopUpVerFactura If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then ObjVentas.DtResultados.Columns.Add("Importe", GetType(Decimal)) ObjVentas.DtResultados.Rows(0)("Importe") = ObjVentas.DtResultados.Rows(0)("Total") - Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") + Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") + If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then + Vta.DtNCVinculadas = ObjVentas.DtResultados + Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") + If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then + If Vta.TipoDocto.Contiene("Dev") Then + Vta.Timbre.CFDIRelacionados.TipoRelacion = "03" + Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" + End If + End If + End If End If End If Else - If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then - 'carga as notas de credito vinculadas - If ObjVentas.GetVentasAntNC(CveVenta, -1) Then - Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") - End If - End If + 'If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then + ' 'carga as notas de credito vinculadas + ' If ObjVentas.GetVentasAntNC(CveVenta, -1) Then + ' Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") + ' End If + 'End If - If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then - If ObjVentas.GetVentasAntNC(-1, CveVenta) Then + If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then + + If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then + Vta.DtNCVinculadas = ObjVentas.DtResultados Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL") If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then If Vta.TipoDocto.Contiene("Dev") Then Vta.Timbre.CFDIRelacionados.TipoRelacion = "03" Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" End If - End If + End If End If End If End If 'End If - If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then - If ObjVentas.GetVentasAntNC(-1, CveVenta) Then - Vta.DtNCVinculadas = ObjVentas.DtResultados - End If - If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then - Vta.FolioFiscal = ObjVentas.DtResultados.FiltroPrimeroValor("FolioFiscal") - End If - End If + 'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then + ' 'If ObjVentas.GetVentasAntNC(-1, CveVenta) Then + ' ' Vta.DtNCVinculadas = ObjVentas.DtResultados + ' 'End If + ' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then + ' Vta.DtNCVinculadas = ObjVentas.DtResultados + ' End If + 'End If End If ObjVentas.Dispose() diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index bf162ff6a..327dbb21f 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2333,7 +2333,6 @@
-
@@ -2354,7 +2353,6 @@
-
@@ -2385,8 +2383,6 @@
- -