Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
[-] Correção do erro de data zerada ao consulta status operacional. Fix
Browse files Browse the repository at this point in the history
#111

[-] Correção do erro de não gerar os produtos do cupom. Fix #110
  • Loading branch information
rftd committed May 29, 2021
1 parent b020799 commit b1403fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ACBr.Net.Sat.Demo/ACBr.Net.Sat.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<Version>1.2.5</Version>
</PackageReference>
<PackageReference Include="ACBr.Net.DFe.Core">
<Version>1.2.8.4</Version>
<Version>1.2.8.5</Version>
</PackageReference>
<PackageReference Include="ACBr.Net.Integrador">
<Version>1.2.0.9</Version>
<Version>1.2.1</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>4.7.10</Version>
Expand Down
2 changes: 1 addition & 1 deletion src/ACBr.Net.Sat/ACBr.Net.Sat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

<ItemGroup>
<PackageReference Include="ACBr.Net.Core" Version="1.2.5" />
<PackageReference Include="ACBr.Net.DFe.Core" Version="1.2.8.4" />
<PackageReference Include="ACBr.Net.DFe.Core" Version="1.2.8.5" />
<PackageReference Include="ExtraConstraints.Fody" Version="1.14.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 6 additions & 4 deletions src/ACBr.Net.Sat/StatusOperacionalResposta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ public StatusOperacionalResposta(string retorno, Encoding encoding) : base(retor
Status.ListaFinal = RetornoLst[i];
i++;
}
Status.DhCFe = DateTime.ParseExact(RetornoLst[i], "yyyyMMddHHmmss", CultureInfo.InvariantCulture);

Status.DhCFe = DateTime.TryParseExact(RetornoLst[i], "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.None, out var data) ? data : DateTime.MinValue;

i++;
Status.DhUltima = DateTime.ParseExact(RetornoLst[i], "yyyyMMddHHmmss", CultureInfo.InvariantCulture);
Status.DhUltima = DateTime.TryParseExact(RetornoLst[i], "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.None, out data) ? data : DateTime.MinValue;
i++;
Status.CertEmissao = DateTime.ParseExact(RetornoLst[i], "yyyyMMdd", CultureInfo.InvariantCulture);
Status.CertEmissao = DateTime.TryParseExact(RetornoLst[i], "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out data) ? data : DateTime.MinValue;
i++;
Status.CertVencimento = DateTime.ParseExact(RetornoLst[i], "yyyyMMdd", CultureInfo.InvariantCulture);
Status.CertVencimento = DateTime.TryParseExact(RetornoLst[i], "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out data) ? data : DateTime.MinValue;
i++;
var retStr = RetornoLst[i];
if (retStr.IsNumeric())
Expand Down

0 comments on commit b1403fa

Please sign in to comment.