@@ -16,7 +16,7 @@ Install the library using [composer][1]. Add the following to your `composer.jso
16
16
``` json
17
17
{
18
18
"require" : {
19
- "brazanation/documents" : " 0.5 .*"
19
+ "brazanation/documents" : " 0.6 .*"
20
20
}
21
21
}
22
22
```
@@ -30,7 +30,7 @@ $ composer.phar install
30
30
or
31
31
32
32
``` sh
33
- $ composer require brazanation/documents 0.5 .*
33
+ $ composer require brazanation/documents 0.6 .*
34
34
```
35
35
36
36
### CPF (cadastro de pessoas físicas)
@@ -100,9 +100,9 @@ use Brazanation\Documents\Sped\NFe;
100
100
use Brazanation\Documents\Exception\InvalidDocument as InvalidDocumentException;
101
101
102
102
try {
103
- $accessKey = new NFe('52060433009911002506550120000007800267301615 ');
104
- echo $accessKey; // prints 52060433009911002506550120000007800267301615
105
- echo $accessKey->format(); // prints 5206 0433 0099 1100 2506 5501 2000 0007 8002 6730 1615
103
+ $accessKey = new NFe('52060433009911002506550120000007801267301613 ');
104
+ echo $accessKey; // prints 52060433009911002506550120000007801267301613
105
+ echo $accessKey->format(); // prints 5206 0433 0099 1100 2506 5501 2000 0007 8012 6730 1613
106
106
catch (InvalidDocumentException $e){
107
107
echo $e->getMessage();
108
108
}
@@ -111,15 +111,16 @@ or generate your number
111
111
112
112
``` php
113
113
try {
114
- $accessKey = NFe::generate(
114
+ $nfeKey = NFe::generate(
115
115
52,
116
- \DateTime::createFromFormat('ym', '0604') ,
116
+ $generatedAt ,
117
117
new Cnpj('33009911002506'),
118
118
12,
119
119
780,
120
+ EmissionType::normal(),
120
121
26730161
121
122
);
122
- echo $accessKey; // prints 52060433009911002506550120000007800267301615
123
+ echo $accessKey; // prints 52060433009911002506550120000007801267301613
123
124
catch (InvalidDocumentException $e){
124
125
echo $e->getMessage();
125
126
}
0 commit comments