Overview
Comment: | Amélioration requête report automatique, permettant de raccourcir le temps de clôture d'un exercice |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
08efcf1930aa2b37641a42e14010a6ef |
User & Date: | bohwaz on 2018-05-10 12:33:07 |
Other Links: | manifest | tags |
References
2020-12-08
| ||
23:25 | • Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz | |
Context
2018-05-10
| ||
13:20 | Permettre de désactiver l'appel à NTP pour le login TOTP check-in: e288c7a5af user: bohwaz tags: trunk | |
12:33 | Amélioration requête report automatique, permettant de raccourcir le temps de clôture d'un exercice check-in: 08efcf1930 user: bohwaz tags: trunk | |
11:24 | Correctif : si le fichier n'existe pas, la couleur personnalisée ne peut pas marcher check-in: 46b7ebe138 user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Compta/Exercices.php from [bdc28e0e83] to [f9841e58c7].
︙ | ︙ | |||
158 159 160 161 162 163 164 | $this->solderResultat($old_id, $date); // Récupérer chacun des comptes de bilan et leurs soldes (uniquement les classes 1 à 5) $statement = $db->preparedQuery('SELECT compta_comptes.id AS compte, compta_comptes.position AS position, ROUND(COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_debit = compta_comptes.id AND id_exercice = :id), 0), 2) - ROUND(COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_credit = compta_comptes.id AND id_exercice = :id), 0), 2) AS solde FROM compta_comptes | | > > | > | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | $this->solderResultat($old_id, $date); // Récupérer chacun des comptes de bilan et leurs soldes (uniquement les classes 1 à 5) $statement = $db->preparedQuery('SELECT compta_comptes.id AS compte, compta_comptes.position AS position, ROUND(COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_debit = compta_comptes.id AND id_exercice = :id), 0), 2) - ROUND(COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_credit = compta_comptes.id AND id_exercice = :id), 0), 2) AS solde FROM compta_comptes INNER JOIN compta_journal ON compta_journal.id_exercice = :id AND ( (compta_comptes.id = compta_journal.compte_debit AND CAST(substr(compta_journal.compte_debit, 1, 1) AS INTEGER) <= 5) OR (compta_comptes.id = compta_journal.compte_credit AND CAST(substr(compta_journal.compte_credit, 1, 1) AS INTEGER) <= 5) ) WHERE solde != 0 GROUP BY compta_comptes.id;', ['id' => $old_id]); $diff = 0; $journal = new Journal; while ($row = $statement->fetchArray(SQLITE3_ASSOC)) { |
︙ | ︙ | |||
192 193 194 195 196 197 198 | 'date' => $date, 'montant' => $solde, 'compte_debit' => $compte_debit, 'compte_credit' => $compte_credit, 'remarques' => 'Report de solde créé automatiquement à la clôture de l\'exercice précédent', ]); } | | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 'date' => $date, 'montant' => $solde, 'compte_debit' => $compte_debit, 'compte_credit' => $compte_credit, 'remarques' => 'Report de solde créé automatiquement à la clôture de l\'exercice précédent', ]); } // FIXME utiliser $diff pour équilibrer $db->commit(); return true; } |
︙ | ︙ |