|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace SmartCNAB\Support\Bank; |
|
4
|
|
|
|
|
5
|
|
|
use SmartCNAB\Support\Bank\Bank; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Bank SICOOB support class. |
|
9
|
|
|
*/ |
|
10
|
|
|
class SICOOB extends Bank |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* Constants for returning occurrences statuses. |
|
14
|
|
|
*/ |
|
15
|
|
|
const OCCURRENCES_DISCHARGED = [9, 10]; |
|
16
|
|
|
const OCCURRENCES_ENTRY = [2]; |
|
17
|
|
|
const OCCURRENCES_PAID = [5, 6, 15]; |
|
18
|
|
|
const OCCURRENCES_PROTESTED = [23]; |
|
19
|
|
|
|
|
20
|
|
|
/** |
|
21
|
|
|
* Documents (especies) prefixed. |
|
22
|
|
|
* |
|
23
|
|
|
* @var array |
|
24
|
|
|
*/ |
|
25
|
|
|
protected static $documentsPrefixes = [ |
|
26
|
|
|
'DM' => 'Duplicata mercantil', |
|
27
|
|
|
'CH' => 'Cheque', |
|
28
|
|
|
'DS' => 'Duplicata de serviço', |
|
29
|
|
|
'PC' => 'Parcela de consórcio', |
|
30
|
|
|
'OU' => 'Outros', |
|
31
|
|
|
]; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Especies codes. |
|
35
|
|
|
* |
|
36
|
|
|
* @var array |
|
37
|
|
|
*/ |
|
38
|
|
|
protected static $especies = [ |
|
39
|
|
|
'01' => 'Duplicata mercantil', |
|
40
|
|
|
'02' => 'Nota promissória', |
|
41
|
|
|
'03' => 'Nota de seguro', |
|
42
|
|
|
'05' => 'Recibo', |
|
43
|
|
|
'06' => 'Duplicata rural', |
|
44
|
|
|
'08' => 'Letra de câmbio', |
|
45
|
|
|
'09' => 'Warrant', |
|
46
|
|
|
'10' => 'Cheque', |
|
47
|
|
|
'12' => 'Duplicata de serviço', |
|
48
|
|
|
'13' => 'Nota de débito', |
|
49
|
|
|
'14' => 'Triplicata mercantil', |
|
50
|
|
|
'15' => 'Triplicata de serviço', |
|
51
|
|
|
'18' => 'Fatura', |
|
52
|
|
|
'20' => 'Apólice de seguro', |
|
53
|
|
|
'21' => 'Mensalidade escolar', |
|
54
|
|
|
'22' => 'Parcela de consórcio', |
|
55
|
|
|
'99' => 'Outros', |
|
56
|
|
|
]; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* Emission codes. |
|
60
|
|
|
* |
|
61
|
|
|
* @var array |
|
62
|
|
|
*/ |
|
63
|
|
|
protected static $emission = [ |
|
64
|
|
|
'01' => 'Cooperativa', |
|
65
|
|
|
'02' => 'Cliente', |
|
66
|
|
|
]; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* Postage codes. |
|
70
|
|
|
* |
|
71
|
|
|
* @var array |
|
72
|
|
|
*/ |
|
73
|
|
|
protected static $postage = [ |
|
74
|
|
|
'01' => 'Cooperativa', |
|
75
|
|
|
'02' => 'Cliente', |
|
76
|
|
|
]; |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* Billing instruction. |
|
80
|
|
|
* |
|
81
|
|
|
* @var array |
|
82
|
|
|
*/ |
|
83
|
|
|
protected static $instructions = [ |
|
84
|
|
|
'00' => 'Ausência de instruções', |
|
85
|
|
|
'01' => 'Cobrar juros', |
|
86
|
|
|
'03' => 'Protestar 3 dias úteis após vencimento', |
|
87
|
|
|
'04' => 'Protestar 4 dias úteis após vencimento', |
|
88
|
|
|
'05' => 'Protestar 5 dias úteis após vencimento', |
|
89
|
|
|
'07' => 'Não protestar', |
|
90
|
|
|
'10' => 'Protestar 10 dias úteis após vencimento', |
|
91
|
|
|
'15' => 'Protestar 15 dias úteis após vencimento', |
|
92
|
|
|
'20' => 'Protestar 20 dias úteis após vencimento', |
|
93
|
|
|
'22' => 'Conceder desconto so até data estipulada', |
|
94
|
|
|
'42' => 'Devolver após 15 dias vencido', |
|
95
|
|
|
'43' => 'Devolver após 30 dias vencido', |
|
96
|
|
|
]; |
|
97
|
|
|
|
|
98
|
|
|
/** |
|
99
|
|
|
* Remittance occurrences codes. |
|
100
|
|
|
* |
|
101
|
|
|
* @var array |
|
102
|
|
|
*/ |
|
103
|
|
|
protected static $remittanceOccurrences = [ |
|
104
|
|
|
'01' => 'Registro de títulos', |
|
105
|
|
|
'02' => 'Solicitação de baixa', |
|
106
|
|
|
'04' => 'Concessão de abatimento', |
|
107
|
|
|
'05' => 'Cancelamento de abatimento', |
|
108
|
|
|
'06' => 'Alteração de vencimento', |
|
109
|
|
|
'08' => 'Alteração de seu número', |
|
110
|
|
|
'09' => 'Instrução para protestar', |
|
111
|
|
|
'10' => 'Instrução para sustar protesto', |
|
112
|
|
|
'11' => 'Instrução para dispensar juros', |
|
113
|
|
|
'12' => 'Alteração de pagador', |
|
114
|
|
|
'31' => 'Alteração de outros dados', |
|
115
|
|
|
'34' => 'Baixa - pagamento direto ao beneficiário', |
|
116
|
|
|
]; |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* Return occurrences codes. |
|
120
|
|
|
* |
|
121
|
|
|
* @var array |
|
122
|
|
|
*/ |
|
123
|
|
|
protected static $returnOccurrences = [ |
|
124
|
|
|
'02' => 'Confirmação entrada título;', |
|
125
|
|
|
'05' => 'Liquidação sem registro', |
|
126
|
|
|
'06' => 'Liquidação normal', |
|
127
|
|
|
'09' => 'Baixa de titulo', |
|
128
|
|
|
'10' => 'Baixa solicitada pedido beneficiário', |
|
129
|
|
|
'11' => 'Títulos em ser', |
|
130
|
|
|
'14' => 'Alteração de vencimento', |
|
131
|
|
|
'15' => 'Liquidação em cartório', |
|
132
|
|
|
'23' => 'Encaminhado a protesto', |
|
133
|
|
|
'27' => 'Confirmação alteração dados', |
|
134
|
|
|
'48' => 'Confirmação de instrução de transferência de carteira/modalidade de cobrança', |
|
135
|
|
|
]; |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* Return the default state of itau infos. |
|
139
|
|
|
* |
|
140
|
|
|
* @return array |
|
141
|
|
|
*/ |
|
142
|
|
|
public function defaults() |
|
143
|
|
|
{ |
|
144
|
|
|
return [ |
|
145
|
|
|
'especie' => '01', |
|
146
|
|
|
'instruction1' => '00', |
|
147
|
|
|
'instruction2' => '00', |
|
148
|
|
|
]; |
|
149
|
|
|
} |
|
150
|
|
|
} |
|
151
|
|
|
|