Exemplo n.º 1
0
         if ($ex_deb[0] > $ex_fin[0] || $ex_deb[0] == $ex_fin[0] && $ex_deb[1] > $ex_fin[1] || $ex_deb[0] == $ex_fin[0] && $ex_deb[1] == $ex_fin[1] && $ex_deb[2] >= $ex_fin[2]) {
             error_form_message($libelle . $msg["acquisition_compta_date_inf"]);
             break;
         }
         //A voir , Pas de recoupements entre exercices
     }
     $ex = new exercices($id);
     $ex->libelle = $libelle;
     $ex->num_entite = $ent;
     if ($date_deb && $date_fin) {
         $ex->date_debut = $deb;
         $ex->date_fin = $fin;
     }
     $ex->save();
     if ($def) {
         $ex->setDefault();
     }
     show_list_exer($ent);
     break;
 case 'del':
     if ($id) {
         $total1 = exercices::hasBudgetsActifs($id);
         $total2 = exercices::hasActesACtifs($id);
         if ($total1 + $total2 == 0) {
             exercices::delete($id);
             show_list_exer($ent);
         } else {
             $msg_suppr_err = $msg[acquisition_compta_used];
             if ($total1) {
                 $msg_suppr_err .= "<br />- " . $msg[acquisition_compta_used_bud];
             }