Code Duplication    Length = 113-114 lines in 2 locations

src/Elements/ICMSIPI/D130.php 1 location

@@ 9-122 (lines=114) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D130 extends Element implements ElementInterface
10
{
11
    const REG = 'D130';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
15
    protected $parameters = [
16
        'COD_PART_CONSG' => [
17
            'type'     => 'string',
18
            'regex'    => '^[0-9]{60}$',
19
            'required' => true,
20
            'info'     => 'Código do participante (campo 02 do Registro 0150):'
21
            . '- consignatário, se houver',
22
            'format'   => ''
23
        ],
24
        'COD_PART_RED' => [
25
            'type'     => 'string',
26
            'regex'    => '^[0-9]{60}$',
27
            'required' => true,
28
            'info'     => 'Código do participante (campo 02 do Registro 0150):'
29
            . '- redespachado, se houver',
30
            'format'   => ''
31
        ],
32
        'IND_FRT_RED' => [
33
            'type'     => 'string',
34
            'regex'    => '^[0-9]{1}$',
35
            'required' => true,
36
            'info'     => 'Indicador do tipo do frete da operação de redespacho: 0 - Sem redespacho;'
37
            . '1 - Por conta do emitente'
38
            . '2 - Por conta do destinatário 9 - Outros.',
39
            'format'   => ''
40
        ],
41
        'COD_MUN_ORIG' => [
42
            'type'     => 'numeric',
43
            'regex'    => '',
44
            'required' => true,
45
            'info'     => 'Código do município de origem do serviço, conforme a tabela IBGE',
46
            'format'   => ''
47
        ],
48
        'COD_MUN_DEST' => [
49
            'type'     => 'numeric',
50
            'regex'    => '',
51
            'required' => true,
52
            'info'     => 'Código do município de destino, conforme a tabela IBGE',
53
            'format'   => ''
54
        ],
55
        'VEIC_ID' => [
56
            'type'     => 'string',
57
            'regex'    => '^[0-9]{7}$',
58
            'required' => true,
59
            'info'     => 'Placa de identificação do veículo',
60
            'format'   => ''
61
        ],
62
        'VL_LIQ_FRT' => [
63
            'type'     => 'numeric',
64
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
65
            'required' => true,
66
            'info'     => 'Valor líquido do frete',
67
            'format'   => '15v2'
68
        ],
69
        'VL_SEC_CAT' => [
70
            'type'     => 'numeric',
71
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
72
            'required' => true,
73
            'info'     => 'Soma de valores de Sec/Cat (serviços de coleta/custo adicional de transporte)',
74
            'format'   => '15v2'
75
        ],
76
        'VL_DESP' => [
77
            'type'     => 'numeric',
78
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
79
            'required' => true,
80
            'info'     => 'Soma de valores de despacho',
81
            'format'   => '15v2'
82
        ],
83
        'VL_PEDG' => [
84
            'type'     => 'numeric',
85
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
86
            'required' => true,
87
            'info'     => 'Soma dos valores de pedágio',
88
            'format'   => '15v2'
89
        ],
90
        'VL_OUT' => [
91
            'type'     => 'numeric',
92
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
93
            'required' => true,
94
            'info'     => 'Outros valores',
95
            'format'   => '15v2'
96
        ],
97
        'VL_FRT' => [
98
            'type'     => 'numeric',
99
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
100
            'required' => true,
101
            'info'     => 'Valor total do frete',
102
            'format'   => '15v2'
103
        ],
104
        'UF_ID' => [
105
            'type'     => 'string',
106
            'regex'    => '^[0-9]{2}$',
107
            'required' => true,
108
            'info'     => 'Sigla da UF da placa do veículo',
109
            'format'   => ''
110
        ]
111
    ];
112
113
    /**
114
     * Constructor
115
     * @param \stdClass $std
116
     */
117
    public function __construct(\stdClass $std)
118
    {
119
        parent::__construct(self::REG);
120
        $this->std = $this->standarize($std);
121
    }
122
}
123

src/Elements/ICMSIPI/D140.php 1 location

