Validacion de impresion con DT nulo, motivos de traslados en comercio exterior

This commit is contained in:
2022-11-04 00:08:20 -07:00
parent b216769990
commit d97c0f4047

View File

@@ -6033,16 +6033,22 @@ Public Class ClsPaginas
Dim ds As New DataSet
For Each rpds As ReportDataSource In DataSource
If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
dt = dt.Copy()
dt.TableName = rpds.Name
ds.Tables.Add(dt)
If rpds.Value IsNot Nothing Then
If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
dt = dt.Copy()
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Else
Dim ojext As New WSRDLC2.ReportObjects
ojext.Name = rpds.Name
ojext.Value = rpds.Value
reportobjects.Add(ojext)
End If
Else
Dim ojext As New WSRDLC2.ReportObjects
ojext.Name = rpds.Name
ojext.Value = rpds.Value
reportobjects.Add(ojext)
Dim dt = New DataTable()
dt.TableName = If(String.IsNullOrEmpty(rpds.Name), "DataTable1", rpds.Name)
ds.Tables.Add(dt)
End If
Next
@@ -7146,7 +7152,10 @@ Public Class ClsPaginas
nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText
nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado") IsNot Nothing Then
nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
End If
nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText
@@ -7181,8 +7190,10 @@ Public Class ClsPaginas
End Try
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado") IsNot Nothing Then
CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
End If
CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText
@@ -7378,7 +7389,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("CEIncoterm", RCEIncoterm))
params.Add(New ReportParameter("CEId", CEId))
params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado))
params.Add(New ReportParameter("CETipoCamvio", CETipoCambio))
params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
End If