2017 © Pedro PelĆ”ez
 

library afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

image

convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  • Friday, June 15, 2018
  • by edbizarro
  • Repository
  • 1 Watchers
  • 7 Stars
  • 2,458 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 38 Versions
  • 22 % Grown

The README.md

logo, (*1)


Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009., (*2)


Latest Stable Version Build Status Total Downloads, (*3)

License

Arquivos suportados

  • Arquivo-Fonte de Dados - AFD
  • Arquivo-Fonte de Dados Tratado - AFDT
  • Arquivo de Controle de Jornada para Efeitos Fiscais - ACJEF

MƩtodos

  • getByUser()
  • getAll()

Utilização

O AfdReader pode ser instanciado informando apenas o caminho do arquivo, neste caso ele tentarĆ” descobrir o tipo:, (*4)

use Convenia\AfdReader\AfdReader;
...

$afdReader = new AfdReader('afdt_test.txt');

Informando o tipo do arquivo:, (*5)

use Convenia\AfdReader\AfdReader;
...

$afdReader = new AfdReader('afdt_test.txt', 'Afdt');

Obter informaƧƵes agrupadas por NIS/PIS:, (*6)

$afdReader->getByUser();
Array
(
    [62915959739] => Array
        (
            [20052015] => Array
                (
                    [01] => Array
                        (
                            [0] => Array
                                (
                                    [sequency] => 000000002
                                    [dateTime] => DateTime Object
                                        (
                                            [date] => 2015-05-20 09:00:00.000000
                                            [timezone_type] => 3
                                            [timezone] => America/Sao_Paulo
                                        )

                                    [reason] => 

                                    [direction] => Entrada
                                    [type] => Original
                                )

                            [1] => Array
                                (
                                    [sequency] => 000000003
                                    [dateTime] => DateTime Object
                                        (
                                            [date] => 2015-05-20 12:04:00.000000
                                            [timezone_type] => 3
                                            [timezone] => America/Sao_Paulo
                                        )

                                    [reason] => 

                                    [direction] => SaĆ­da
                                    [type] => Original
                                )

                        )

                    [02] => Array
                        (
                            [0] => Array
                                (
                                    [sequency] => 000000004
                                    [dateTime] => DateTime Object
                                        (
                                            [date] => 2015-05-20 13:14:00.000000
                                            [timezone_type] => 3
                                            [timezone] => America/Sao_Paulo
                                        )

                                    [reason] => 

                                    [direction] => Entrada
                                    [type] => Original
                                )

                            [1] => Array
                                (
                                    [sequency] => 000000005
                                    [dateTime] => DateTime Object
                                        (
                                            [date] => 2015-05-20 18:07:00.000000
                                            [timezone_type] => 3
                                            [timezone] => America/Sao_Paulo
                                        )

                                    [reason] => 

                                    [direction] => SaĆ­da
                                    [type] => Original
                                )

                        )

                )

        )

)

Obter as ocorrĆŖncias de um NIS/PIS:, (*7)

$afdReader->getByUser(62915959739);

Obter as ocorrĆŖncias de um NIS/PIS no perĆ­odo especificado:, (*8)

$afdReader->getByUser(62915959739, ['from' => '2015-05-20', 'to' => '2015-05-20']);

Obter as informaƧƵes de todos os registros:, (*9)

