Skip to content

Commit

Permalink
Merge pull request #1441 from procfit/master
Browse files Browse the repository at this point in the history
refactor - Adição de enum para parse versão 4.00 ext method GetString…
  • Loading branch information
robertorp authored Jul 27, 2023
2 parents a99ebe2 + 8767923 commit 195b5b7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CTe.Classes/Ext/extversao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ public static string GetString(this versao versao)
{
switch (versao)
{
case versao.ve200:
case versao.ve200:
return "2.00";
case versao.ve300:
case versao.ve300:
return "3.00";
case versao.ve400:
return "4.00";
default:
throw new InvalidOperationException("A emissão do CT-e possui apenas a versão 2.00 é 3.00");
throw new InvalidOperationException("Versão de CT-e inválida. Para emissão apenas as versões 2.00, 3.00 e 4.00 são aceitas.");
}
}
}
Expand Down

0 comments on commit 195b5b7

Please sign in to comment.