@@ 9-121 (lines=113) @@
6
use NFePHP\EFD\Common\ElementInterface;
7
use \stdClass;
8
9
class D140 extends Element implements ElementInterface
10
{
11
    const REG = 'D140';
12
    const LEVEL = 3;
13
    const PARENT = '';
14
    
15
    protected $parameters = [
16
        'COD_PART_CONSG' => [
17
            'type'     => 'string',
18
            'regex'    => '^[0-9]{60}$',
19
            'required' => true,
20
            'info'     => 'Código do participante (campo 02 do Registro 0150):'
21
            . '- consignatário, se houver',
22
            'format'   => ''
23
        ],
24
        'COD_MUN_ORIG' => [
25
            'type'     => 'numeric',
26
            'regex'    => '',
27
            'required' => true,
28
            'info'     => 'Código do município de origem do serviço, conforme a tabela IBGE',
29
            'format'   => ''
30
        ],
31
        'COD_MUN_DEST' => [
32
            'type'     => 'numeric',
33
            'regex'    => '',
34
            'required' => true,
35
            'info'     => 'Código do município de destino, conforme a tabela IBGE',
36
            'format'   => ''
37
        ],
38
        'IND_VEIC' => [
39
            'type'     => 'string',
40
            'regex'    => '^[0-9]{1}$',
41
            'required' => true,
42
            'info'     => 'Indicador do tipo do veículo transportador: 0 - Embarcação'
43
            . '1 - Empurrador/rebocador',
44
            'format'   => ''
45
        ],
46
        'VEIC_ID' => [
47
            'type'     => 'string',
48
            'regex'    => '^[0-9]{0}$',
49
            'required' => true,
50
            'info'     => 'Identificação da embarcação (IRIM ou Registro CPP)',
51
            'format'   => ''
52
        ],
53
        'IND_NAV' => [
54
            'type'     => 'string',
55
            'regex'    => '^[0-9]{1}$',
56
            'required' => true,
57
            'info'     => 'Indicador do tipo da navegação: 0 - Interior'
58
            . '1 - Cabotagem',
59
            'format'   => ''
60
        ],
61
        'VIAGEM' => [
62
            'type'     => 'numeric',
63
            'regex'    => '',
64
            'required' => true,
65
            'info'     => 'Número da viagem',
66
            'format'   => ''
67
        ],
68
        'VL_FRT_LIQ' => [
69
            'type'     => 'numeric',
70
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
71
            'required' => true,
72
            'info'     => 'Valor líquido do frete',
73
            'format'   => '15v2'
74
        ],
75
        'VL_DESP_PORT' => [
76
            'type'     => 'numeric',
77
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
78
            'required' => true,
79
            'info'     => 'Valor das despesas portuárias',
80
            'format'   => '15v2'
81
        ],
82
        'VL_DESP_CAR_DESC' => [
83
            'type'     => 'numeric',
84
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
85
            'required' => true,
86
            'info'     => 'Valor das despesas com carga e descarga',
87
            'format'   => '15v2'
88
        ],
89
        'VL_OUT' => [
90
            'type'     => 'numeric',
91
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
92
            'required' => true,
93
            'info'     => 'Outros valores',
94
            'format'   => '15v2'
95
        ],
96
        'VL_FRT_BRT' => [
97
            'type'     => 'numeric',
98
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
99
            'required' => true,
100
            'info'     => 'Valor bruto do frete',
101
            'format'   => '15v2'
102
        ],
103
        'VL_FRT_MM' => [
104
            'type'     => 'numeric',
105
            'regex'    => '^\d+(\.\d*)?|\.\d+$',
106
            'required' => true,
107
            'info'     => 'Valor adicional do frete para renovação da Marinha Mercante',
108
            'format'   => '15v2'
109
        ]
110
    ];
111
112
    /**
113
     * Constructor
114
     * @param \stdClass $std
115
     */
116
    public function __construct(\stdClass $std)
117
    {
118
        parent::__construct(self::REG);
119
        $this->std = $this->standarize($std);
120
    }
121
}
122