This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-12-17 08:19:26 -07:00
parent 04ab0c963c
commit 46c5c017dc
15 changed files with 2945 additions and 427 deletions

View File

@@ -1122,6 +1122,14 @@ namespace ADSistemaLibrary2.SatXml
{
int cDepth = xtr.Depth;
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
{
}
while (canread && xtr.Depth > cDepth)
{
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "TimbreFiscalDigital" && xmlCFDI.comprobante.Version != null)
@@ -1136,9 +1144,29 @@ namespace ADSistemaLibrary2.SatXml
xmlCFDI.complemento.NoCertificadoSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("NoCertificadoSAT") : xtr.GetAttribute("noCertificadoSAT");
xmlCFDI.complemento.SelloSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloSAT") : xtr.GetAttribute("selloSAT");
} else if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName.ToUpper() == "NOMINA" && xmlCFDI.comprobante.Version != null)
{
xmlCFDI.complemento.nomina12 = new CFDINomina();
//Version="1.2" TipoNomina="E" FechaPago="2021-12-08"
//="2021-12-08" ="2021-12-08"
//="1" ="5026.31" ="254.34"
cont = xtr.MoveToFirstAttribute();
while (cont)
{
switch (xtr.Name.ToUpper())
{
case "FECHAPAGO": xmlCFDI.complemento.nomina12.FechaPago = xtr.Value.ToDateTime(); break;
case "FECHAINICIALPAGO": xmlCFDI.complemento.nomina12.FechaInicio = xtr.Value; break;
case "FECHAFINALPAGO": xmlCFDI.complemento.nomina12.FechaFin = xtr.Value; break;
case "NUMDIASPAGADOS": xmlCFDI.complemento.nomina12.NumDiasPagados= xtr.Value.ToEntero(); break;
case "TIPONOMINA": xmlCFDI.complemento.nomina12.TipoNomina = xtr.Value; break;
case "Version": xmlCFDI.complemento.nomina12.Version = xtr.Value; break;
}
cont = xtr.MoveToNextAttribute();
}
xtr.MoveToFirstAttribute();
}
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "Pagos" && xmlCFDI.comprobante.Version != null)
else if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "Pagos" && xmlCFDI.comprobante.Version != null)
{
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
xmlCFDI.complemento.Pagos = new CFDIPago();
@@ -1245,6 +1273,7 @@ namespace ADSistemaLibrary2.SatXml
public class CFDIComplemento
{
public string xmlns_tfd { get; set; }
public string xsi_schemaLocation { get; set; }
public string Version { get; set; }
@@ -1255,6 +1284,7 @@ namespace ADSistemaLibrary2.SatXml
public string NoCertificadoSAT { get; set; }
public string SelloSAT { get; set; }
public CFDIPago Pagos { get; set; }
public CFDINomina nomina12 { get; set; }
public string CadenaOriginal
{
get