File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed
Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 11# Changelog
22Alterações na biblioteca
33
4+ ## [ 1.4.2] - 21/03/2019
5+ ### Corrigido
6+
7+ Data de emissão no RPS
8+
49## [ 1.4.1] - 20/03/2019
510### Corrigido
611
Original file line number Diff line number Diff line change 4040];
4141
4242$ rps = [
43- 'dataEmissao ' => \DateTime (),
44- 'competencia ' => \DateTime ()
43+ 'dataEmissao ' => new \DateTime (),
44+ 'competencia ' => new \DateTime ()
4545];
4646
4747$ servico = [
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public function setDataEmissao(\DateTimeInterface $dataEmissao)
1717
1818 public function getDataEmissao ()
1919 {
20- return $ this ->competencia ;
20+ return $ this ->dataEmissao ;
2121 }
2222
2323 public function setCompetencia (\DateTimeInterface $ competencia )
Original file line number Diff line number Diff line change @@ -36,12 +36,14 @@ public function testWithInvalidDataEmissao()
3636 */
3737 public function testWithValidRpsData ()
3838 {
39- $ dateCompare = new \DateTime ('now ' );
39+ $ dateBase = new \DateTime ('now ' );
40+ $ competencia = $ dateBase ->format ('Y-m-d ' );
41+ $ dataEmissao = $ dateBase ->format ('Y-m-d\TH:i:s ' );
4042 $ rps = new Rps ();
41- $ rps ->setDataEmissao ($ dateCompare );
42- $ rps ->setCompetencia ($ dateCompare );
43+ $ rps ->setDataEmissao ($ dateBase );
44+ $ rps ->setCompetencia ($ dateBase );
4345
44- $ this ->assertSame ($ rps ->getDataEmissao (), $ dateCompare -> format ( ' Y-m-d ' ) );
45- $ this ->assertSame ($ rps ->getCompetencia (), $ dateCompare -> format ( ' Y-m-d ' ) );
46+ $ this ->assertSame ($ rps ->getDataEmissao (), $ dataEmissao );
47+ $ this ->assertSame ($ rps ->getCompetencia (), $ competencia );
4648 }
4749}
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ public function testWithValidData()
196196 $ this ->assertSame ($ nfse ->getIdIntegracao (), 1234 );
197197 $ this ->assertSame ($ nfse ->getImpressao ()->getCamposCustomizados ()['teste ' ], 'testeImpressao ' );
198198 $ this ->assertSame ($ nfse ->getPrestador ()->getCertificado (), '5b855b0926ddb251e0f0ef42 ' );
199- $ this ->assertSame ($ nfse ->getRps ()->getDataEmissao (), $ dateCompare ->format ('Y-m-d ' ));
199+ $ this ->assertSame ($ nfse ->getRps ()->getDataEmissao (), $ dateCompare ->format ('Y-m-d\TH:i:s ' ));
200200 $ this ->assertSame ($ nfse ->getServico ()->getIdIntegracao (), 'A001XT ' );
201201 $ this ->assertSame ($ nfse ->getSubstituicao (), false );
202202 $ this ->assertSame ($ nfse ->getTomador ()->getCpfCnpj (), '00000000000191 ' );
You can’t perform that action at this time.
0 commit comments