This commit is contained in:
Antonio Gonzalez
2020-02-04 11:37:14 -07:00
parent 59c8baa41c
commit f01acf7535
2 changed files with 30 additions and 22 deletions

View File

@@ -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()