Overview
Comment: | Ne pas faire apparaître les écritures de report dans le rapprochement |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
95fd97dcb29a2dd41d3d5aee08c68a1a |
User & Date: | bohwaz on 2019-01-24 10:45:39 |
Other Links: | manifest | tags |
Context
2019-01-25
| ||
10:07 | Améliorer le paquet debian : ajouter Garradin dans le menu et les applications dispo, et utiliser un PID check-in: b3c9619c4e user: bohwaz tags: trunk | |
2019-01-24
| ||
10:45 | Ne pas faire apparaître les écritures de report dans le rapprochement check-in: 95fd97dcb2 user: bohwaz tags: trunk, stable | |
2019-01-23
| ||
11:01 | Ne pas compter le nombre d'arguments de la trace, car ce n'est pas un tableau check-in: 6ba10ca59d user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Compta/Rapprochement.php from [dbf2a90fad] to [21098b9dae].
︙ | ︙ | |||
11 12 13 14 15 16 17 | class Rapprochement { public function getJournal($compte, $debut, $fin, &$solde_initial, &$solde_final, $sauf_deja_rapprochees = false) { $db = DB::getInstance(); $query = 'SELECT | | | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | class Rapprochement { public function getJournal($compte, $debut, $fin, &$solde_initial, &$solde_final, $sauf_deja_rapprochees = false) { $db = DB::getInstance(); $query = 'SELECT COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_debit = :compte AND compte_credit NOT LIKE \'8%\' AND date < :date), 0) - COALESCE((SELECT SUM(montant) FROM compta_journal WHERE compte_credit = :compte AND compte_debit NOT LIKE \'8%\' AND date < :date), 0)'; $solde_initial = $solde = $db->firstColumn($query, [ 'compte' => $compte, 'date' => $debut, ]); $query = ' SELECT j.*, strftime(\'%s\', j.date) AS date, (CASE WHEN j.compte_debit = :compte THEN j.montant ELSE -(j.montant) END) AS solde, r.date AS date_rapprochement FROM compta_journal AS j LEFT JOIN compta_rapprochement AS r ON r.id_operation = j.id WHERE (compte_debit = :compte OR compte_credit = :compte) AND j.date >= :debut AND j.date <= :fin AND compte_debit NOT LIKE \'8%\' AND compte_credit NOT LIKE \'8%\' ' . ($sauf_deja_rapprochees ? 'AND r.id_operation IS NULL' : '') . ' ORDER BY date ASC;'; $result = $db->get($query, [ 'compte' => $compte, 'debut' => $debut, 'fin' => $fin, |
︙ | ︙ |