Overview
Comment:suppression d'opération = suppression du rapprochement lié
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a444ef4fa8112cd73220ef57dfdcf02dba297d07
User & Date: bohwaz on 2016-05-31 05:16:49
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2016-05-31
05:21
Ne pas permettre de faire des ID de compte en minuscule check-in: 2ff14ece2a user: bohwaz tags: trunk
05:16
suppression d'opération = suppression du rapprochement lié check-in: a444ef4fa8 user: bohwaz tags: trunk
04:38
Ne pas permettre de supprimer le champ identifiant ou identite check-in: 90ff4057b3 user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Compta/Journal.php from [819dc3ea62] to [40cb96972d].

147
148
149
150
151
152
153

154

155

156
157
158
159
160
161
162

        // 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)
    {
        $db = DB::getInstance();







>

>

>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

        // 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->exec('BEGIN;');
        $db->simpleExec('DELETE FROM membres_operations WHERE id_operation = ?;', (int)$id);
        $db->simpleExec('DELETE FROM compta_rapprochement WHERE operation = ?;', (int)$id);
        $db->simpleExec('DELETE FROM compta_journal WHERE id = ?;', (int)$id);
        $db->exec('END;');

        return true;
    }

    public function get($id)
    {
        $db = DB::getInstance();