Differences From Artifact [aa772de834]:

To Artifact [c08d53a522]:


26
27
28
29
30
31
32







33
34
35
36
37
38
39
40
            $id = $cats->add(array(
                'intitule'      =>  utils::post('intitule'),
                'description'   =>  utils::post('description'),
                'compte'        =>  utils::post('compte'),
                'type'          =>  utils::post('type'),
            ));








            utils::redirect('/admin/compta/categories.php?type='.(int)utils::post('type'));
        }
        catch (UserException $e)
        {
            $error = $e->getMessage();
        }
    }
}







>
>
>
>
>
>
>
|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
            $id = $cats->add(array(
                'intitule'      =>  utils::post('intitule'),
                'description'   =>  utils::post('description'),
                'compte'        =>  utils::post('compte'),
                'type'          =>  utils::post('type'),
            ));

            if (utils::post('type') == Garradin_Compta_Categories::DEPENSES)
                $type = 'depenses';
            if (utils::post('type') == Garradin_Compta_Categories::AUTRES)
                $type = 'autres';
            else
                $type = 'recettes';

            utils::redirect('/admin/compta/categories.php?type='.$type);
        }
        catch (UserException $e)
        {
            $error = $e->getMessage();
        }
    }
}