Overview
Comment:Suppression des associations écritures/cotisations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 60da784ccd6023a46bbfd0f1e19118180c088b84
User & Date: bohwaz on 2014-04-01 18:10:17
Other Links: manifest | tags
Context
2014-04-01
18:33
Archives .tar.gz plutôt que .phar check-in: 4b166c4876 user: bohwaz tags: trunk
18:10
Suppression des associations écritures/cotisations check-in: 60da784ccd user: bohwaz tags: trunk
18:10
Ne pas obliger à avoir un param check-in: f588c9e6cb user: bohwaz tags: trunk
Changes

Modified src/include/class.compta_journal.php from [a5ce496690] to [5b38c26b18].

138
139
140
141
142
143
144

145
146
147
148
149
150
151

        // Vérification que l'on peut éditer cette opération
        if (!$this->_checkOpenExercice($db->simpleQuerySingle('SELECT id_exercice FROM compta_journal WHERE id = ?;', false, $id)))
        {
            throw new UserException('Cette opération fait partie d\'un exercice qui a été clôturé.');
        }


        $db->simpleExec('DELETE FROM compta_journal WHERE id = ?;', (int)$id);

        return true;
    }

    public function get($id)
    {







>







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

        // Vérification que l'on peut éditer cette opération
        if (!$this->_checkOpenExercice($db->simpleQuerySingle('SELECT id_exercice FROM compta_journal WHERE id = ?;', false, $id)))
        {
            throw new UserException('Cette opération fait partie d\'un exercice qui a été clôturé.');
        }

        $db->simpleExec('DELETE FROM membres_operations WHERE id_operation = ?;', (int)$id);
        $db->simpleExec('DELETE FROM compta_journal WHERE id = ?;', (int)$id);

        return true;
    }

    public function get($id)
    {

Modified src/include/class.cotisations_membres.php from [4cf0597b34] to [f2efd7acab].

92
93
94
95
96
97
98

99
100
101
102
103
104
105
	 * Supprimer un événement de cotisation
	 * @param  integer $id ID de l'événement à supprimer
	 * @return integer true en cas de succès
	 */
	public function delete($id)
	{
		$db = DB::getInstance();

		return $db->simpleExec('DELETE FROM cotisations_membres WHERE id = ?;', (int) $id);
	}

	public function get($id)
	{
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM cotisations_membres WHERE id = ?;', true, (int)$id);







>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
	 * Supprimer un événement de cotisation
	 * @param  integer $id ID de l'événement à supprimer
	 * @return integer true en cas de succès
	 */
	public function delete($id)
	{
		$db = DB::getInstance();
		$db->simpleExec('DELETE FROM membres_operations WHERE id_cotisation = ?;', (int)$id);
		return $db->simpleExec('DELETE FROM cotisations_membres WHERE id = ?;', (int) $id);
	}

	public function get($id)
	{
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM cotisations_membres WHERE id = ?;', true, (int)$id);

Modified src/templates/admin/membres/cotisations/supprimer.tpl from [ad40741d00] to [4689fee8b9].

16
17
18
19
20
21
22


23
24
25
26
27
28
29
30
31
32
33
<form method="post" action="{$self_url|escape}">
    <fieldset>
        <legend>Supprimer une cotisation membre</legend>
        <h3 class="warning">
            Êtes-vous sûr de vouloir supprimer la cotisation membre
            du {$cotisation.date|format_sqlite_date_to_french}&nbsp;?
        </h3>


    </fieldset>
    </fieldset>

    <p class="submit">
        {csrf_field key="del_cotisation_`$cotisation.id`"}
        <input type="submit" name="delete" value="Supprimer &rarr;" />
    </p>
</form>


{include file="admin/_foot.tpl"}







>
>











16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<form method="post" action="{$self_url|escape}">
    <fieldset>
        <legend>Supprimer une cotisation membre</legend>
        <h3 class="warning">
            Êtes-vous sûr de vouloir supprimer la cotisation membre
            du {$cotisation.date|format_sqlite_date_to_french}&nbsp;?
        </h3>
        <p class="alert">Attention si des écritures comptables sont liées à cette cotisation
            elles ne seront pas supprimées.</p>
    </fieldset>
    </fieldset>

    <p class="submit">
        {csrf_field key="del_cotisation_`$cotisation.id`"}
        <input type="submit" name="delete" value="Supprimer &rarr;" />
    </p>
</form>


{include file="admin/_foot.tpl"}