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