Skip to content

Commit

Permalink
AutXML no CTe OS gerando invalido (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
flavionootech authored Jan 25, 2024
1 parent 7f2868a commit ce155fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 15 additions & 3 deletions CTe.AppTeste/CTeTesteModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1436,8 +1436,9 @@ public void EmitirCteOs()

var cteOS = new CTeOS();

cteOS.versao = VersaoServico.Versao400;
cteOS.InfCte = new infCteOS();

cteOS.InfCte.versao = VersaoServico.Versao400;

#region ide
cteOS.InfCte.ide = new ideOs();
Expand Down Expand Up @@ -1552,15 +1553,26 @@ public void EmitirCteOs()

cteOS.InfCte.infCTeNorm.infModal = new infModalOs();

cteOS.InfCte.infCTeNorm.infModal.versaoModal = versaoModal.veM300;
cteOS.InfCte.infCTeNorm.infModal.versaoModal = versaoModal.veM400;

var rodoviario = new rodoOS();
var rodoviario = new CTe.CTeOSDocumento.CTe.CTeOS.Informacoes.InfCTeNormal.rodoOS();

rodoviario.TAF = "888888888888";
//rodoviario.NroRegEstadual = "23632667367";


cteOS.InfCte.infCTeNorm.infModal.ContainerModal = rodoviario;

cteOS.InfCte.autXML = new List<autXML>()
{
new autXML()
{
CPF = "04483616048"
}
};

var xml = cteOS.ObterXmlString();

#endregion
}

Expand Down
3 changes: 2 additions & 1 deletion CTe.Classes/CTeOutrosServicos/Informacoes/infCteOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public class infCteOS

public infCteAnu infCteAnu { get; set; }

public List<autXML> autXml { get; set; }
[XmlElement("autXML")]
public List<autXML> autXML { get; set; }

[XmlElement(ElementName = "infRespTec")]
public infRespTec infRespTec { get; set; }
Expand Down

0 comments on commit ce155fb

Please sign in to comment.