@@ 218-234 (lines=17) @@ | ||
215 | return true; |
|
216 | } |
|
217 | ||
218 | function getList() |
|
219 | { |
|
220 | $db = new DB_Sql; |
|
221 | $db->query("SELECT id, name, identifier, type_key FROM cms_template_section WHERE template_id = " . $this->template->get('id') . " AND intranet_id = " . $this->kernel->intranet->get('id') . " AND active = 1 ORDER BY position ASC"); |
|
222 | ||
223 | $i = 0; |
|
224 | $sections = array(); |
|
225 | while ($db->nextRecord()) { |
|
226 | $sections[$i]['id'] = $db->f('id'); |
|
227 | $sections[$i]['name'] = $db->f('name'); |
|
228 | $sections[$i]['identifier'] = $db->f('identifier'); |
|
229 | $sections[$i]['type_key'] = $db->f('type_key'); |
|
230 | $sections[$i]['type'] = $this->section_types[$db->f('type_key')]; |
|
231 | $i++; |
|
232 | } |
|
233 | return $sections; |
|
234 | } |
|
235 | ||
236 | ||
237 | function isIdentifierUnique($identifier) |
@@ 123-140 (lines=18) @@ | ||
120 | return true; |
|
121 | } |
|
122 | ||
123 | function getStatedActions($action) |
|
124 | { |
|
125 | $db = new DB_Sql; |
|
126 | $db->query("SELECT * FROM accounting_year_end_action WHERE year_id = " . $this->year->get('id') . " AND type_key = ".array_search($action, $this->actions)." AND intranet_id = " . $this->year->kernel->intranet->get('id')); |
|
127 | $actions = array(); |
|
128 | $i = 0; |
|
129 | while ($db->nextRecord()) { |
|
130 | $actions[$i]['id'] = $db->f('id'); |
|
131 | $actions[$i]['voucher_id'] = $db->f('voucher_id'); |
|
132 | $actions[$i]['debet_account_id'] = $db->f('debet_account_id'); |
|
133 | $actions[$i]['credit_account_id'] = $db->f('credit_account_id'); |
|
134 | $actions[$i]['amount'] = $db->f('amount'); |
|
135 | ||
136 | $i++; |
|
137 | } |
|
138 | ||
139 | return $actions; |
|
140 | } |
|
141 | ||
142 | function flushStatement($type) |
|
143 | { |