} error_message($msg[321], $msg_suppr_err, 1, 'admin.php?categ=acquisition&sub=compta&action=list&ent=' . $ent); } } else { show_list_exer($ent); } break; case 'clot': //On vérifie que tous les budgets sont cloturés et toutes les commandes archivées if ($id) { $total1 = exercices::hasBudgetsActifs($id); $total2 = exercices::hasActesActifs($id); if ($total1 + $total2 == 0) { $ex = new exercices($id); $ex->statut = '0'; $ex->save(); show_list_exer($ent); } else { $msg_suppr_err = $msg[acquisition_compta_actif]; if ($total1) { $msg_suppr_err .= "<br />- " . $msg[acquisition_compta_used_bud]; } if ($total2) { $msg_suppr_err .= "<br />- " . $msg[acquisition_compta_used_act]; } error_message($msg[321], $msg_suppr_err, 1, 'admin.php?categ=acquisition&sub=compta&action=list&ent=' . $ent); } } else { show_list_exer($ent); } break;