188 |
"idx" => $dossier, |
"idx" => $dossier, |
189 |
)); |
)); |
190 |
$val_di = json_decode($inst_di->get_json_data(), true); |
$val_di = json_decode($inst_di->get_json_data(), true); |
191 |
|
if ($val_di['dossier_instruction_type_code'] === 'T') { |
192 |
|
$val_di['date_decision_transfert'] = $val_di['date_decision']; |
193 |
|
} |
194 |
unset($val_di['initial_dt']); |
unset($val_di['initial_dt']); |
195 |
unset($val_di['log_instructions']); |
unset($val_di['log_instructions']); |
196 |
return $val_di; |
return $val_di; |
218 |
'cerfa' => $inst_dt->getVal('cerfa'), |
'cerfa' => $inst_dt->getVal('cerfa'), |
219 |
); |
); |
220 |
$val_dt = array_merge($val_dt, $inst_dt->get_donnees_techniques_applicables()); |
$val_dt = array_merge($val_dt, $inst_dt->get_donnees_techniques_applicables()); |
221 |
|
if (isset($val_dt['am_exist_date']) === true) { |
222 |
|
$val_dt['am_exist_date_num'] = ''; |
223 |
|
if (is_numeric($val_dt['am_exist_date']) === true) { |
224 |
|
$val_dt['am_exist_date_num'] = $val_dt['am_exist_date']; |
225 |
|
} |
226 |
|
} |
227 |
return $val_dt; |
return $val_dt; |
228 |
} |
} |
229 |
|
|
297 |
return $val_dn; |
return $val_dn; |
298 |
} |
} |
299 |
|
|
300 |
|
protected function get_parcelles_data(string $object, string $idx) { |
301 |
|
$val_dp = array(); |
302 |
|
$inst_di = $this->f->get_inst__om_dbform(array( |
303 |
|
"obj" => $object, |
304 |
|
"idx" => $idx, |
305 |
|
)); |
306 |
|
$list_parcelles = $inst_di->get_parcelles(); |
307 |
|
$no_ordre = 1; |
308 |
|
foreach ($list_parcelles as $parcelle) { |
309 |
|
$val_dp[$parcelle[$object.'_parcelle']] = array( |
310 |
|
$object.'_parcelle' => $parcelle[$object.'_parcelle'], |
311 |
|
'libelle' => $parcelle['libelle'], |
312 |
|
'no_ordre' => $no_ordre, |
313 |
|
); |
314 |
|
$no_ordre++; |
315 |
|
} |
316 |
|
return $val_dp; |
317 |
|
} |
318 |
|
|
319 |
protected function view_form_json() { |
protected function view_form_json() { |
320 |
// Mise à jour des valeurs |
// Mise à jour des valeurs |
321 |
if ($this->f->get_submitted_get_value('valid') === 'true' |
if ($this->f->get_submitted_get_value('valid') === 'true' |
378 |
if ($this->getVal('type') === 'creation_DA') { |
if ($this->getVal('type') === 'creation_DA') { |
379 |
$val['dossier_autorisation'] = $this->get_dossier_autorisation_data($this->getVal('object_id')); |
$val['dossier_autorisation'] = $this->get_dossier_autorisation_data($this->getVal('object_id')); |
380 |
$val['donnees_techniques'] = $this->get_donnees_techniques_data($this->getVal('object_id'), 'dossier_autorisation'); |
$val['donnees_techniques'] = $this->get_donnees_techniques_data($this->getVal('object_id'), 'dossier_autorisation'); |
381 |
|
$val['dossier_autorisation_parcelle'] = $this->get_parcelles_data('dossier_autorisation', $val['dossier_autorisation']['dossier_autorisation']); |
382 |
$val_external_uid = array(); |
$val_external_uid = array(); |
383 |
$val_external_uid['dossier_autorisation'] = $this->get_external_uid($val['dossier_autorisation']['dossier_autorisation'], 'dossier_autorisation'); |
$val_external_uid['dossier_autorisation'] = $this->get_external_uid($val['dossier_autorisation']['dossier_autorisation'], 'dossier_autorisation'); |
384 |
$val['external_uid'] = $val_external_uid; |
$val['external_uid'] = $val_external_uid; |
391 |
$val['donnees_techniques'] = $this->get_donnees_techniques_data($this->getVal('object_id'), 'dossier_instruction'); |
$val['donnees_techniques'] = $this->get_donnees_techniques_data($this->getVal('object_id'), 'dossier_instruction'); |
392 |
$val['demandeur'] = $this->get_demandeurs_data($val['dossier']['dossier']); |
$val['demandeur'] = $this->get_demandeurs_data($val['dossier']['dossier']); |
393 |
$val['architecte'] = $this->get_architecte_data($val['donnees_techniques']['architecte']); |
$val['architecte'] = $this->get_architecte_data($val['donnees_techniques']['architecte']); |
394 |
|
$val['dossier_parcelle'] = $this->get_parcelles_data('dossier', $val['dossier']['dossier']); |
395 |
$val_external_uid = array(); |
$val_external_uid = array(); |
396 |
$val_external_uid['dossier_autorisation'] = $this->get_external_uid($val['dossier']['dossier_autorisation'], 'dossier_autorisation'); |
$val_external_uid['dossier_autorisation'] = $this->get_external_uid($val['dossier']['dossier_autorisation'], 'dossier_autorisation'); |
397 |
$val_external_uid['dossier'] = $this->get_external_uid($val['dossier']['dossier'], 'dossier'); |
$val_external_uid['dossier'] = $this->get_external_uid($val['dossier']['dossier'], 'dossier'); |