Skip to content

Commit 14552b4

Browse files
authored
Merge pull request #74 from nfe/hotfix/CST-53-61
Add ShouldSerialize methods for nullable ICMS fields
2 parents fab452f + 05dc2b9 commit 14552b4

6 files changed

Lines changed: 31 additions & 18 deletions

File tree

NFe.Classes/Informacoes/Detalhe/Tributacao/Compartilhado/Tipos/IBSCBSTipos.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,14 @@ public enum CST
8585
[Description("Alíquota reduzida")]
8686
[XmlEnum("200")]
8787
Cst200,
88-
88+
89+
/// <summary>
90+
/// 210 - Crédito Presumido Operacional
91+
/// </summary>
92+
[Description("Crédito Presumido Operacional")]
93+
[XmlEnum("210")]
94+
Cst210,
95+
8996
/// <summary>
9097
/// 220 - Alíquota fixa
9198
/// </summary>

NFe.Classes/Informacoes/Detalhe/Tributacao/Estadual/ICMS53.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/********************************************************************************/
1+
/********************************************************************************/
22
/* Projeto: Biblioteca ZeusNFe */
33
/* Biblioteca C# para emissão de Nota Fiscal Eletrônica - NFe e Nota Fiscal de */
44
/* Consumidor Eletrônica - NFC-e (http://www.nfe.fazenda.gov.br) */
@@ -67,10 +67,6 @@ public decimal? qBCMono
6767
get { return _qBCMono.Arredondar(4); }
6868
set { _qBCMono = value.Arredondar(4); }
6969
}
70-
public bool ShouldSerializeqBCMono()
71-
{
72-
return qBCMono.HasValue;
73-
}
7470

7571
/// <summary>
7672
/// N38 - Alíquota adRem do imposto
@@ -81,6 +77,7 @@ public decimal? adRemICMS
8177
get { return _adRemICMS.Arredondar(4); }
8278
set { _adRemICMS = value.Arredondar(4); }
8379
}
80+
8481
public bool ShouldSerializeadRemICMS()
8582
{
8683
return adRemICMS.HasValue;
@@ -95,6 +92,7 @@ public decimal? vICMSMonoOp
9592
get { return _vICMSMonoOp.Arredondar(2); }
9693
set { _vICMSMonoOp = value.Arredondar(2); }
9794
}
95+
9896
public bool ShouldSerializevICMSMonoOp()
9997
{
10098
return vICMSMonoOp.HasValue;
@@ -109,6 +107,7 @@ public decimal? pDif
109107
get { return _pDif.Arredondar(4); }
110108
set { _pDif = value.Arredondar(4); }
111109
}
110+
112111
public bool ShouldSerializepDif()
113112
{
114113
return pDif.HasValue;
@@ -123,10 +122,6 @@ public decimal? vICMSMonoDif
123122
get { return _vICMSMonoDif.Arredondar(2); }
124123
set { _vICMSMonoDif = value.Arredondar(2); }
125124
}
126-
public bool ShouldSerializevICMSMonoDif()
127-
{
128-
return vICMSMonoDif.HasValue;
129-
}
130125

131126
/// <summary>
132127
/// N39 - Valor do ICMS próprio devido
@@ -137,6 +132,7 @@ public decimal? vICMSMono
137132
get { return _vICMSMono.Arredondar(2); }
138133
set { _vICMSMono = value.Arredondar(2); }
139134
}
135+
140136
public bool ShouldSerializevICMSMono()
141137
{
142138
return vICMSMono.HasValue;
@@ -152,6 +148,7 @@ public decimal? qBCMonoDif
152148
get { return _qBCMonoDif.Arredondar(4); }
153149
set { _qBCMonoDif = value.Arredondar(4); }
154150
}
151+
155152
public bool ShouldSerializeqBCMonoDif()
156153
{
157154
return qBCMonoDif.HasValue;
@@ -167,10 +164,10 @@ public decimal? adRemICMSDif
167164
get { return _adRemICMSDif.Arredondar(4); }
168165
set { _adRemICMSDif = value.Arredondar(4); }
169166
}
167+
170168
public bool ShouldSerializeadRemICMSDif()
171169
{
172170
return adRemICMSDif.HasValue;
173171
}
174-
175172
}
176-
}
173+
}

NFe.Classes/Informacoes/Detalhe/Tributacao/Estadual/ICMS61.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/********************************************************************************/
1+
/********************************************************************************/
22
/* Projeto: Biblioteca ZeusNFe */
33
/* Biblioteca C# para emissão de Nota Fiscal Eletrônica - NFe e Nota Fiscal de */
44
/* Consumidor Eletrônica - NFC-e (http://www.nfe.fazenda.gov.br) */
@@ -78,6 +78,11 @@ public decimal? adRemICMSRet
7878
set { _adRemICMSRet = value.Arredondar(4); }
7979
}
8080

81+
public bool ShouldSerializeadRemICMSRet()
82+
{
83+
return adRemICMSRet.HasValue;
84+
}
85+
8186
/// <summary>
8287
/// N45 - Valor do ICMS retido anteriormente
8388
/// </summary>
@@ -88,5 +93,9 @@ public decimal? vICMSMonoRet
8893
set { _vICMSMonoRet = value.Arredondar(2); }
8994
}
9095

96+
public bool ShouldSerializevICMSMonoRet()
97+
{
98+
return vICMSMonoRet.HasValue;
99+
}
91100
}
92-
}
101+
}

NFe.Classes/Informacoes/InfRespTec/infRespTec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Xml.Serialization;
22

3-
namespace Shared.NFe.Classes.Informacoes.InfRespTec
3+
namespace NFe.Classes.Informacoes.InfRespTec
44
{
55
public class infRespTec
66
{

NFe.Classes/Informacoes/Intermediador/infIntermed.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Shared.NFe.Classes.Informacoes.Intermediador
1+
namespace NFe.Classes.Informacoes.Intermediador
22
{
33
public class infIntermed
44
{

NFe.Classes/Informacoes/infNFe.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
using NFe.Classes.Informacoes.Pagamento;
4444
using NFe.Classes.Informacoes.Total;
4545
using NFe.Classes.Informacoes.Transporte;
46-
using Shared.NFe.Classes.Informacoes.InfRespTec;
47-
using Shared.NFe.Classes.Informacoes.Intermediador;
46+
using NFe.Classes.Informacoes.InfRespTec;
47+
using NFe.Classes.Informacoes.Intermediador;
4848

4949
namespace NFe.Classes.Informacoes
5050
{

0 commit comments

Comments
 (0)