Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 46 additions & 7 deletions NFe.Classes/Protocolo/infProt.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Xml.Serialization;
using DFe.Classes.Assinatura;
using DFe.Classes.Flags;
using DFe.Utils;
using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace NFe.Classes.Protocolo
{
Expand Down Expand Up @@ -61,7 +62,10 @@ public string ProxyDhRecbto
/// </summary>
public string xMotivo { get; set; }

[XmlElement(ElementName = "cMsg")]
#region Sera retirado futuramente

//[XmlElement(ElementName = "cMsg")]
[XmlIgnore]
public string ProxyccMsg
{
get
Expand All @@ -79,15 +83,50 @@ public string ProxyccMsg
cMsg = int.Parse(value);
}
}

[XmlIgnore]
public int? cMsg { get; set; }

[XmlIgnore]
public string xMsg { get; set; }

#endregion

/// <summary>
/// PR13 Grupo de informações para envio de mensagens do interesse da SEFAZ (Criado na NT 2018.005)
/// </summary>
[XmlElement("cMsg")]
public List<string> msgCodigos { get; set; }

[XmlElement("xMsg")]
public List<string> msgDescricoes { get; set; }

[XmlIgnore]
public List<msgSefaz> MensagensSefaz
{
get
{
var mensagens = new List<msgSefaz>();
if (msgCodigos == null)
return mensagens;
for (int i = 0; i < msgCodigos.Count; i++)
{
mensagens.Add(new msgSefaz
{
cMsg = int.TryParse(msgCodigos[i], out int codigo)
? codigo
: (int?)null,

xMsg = msgDescricoes != null &&
i < msgDescricoes.Count
? msgDescricoes[i]
: null
});
}
return mensagens;
}
}

/// <summary>
/// PR13 - Assinatura XML do grupo identificado pelo atributo “Id”
/// A decisão de assinar a mensagem fica a critério da UF interessada.
/// PR90 - Assinatura XML do grupo identificado pelo atributo “Id”, a decisão de assinar a mensagem fica a critério da UF interessada.
/// </summary>
public Signature Signature { get; set; }
}
Expand Down
8 changes: 8 additions & 0 deletions NFe.Classes/Protocolo/msgSefaz.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace NFe.Classes.Protocolo
{
public class msgSefaz
{
public int? cMsg { get; set; }
public string xMsg { get; set; }
}
}
Loading