-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from fabricioevieira/master_issue_132
Correção tipos das propriedades D300 e D310 - EFD Fiscal - Issue #132
- Loading branch information
Showing
3 changed files
with
94 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using FiscalBr.Common.Sped.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FiscalBr.Test.Sped.BlocoD | ||
{ | ||
public class BlocoDRegistro300Test | ||
{ | ||
[Fact] | ||
public void Escrever_Registro_D300_EFDFiscal() | ||
{ | ||
var formattedDate = DateTime.Today.ToString(new CultureInfo("pt-BR")).Replace("/", "").Split(" ")[0]; | ||
|
||
var expectedResult = | ||
$"|D300|13|1|1|1|5|040|5102|0,00|{formattedDate}|0,00|0,00|0,00|0,00|0,00|0,00|0,00|0,00|000001|010|{Environment.NewLine}"; | ||
|
||
var source = new EFDFiscal.BlocoD.RegistroD300() | ||
{ | ||
CodMod= IndCodMod.Mod13.ToDefaultValue(), | ||
Ser = "1", | ||
Sub = "1", | ||
NumDocIni = "1", | ||
NumDocFin = 5, | ||
CstIcms = "040", | ||
Cfop = "5102", | ||
AliqIcms = 0M, | ||
DtDoc = formattedDate, | ||
VlOpr = 0M, | ||
VlDesc = 0M, | ||
VlServ = 0M, | ||
VlSeg = 0M, | ||
VlOutDesp = 0M, | ||
VlBcIcms = 0M, | ||
VlIcms = 0M, | ||
VlRedBc = 0M, | ||
CodObs = "000001", | ||
CodCta = "010", | ||
}; | ||
|
||
var currentResult = Common.Sped.EscreverCamposSped.EscreverCampos(source, VersaoLeiauteSped.V2); | ||
|
||
Assert.Equal(expectedResult, currentResult); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using FiscalBr.Common.Sped.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FiscalBr.Test.Sped.BlocoD | ||
{ | ||
public class BlocoDRegistro310Test | ||
{ | ||
[Fact] | ||
public void Escrever_Registro_D310_EFDFiscal() | ||
{ | ||
var expectedResult = | ||
$"|D310|3550308|0,00|0,00|0,00|{Environment.NewLine}"; | ||
|
||
var source = new EFDFiscal.BlocoD.RegistroD310() | ||
{ | ||
CodMunOrig = "3550308", | ||
VlServ = 0M, | ||
VlBcIcms = 0M, | ||
VlIcms = 0M, | ||
}; | ||
|
||
var currentResult = Common.Sped.EscreverCamposSped.EscreverCampos(source, VersaoLeiauteSped.V2); | ||
|
||
Assert.Equal(expectedResult, currentResult); | ||
} | ||
} | ||
} |