Skip to content

Commit

Permalink
🎨 add new field. Fix AB#7447
Browse files Browse the repository at this point in the history
add developer identifier field in AEJ layout.
  • Loading branch information
Alan committed Mar 3, 2021
1 parent 2bde527 commit 8e991f3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 18 deletions.
20 changes: 13 additions & 7 deletions layout/mte/aej.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,15 @@ remessa:
tipo_id_dev:
pos: [169,169]
picture: '9(1)'
default: 2
default: 1
id_dev:
pos: [170,183]
picture: '9(14)'
razao_social_dev:
pos: [170,319]
pos: [184,333]
picture: 'X(150)'
email_dev:
pos: [320,369]
pos: [334,383]
picture: 'X(50)'
retorno:
Expand Down Expand Up @@ -365,11 +368,14 @@ retorno:
tipo_id_dev:
pos: [169,169]
picture: '9(1)'
default: 2
default: 1
id_dev:
pos: [170,183]
picture: 'X(14)'
razao_social_dev:
pos: [170,319]
picture: 'X(150)'
pos: [184,333]
picture: '9(150)'
email_dev:
pos: [320,369]
pos: [334,383]
picture: 'X(50)'
`
29 changes: 22 additions & 7 deletions test/fixtures/aej.ret
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
000000000|1|1|00094281944095|00000000000000|000000000000|HELOO SOLUTIONS |18022021|18022021|18022021|1700|001
000000000|2|000000001|00021612913|Phillipp Probst
000000000|3|1 |000000000300|1700|1700|1700|1700
000000000|4|000000001|18022021|1700|99999999999999999|E|001|O|1 |
000000000|5|000000001|98765432112345
000000000|6|HELOO PONTO |1.0 |2|HELOO SOLUTIONS |[email protected]
999999999|9|000000000|000000010|000000010|000000010|000000010|000000010
000000000|1|1|13774632000154|00000000000000|000000000000|pontoponto |03022021|03022021|03032021|0954|001
000000000|2|000000000|58017200730|Bianca Valentina
000000000|3|0001 |000000000480|0800|1200|1300|1700
000000000|3|0002 |000000000000|0000|0000|0000|0000
000000000|3|0003 |000000001379|0000|1200|1300|2359
000000000|3|0004 |000000000480|0800|1200|1300|1700
000000000|3|0005 |000000000000|0000|0000|0000|0000
000000000|3|0006 |000000001379|0000|1200|1300|2359
000000000|3|0007 |000000000480|0800|1200|1300|1700
000000000|3|0008 |000000000480|0800|1200|1300|1700
000000000|3|0009 |000000000480|0800|1200|1300|1700
000000000|3|0010 |000000000480|0800|1200|1300|1700
000000000|3|0011 |000000000480|0800|1200|1300|1700
000000000|3|0012 |000000000480|0800|1200|1300|1700
000000000|3|0013 |000000000480|0800|1200|1300|1700
000000000|3|0014 |000000001379|0000|1200|1300|2359
000000002|4|000000000|03022021|0830|99999999999999999|E|001|O| |
000000003|4|000000000|03022021|0900|99999999999999999|S|001|O| |
000000004|4|000000000|03022021|0830|99999999999999999|E|002|O| |
000000005|4|000000000|03022021|0900|99999999999999999|S|002|O| |
000000000|6|Heloo Ponto |1.0 |2|Heloo Soluções Corporativas LTDA |[email protected]
999999999|9|000000001|000000001|000000014|000000004|000000000|000000001
3 changes: 2 additions & 1 deletion test/remessa_aej_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func TestRemessaAEJ(t *testing.T) {

detalhes["segmento_6"]["nome_dev"] = "HELOO PONTO"
detalhes["segmento_6"]["versao_ptrp"] = "1.0"
detalhes["segmento_6"]["tipo_id_dev"] = 2
detalhes["segmento_6"]["tipo_id_dev"] = 1
detalhes["segmento_6"]["id_dev"] = 33177852000108
detalhes["segmento_6"]["razao_social_dev"] = "HELOO SOLUTIONS"
detalhes["segmento_6"]["email_dev"] = "[email protected]"
lote.InserirDetalhe(detalhes)
Expand Down
6 changes: 3 additions & 3 deletions test/retorno_aej_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func TestRetornoAEJValido(t *testing.T) {
assert.NotNil(t, layout)
assert.NotNil(t, arquivo)
assert.NotNil(t, retorno)
assert.Equal(t, 24, len(retorno.Header))
assert.Equal(t, 16, len(retorno.Trailer))
assert.Equal(t, 5, len(retorno.Segmentos()))
assert.Equal(t, 22, len(retorno.Header))
assert.Equal(t, 14, len(retorno.Trailer))
assert.Equal(t, 20, len(retorno.Segmentos()))
assert.Equal(t, 0, len(retorno.Falhas()))
}

0 comments on commit 8e991f3

Please sign in to comment.