1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace NFePHP\EFD\Elements\ICMSIPI; |
4
|
|
|
|
5
|
|
|
use NFePHP\EFD\Common\Element; |
6
|
|
|
use NFePHP\EFD\Common\ElementInterface; |
7
|
|
|
use \stdClass; |
8
|
|
|
|
9
|
|
|
class C790 extends Element implements ElementInterface |
10
|
|
|
{ |
11
|
|
|
const REG = 'C790'; |
12
|
|
|
const LEVEL = 3; |
13
|
|
|
const PARENT = 'C700'; |
14
|
|
|
|
15
|
|
|
protected $parameters = [ |
16
|
|
|
'CST_ICMS' => [ |
17
|
|
|
'type' => 'numeric', |
18
|
|
|
'regex' => '^(\d{3})$', |
19
|
|
|
'required' => true, |
20
|
|
|
'info' => 'Código da Situação Tributária, conforme a tabela indicada no item 4.3.1', |
21
|
|
|
'format' => '' |
22
|
|
|
], |
23
|
|
|
'CFOP' => [ |
24
|
|
|
'type' => 'numeric', |
25
|
|
|
'regex' => '^(\d{4})$', |
26
|
|
|
'required' => true, |
27
|
|
|
'info' => 'Código Fiscal de Operação e Prestação, conforme a tabela indicada no item 4.2.2', |
28
|
|
|
'format' => '' |
29
|
|
|
], |
30
|
|
|
'ALIQ_ICMS' => [ |
31
|
|
|
'type' => 'numeric', |
32
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
33
|
|
|
'required' => false, |
34
|
|
|
'info' => 'Alíquota do ICMS', |
35
|
|
|
'format' => '6v2' |
36
|
|
|
], |
37
|
|
|
'VL_OPR' => [ |
38
|
|
|
'type' => 'numeric', |
39
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
40
|
|
|
'required' => true, |
41
|
|
|
'info' => 'Valor da operação correspondente à combinação de CST_ICMS, CFOP, e alíquota do ICMS.', |
42
|
|
|
'format' => '15v2' |
43
|
|
|
], |
44
|
|
|
'VL_BC_ICMS' => [ |
45
|
|
|
'type' => 'numeric', |
46
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
47
|
|
|
'required' => true, |
48
|
|
|
'info' => 'Parcela correspondente ao "Valor da base de cálculo do |
49
|
|
|
ICMS" referente à combinação CST_ICMS, CFOP, e alíquota do ICMS', |
50
|
|
|
'format' => '15v2' |
51
|
|
|
], |
52
|
|
|
'VL_ICMS' => [ |
53
|
|
|
'type' => 'numeric', |
54
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
55
|
|
|
'required' => true, |
56
|
|
|
'info' => 'Parcela correspondente ao "Valor do ICMS" referente à |
57
|
|
|
combinação CST_ICMS, CFOP e alíquota do ICMS', |
58
|
|
|
'format' => '15v2' |
59
|
|
|
], |
60
|
|
|
'VL_BC_ICMS_ST' => [ |
61
|
|
|
'type' => 'numeric', |
62
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
63
|
|
|
'required' => true, |
64
|
|
|
'info' => 'Valor da base de cálculo do ICMS substituição tributária', |
65
|
|
|
'format' => '15v2' |
66
|
|
|
], |
67
|
|
|
'VL_ICMS_ST' => [ |
68
|
|
|
'type' => 'numeric', |
69
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
70
|
|
|
'required' => true, |
71
|
|
|
'info' => 'Valor do ICMS retido por substituição tributária', |
72
|
|
|
'format' => '15v2' |
73
|
|
|
], |
74
|
|
|
'VL_RED_BC' => [ |
75
|
|
|
'type' => 'numeric', |
76
|
|
|
'regex' => '^\d+(\.\d*)?|\.\d+$', |
77
|
|
|
'required' => true, |
78
|
|
|
'info' => 'Valor não tributado em função da redução da base de cálculo do ICMS, |
79
|
|
|
referente à combinação de CST_ICMS, CFOP e alíquota do ICMS', |
80
|
|
|
'format' => '15v2' |
81
|
|
|
], |
82
|
|
|
'COD_OBS' => [ |
83
|
|
|
'type' => 'string', |
84
|
|
|
'regex' => '^.{0,6}$', |
85
|
|
|
'required' => false, |
86
|
|
|
'info' => 'Código da observação do lançamento fiscal (campo 02 do Registro 0460)', |
87
|
|
|
'format' => '' |
88
|
|
|
], |
89
|
|
|
|
90
|
|
|
]; |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Constructor |
94
|
|
|
* @param \stdClass $std |
95
|
|
|
*/ |
96
|
|
|
public function __construct(\stdClass $std) |
97
|
|
|
{ |
98
|
|
|
parent::__construct(self::REG); |
99
|
|
|
$this->std = $this->standarize($std); |
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|