$afdReader->getAll();
Array
(
    [header] => Array
        (
            [sequency] => 000000001
            [type] => 1
            [entityType] => CNPJ
            [entityNumber] => 32041763000177
            [cei] => 000000000000
            [name] => NOME DA EMPRESA - LTDA ME
            [startDate] => 20052015
            [endDate] => 20092015
            [generationDate] => DateTime Object
                (
                    [date] => 2015-09-21 09:57:59.000000
                    [timezone_type] => 3
                    [timezone] => America/Sao_Paulo
                )

            [generationTime] => Array
                (
                    [hour] => 10
                    [minute] => 43
                )

        )

    [trailer] => Array
        (
            [sequency] => 000011305
            [type] => 9
        )

    [detail] => Array
        (
            [62915959739] => Array
                (
                    [20052015] => Array
                        (
                            [01] => Array
                                (
                                    [0] => Array
                                        (
                                            [sequency] => 000000002
                                            [dateTime] => DateTime Object
                                                (
                                                    [date] => 2015-05-20 09:00:00.000000
                                                    [timezone_type] => 3
                                                    [timezone] => America/Sao_Paulo
                                                )

                                            [reason] => 

                                            [direction] => Entrada
                                            [type] => Original
                                        )

                                    [1] => Array
                                        (
                                            [sequency] => 000000003
                                            [dateTime] => DateTime Object
                                                (
                                                    [date] => 2015-05-20 12:04:00.000000
                                                    [timezone_type] => 3
                                                    [timezone] => America/Sao_Paulo
                                                )

                                            [reason] => 

                                            [direction] => SaĆ­da
                                            [type] => Original
                                        )

                                )

                            [02] => Array
                                (
                                    [0] => Array
                                        (
                                            [sequency] => 000000004
                                            [dateTime] => DateTime Object
                                                (
                                                    [date] => 2015-05-20 13:14:00.000000
                                                    [timezone_type] => 3
                                                    [timezone] => America/Sao_Paulo
                                                )

                                            [reason] => 

                                            [direction] => Entrada
                                            [type] => Original
                                        )

                                    [1] => Array
                                        (
                                            [sequency] => 000000005
                                            [dateTime] => DateTime Object
                                                (
                                                    [date] => 2015-05-20 18:07:00.000000
                                                    [timezone_type] => 3
                                                    [timezone] => America/Sao_Paulo
                                                )

                                            [reason] => 

                                            [direction] => SaĆ­da
                                            [type] => Original
                                        )

                                )

                        )
                )

        )

)

The Versions

15/06 2018

dev-master

9999999-dev https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

15/06 2018

dev-alexassuncao-patch-1

dev-alexassuncao-patch-1 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/03 2018

v3.0.3

3.0.3.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/03 2018

dev-fix-type

dev-fix-type https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

19/01 2018

v3.0.2

3.0.2.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

19/01 2018

dev-alexassuncao-patch-2

dev-alexassuncao-patch-2 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/12 2017

3

3.0.0.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/12 2017

v3.0.1

3.0.1.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/12 2017

dev-filetypemagic

dev-filetypemagic https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

28/12 2017

dev-analysis-zD0pj9

dev-analysis-zD0pj9 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

08/12 2017

v2.0.18

2.0.18.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

06/12 2017

v2.0.17

2.0.17.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

06/12 2017

v2.0.16

2.0.16.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

05/12 2017

v2.0.15

2.0.15.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

05/12 2017

v2.0.14

2.0.14.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

04/12 2017

v2.0.13

2.0.13.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

18/10 2017

v2.0.12

2.0.12.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

17/10 2017

v2.0.10

2.0.10.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

17/10 2017

v2.0.11

2.0.11.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

17/10 2017

dev-acjef

dev-acjef https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

16/10 2017

v2.0.9

2.0.9.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

16/10 2017

v2.0.8

2.0.8.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

16/10 2017

v2.0.7

2.0.7.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

16/10 2017

v2.0.6

2.0.6.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

12/10 2017

dev-analysis-Xk5Yn4

dev-analysis-Xk5Yn4 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

11/10 2017

v2.0.5

2.0.5.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

11/10 2017

dev-analysis-XlEZaW

dev-analysis-XlEZaW https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

11/10 2017

v2.0.4

2.0.4.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

11/10 2017

dev-analysis-XWg6JP

dev-analysis-XWg6JP https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

10/10 2017

v2.0.3

2.0.3.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

10/10 2017

v1

1.0.0.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

10/10 2017

v2.0.2

2.0.2.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

10/10 2017

v2.0.1

2.0.1.0 https://github.com/convenia/afd-reader

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

php afd acjef afdt mte

10/10 2017

v2.0

2.0.0.0

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

10/10 2017

dev-analysis-qo2aPB

dev-analysis-qo2aPB

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

09/10 2017

dev-analysis-8nyk71

dev-analysis-8nyk71

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

09/10 2017

dev-analysis-87QRnb

dev-analysis-87QRnb

Pacote para leitura de Arquivo Fonte de Dados (AFD). Especificação do MTE referente a portaria 1.510/2009.

  Sources   Download

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura
by Alex Assunção

20/10 2016

dev-analysis-zY2d79

dev-analysis-zY2d79

Reader and tranlate Afd and AFDT point files

  Sources   Download

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

by Avatar convenia
by Victor Ventura