Comment: | Gestion de projets (compta analytique) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
f571ba36401de4eff6c7f9e5fce7a088 |
User & Date: | bohwaz on 2017-10-11 04:53:31 |
Other Links: | branch diff | manifest | tags |
2017-10-11
| ||
05:09 | Mention du nom du membre dans le libellé (corrige [e0e31b676809fa82cfc38535a602fc63d41a7e70]) check-in: d0463fc9a5 user: bohwaz tags: dev | |
04:53 | Gestion de projets (compta analytique) check-in: f571ba3640 user: bohwaz tags: dev | |
00:38 | Ajoute option : chèques / CB à encaisser check-in: bc71c0882c user: bohwaz tags: dev | |
Modified src/include/data/0.8.0.sql from [9ec86cab92] to [d1406fb553].
︙ | ︙ | |||
58 59 60 61 62 63 64 | INSERT INTO rappels SELECT * FROM rappels_old; INSERT INTO rappels_envoyes SELECT id, id_membre, id_cotisation, id_rappel, date, media FROM rappels_envoyes_old; INSERT INTO wiki_pages SELECT * FROM wiki_pages_old; INSERT INTO wiki_revisions SELECT * FROM wiki_revisions_old; INSERT INTO compta_categories SELECT * FROM compta_categories_old; INSERT INTO compta_comptes_bancaires SELECT * FROM compta_comptes_bancaires_old; INSERT INTO compta_exercices SELECT * FROM compta_exercices_old; | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | INSERT INTO rappels SELECT * FROM rappels_old; INSERT INTO rappels_envoyes SELECT id, id_membre, id_cotisation, id_rappel, date, media FROM rappels_envoyes_old; INSERT INTO wiki_pages SELECT * FROM wiki_pages_old; INSERT INTO wiki_revisions SELECT * FROM wiki_revisions_old; INSERT INTO compta_categories SELECT * FROM compta_categories_old; INSERT INTO compta_comptes_bancaires SELECT * FROM compta_comptes_bancaires_old; INSERT INTO compta_exercices SELECT * FROM compta_exercices_old; INSERT INTO compta_journal SELECT *, NULL FROM compta_journal_old; INSERT INTO compta_rapprochement SELECT * FROM compta_rapprochement_old; INSERT INTO fichiers SELECT * FROM fichiers_old; INSERT INTO membres_operations SELECT * FROM membres_operations_old; INSERT INTO membres_categories SELECT * FROM membres_categories_old; -- Suppression des anciennes tables DROP TABLE cotisations_membres_old; |
︙ | ︙ |
Modified src/include/data/schema.sql from [9abfe9b965] to [1c0ae41b79].
︙ | ︙ | |||
232 233 234 235 236 237 238 239 240 241 242 | banque TEXT NOT NULL, iban TEXT NULL, bic TEXT NULL, FOREIGN KEY(id) REFERENCES compta_comptes(id) ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS compta_journal -- Journal des opérations comptables ( | > > > > > > > > | > | > | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | banque TEXT NOT NULL, iban TEXT NULL, bic TEXT NULL, FOREIGN KEY(id) REFERENCES compta_comptes(id) ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS compta_projets -- Projets (compta analytique) ( id INTEGER PRIMARY KEY NOT NULL, libelle TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS compta_journal -- Journal des opérations comptables ( id INTEGER PRIMARY KEY NOT NULL, libelle TEXT NOT NULL, remarques TEXT NULL, numero_piece TEXT NULL, -- N° de pièce comptable montant REAL NOT NULL, date TEXT NOT NULL DEFAULT CURRENT_DATE CHECK (date(date) IS NOT NULL AND date(date) = date), moyen_paiement TEXT NULL, numero_cheque TEXT NULL, compte_debit TEXT NULL, -- N° du compte dans le plan, NULL est utilisé pour une opération qui vient d'un exercice précédent compte_credit TEXT NULL, -- N° du compte dans le plan id_exercice INTEGER NULL DEFAULT NULL, -- En cas de compta simple, l'exercice est permanent (NULL) id_auteur INTEGER NULL, id_categorie INTEGER NULL, -- Numéro de catégorie (en mode simple) id_projet INTEGER NULL, FOREIGN KEY(moyen_paiement) REFERENCES compta_moyens_paiement(code), FOREIGN KEY(compte_debit) REFERENCES compta_comptes(id), FOREIGN KEY(compte_credit) REFERENCES compta_comptes(id), FOREIGN KEY(id_exercice) REFERENCES compta_exercices(id), FOREIGN KEY(id_auteur) REFERENCES membres(id) ON DELETE SET NULL, FOREIGN KEY(id_categorie) REFERENCES compta_categories(id) ON DELETE SET NULL, FOREIGN KEY(id_projet) REFERENCES compta_projets(id) ON DELETE SET NULL ); CREATE INDEX IF NOT EXISTS compta_operations_exercice ON compta_journal (id_exercice); CREATE INDEX IF NOT EXISTS compta_operations_date ON compta_journal (date); CREATE INDEX IF NOT EXISTS compta_operations_comptes ON compta_journal (compte_debit, compte_credit); CREATE INDEX IF NOT EXISTS compta_operations_auteur ON compta_journal (id_auteur); |
︙ | ︙ |
Modified src/include/lib/Garradin/Compta/Exercices.php from [08a6fdce95] to [f4ee66c0c1].
︙ | ︙ | |||
315 316 317 318 319 320 321 | if (empty($data['fin']) || !checkdate(substr($data['fin'], 5, 2), substr($data['fin'], 8, 2), substr($data['fin'], 0, 4))) { throw new UserException('Date de fin vide ou invalide.'); } return true; } | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 315 316 317 318 319 320 321 322 | if (empty($data['fin']) || !checkdate(substr($data['fin'], 5, 2), substr($data['fin'], 8, 2), substr($data['fin'], 0, 4))) { throw new UserException('Date de fin vide ou invalide.'); } return true; } } |
Modified src/include/lib/Garradin/Compta/Journal.php from [da92b4acf3] to [28552cfb1f].
︙ | ︙ | |||
308 309 310 311 312 313 314 315 316 317 318 319 320 321 | $data['id_categorie'] = NULL; } if (isset($data['id_auteur'])) { $data['id_auteur'] = (int)$data['id_auteur']; } return true; } public function getListForCategory($type = null, $cat = null) { $db = DB::getInstance(); | > > > > > > > > > > | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | $data['id_categorie'] = NULL; } if (isset($data['id_auteur'])) { $data['id_auteur'] = (int)$data['id_auteur']; } if (isset($data['id_projet'])) { $data['id_projet'] = (int)$data['id_projet']; if (!$db->test('compta_projets', $db->where('id', $data['id_projet']))) { throw new UserException('Projet inconnu.'); } } return true; } public function getListForCategory($type = null, $cat = null) { $db = DB::getInstance(); |
︙ | ︙ |
Modified src/include/lib/Garradin/Template.php from [189de9d70f] to [60159f5458].
︙ | ︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | $this->register_modifier('strlen', 'strlen'); $this->register_modifier('get_country_name', ['Garradin\Utils', 'getCountryName']); $this->register_modifier('format_sqlite_date_to_french', ['Garradin\Utils', 'sqliteDateToFrench']); $this->register_modifier('format_bytes', ['Garradin\Utils', 'format_bytes']); $this->register_modifier('format_tel', [$this, 'formatPhoneNumber']); $this->register_modifier('abs', 'abs'); $this->register_modifier('display_champ_membre', [$this, 'displayChampMembre']); $this->register_modifier('strftime_fr', function ($ts, $format) { return Utils::strftime_fr($format, $ts); }); $this->register_modifier('date_fr', function ($ts, $format = 'd/m/Y H:i:s') { return Utils::date_fr($format, $ts); | > > > > > > > > > > > > > > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | $this->register_modifier('strlen', 'strlen'); $this->register_modifier('get_country_name', ['Garradin\Utils', 'getCountryName']); $this->register_modifier('format_sqlite_date_to_french', ['Garradin\Utils', 'sqliteDateToFrench']); $this->register_modifier('format_bytes', ['Garradin\Utils', 'format_bytes']); $this->register_modifier('format_tel', [$this, 'formatPhoneNumber']); $this->register_modifier('abs', 'abs'); $this->register_modifier('display_champ_membre', [$this, 'displayChampMembre']); $this->register_modifier('get_nom_compte', function ($compte) { if (is_null($compte)) { return ''; } if (!isset($this->liste_comptes)) { $this->liste_comptes = (new Compta\Comptes)->getListAll(); } return $this->liste_comptes[$compte]; }); $this->register_modifier('strftime_fr', function ($ts, $format) { return Utils::strftime_fr($format, $ts); }); $this->register_modifier('date_fr', function ($ts, $format = 'd/m/Y H:i:s') { return Utils::date_fr($format, $ts); |
︙ | ︙ |
Modified src/templates/admin/_head.tpl from [26ce54269d] to [7fc934a76c].
︙ | ︙ | |||
84 85 86 87 88 89 90 | <li class="compta new{if $current == 'compta/saisie'} current{/if}"><a href="{$admin_url}compta/operations/saisir.php">Saisie</a></li> {/if} <li class="compta list{if $current == 'compta/gestion'} current{/if}"><a href="{$admin_url}compta/operations/">Suivi des opérations</a></li> <li class="compta banks{if $current == 'compta/banques'} current{/if}"><a href="{$admin_url}compta/banques/">Banques & caisse</a></li> {if $session->canAccess('compta', Garradin\Membres::DROIT_ADMIN)} <li class="compta admin config{if $current == 'compta/categories'} current{/if}"><a href="{$admin_url}compta/categories/">Catégories & comptes</a></li> {/if} | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | <li class="compta new{if $current == 'compta/saisie'} current{/if}"><a href="{$admin_url}compta/operations/saisir.php">Saisie</a></li> {/if} <li class="compta list{if $current == 'compta/gestion'} current{/if}"><a href="{$admin_url}compta/operations/">Suivi des opérations</a></li> <li class="compta banks{if $current == 'compta/banques'} current{/if}"><a href="{$admin_url}compta/banques/">Banques & caisse</a></li> {if $session->canAccess('compta', Garradin\Membres::DROIT_ADMIN)} <li class="compta admin config{if $current == 'compta/categories'} current{/if}"><a href="{$admin_url}compta/categories/">Catégories & comptes</a></li> {/if} <li class="compta admin reports{if $current == 'compta/exercices'} current{/if}"><a href="{$admin_url}compta/exercices/">Exercices & projets</a></li> </ul> </li> {/if} {if $session->canAccess('wiki', Garradin\Membres::DROIT_ACCES)} <li class="wiki{if $current == 'wiki'} current{elseif $current_parent == 'wiki'} current_parent{/if}"><a href="{$admin_url}wiki/"><b class="icn">✎</b><i> Wiki</i></a> <ul> <li class="wiki list{if $current == 'wiki/recent'} current{/if}"><a href="{$admin_url}wiki/recent.php">Dernières modifications</a> |
︙ | ︙ |
Added src/templates/admin/compta/categories/_nav.tpl version [b71d1d8635].
> > > > > > | 1 2 3 4 5 6 | <ul class="actions"> <li{if $current == "recettes"} class="current"{/if}><a href="{$admin_url}compta/categories/?recettes">Recettes</a></li> <li{if $current == "depenses"} class="current"{/if}><a href="{$admin_url}compta/categories/?depenses">Dépenses</a></li> <li{if $current == "ajouter"} class="current"{/if}><strong><a href="{$admin_url}compta/categories/ajouter.php">Ajouter une catégorie</a></strong></li> <li{if $current == "plan"} class="current"{/if}><em><a href="{$admin_url}compta/comptes/">Plan comptable</a></em></li> </ul> |
Modified src/templates/admin/compta/categories/ajouter.tpl from [c81154476b] to [f30b2371c1].
1 2 3 4 5 6 7 8 | {include file="admin/_head.tpl" title="Ajouter une catégorie" current="compta/categories"} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Ajouter une catégorie</legend> | > > | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Ajouter une catégorie" current="compta/categories"} {include file="admin/compta/categories/_nav.tpl" current="ajouter"} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Ajouter une catégorie</legend> |
︙ | ︙ |
Modified src/templates/admin/compta/categories/index.tpl from [9acce7d48b] to [0b5a6fec57].
1 2 | {include file="admin/_head.tpl" title="Catégories" current="compta/categories"} | < < < | < < | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Catégories" current="compta/categories"} {include file="admin/compta/categories/_nav.tpl" current=$current_nav} {if !empty($liste)} <dl class="catList"> {foreach from=$liste item="cat"} <dt>{$cat.intitule}</dt> {if !empty($cat.description)} <dd class="desc">{$cat.description}</dd> |
︙ | ︙ |
Modified src/templates/admin/compta/categories/modifier.tpl from [744bd39187] to [75046d7ae0].
1 2 3 4 5 6 7 8 | {include file="admin/_head.tpl" title="Modifier une catégorie" current="compta/categories"} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Modifier une catégorie</legend> | > > | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Modifier une catégorie" current="compta/categories"} {include file="admin/compta/categories/_nav.tpl" current=null} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Modifier une catégorie</legend> |
︙ | ︙ |
Modified src/templates/admin/compta/categories/supprimer.tpl from [66664b8c0b] to [30d30ea90b].
1 2 3 4 5 6 7 8 | {include file="admin/_head.tpl" title="Supprimer une catégorie" current="compta/categories"} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Supprimer la catégorie comptable ?</legend> | > > | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Supprimer une catégorie" current="compta/categories"} {include file="admin/compta/categories/_nav.tpl" current=null} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Supprimer la catégorie comptable ?</legend> |
︙ | ︙ |
Modified src/templates/admin/compta/exercices/index.tpl from [cfdf80b4cf] to [7db8d2a012].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | {include file="admin/_head.tpl" title="Exercices" current="compta/exercices"} {if !$current_exercice} <ul class="actions"> <li><strong><a href="{$www_url}admin/compta/exercices/ajouter.php">Commencer un nouvel exercice</a></strong></li> </ul> {/if} {if !empty($liste)} <dl class="catList"> {foreach from=$liste item="exercice"} <dt>{$exercice.libelle}</dt> <dd class="desc"> {if $exercice.cloture}Clôturé{else}En cours{/if} | Du {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'} </dd> <dd class="compte"> <strong>{$exercice.nb_operations}</strong> opérations enregistrées. </dd> <dd class="desc"> | > > > > > | | | | | 1 2 3 4 5 6 7 8 9 10 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 | {include file="admin/_head.tpl" title="Exercices" current="compta/exercices"} <ul class="actions"> <li class="current"><a href="{$admin_url}compta/exercices/">Exercices</a></li> <li><a href="{$admin_url}compta/projets/">Projets (compta analytique)</a></li> </ul> {if !$current_exercice} <ul class="actions"> <li><strong><a href="{$www_url}admin/compta/exercices/ajouter.php">Commencer un nouvel exercice</a></strong></li> </ul> {/if} {if !empty($liste)} <dl class="catList"> {foreach from=$liste item="exercice"} <dt>{$exercice.libelle}</dt> <dd class="desc"> {if $exercice.cloture}Clôturé{else}En cours{/if} | Du {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'} </dd> <dd class="compte"> <strong>{$exercice.nb_operations}</strong> opérations enregistrées. </dd> <dd class="desc"> <a href="{$www_url}admin/compta/rapports/journal.php?exercice={$exercice.id}">Journal général</a> | <a href="{$www_url}admin/compta/rapports/grand_livre.php?exercice={$exercice.id}">Grand livre</a> | <a href="{$www_url}admin/compta/rapports/compte_resultat.php?exercice={$exercice.id}">Compte de résultat</a> | <a href="{$www_url}admin/compta/rapports/bilan.php?exercice={$exercice.id}">Bilan</a> </dd> {if $session->canAccess('compta', Garradin\Membres::DROIT_ADMIN)} <dd class="actions"> {if !$exercice.cloture} <a class="icn" href="{$www_url}admin/compta/exercices/modifier.php?id={$exercice.id}" title="Modifier">✎</a> <a class="icn" href="{$www_url}admin/compta/exercices/supprimer.php?id={$exercice.id}" title="Supprimer">✘</a> <a class="icn" href="{$www_url}admin/compta/exercices/cloturer.php?id={$exercice.id}" title="Clôturer cet exercice">🔒</a> |
︙ | ︙ |
Modified src/templates/admin/compta/operations/index.tpl from [cf8308724d] to [83582c111c].
︙ | ︙ | |||
24 25 26 27 28 29 30 | </fieldset> </form> {/if} <table class="list"> <colgroup> <col width="3%" /> | < < < < < < | < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | </fieldset> </form> {/if} <table class="list"> <colgroup> <col width="3%" /> <col width="12%" /> <col width="10%" /> <col /> {if !$categorie && $type} <col width="20%" /> {/if} </colgroup> <tbody> {foreach from=$journal item="ligne"} <tr> <td class="num"><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id}">{$ligne.id}</a></td> <td>{$ligne.date|date_fr:'d/m/Y'}</td> <td>{$ligne.montant|escape|html_money} {$config.monnaie}</td> <th>{$ligne.libelle}</th> {if !$categorie && $type} <td>{$ligne.categorie}</td> {/if} </tr> {foreachelse} <tr> <td colspan="2"></td> <td colspan="2"> Aucune opération. </td> {if !$categorie && $type}<td></td>{/if} </tr> {/foreach} </tbody> <tfoot> <tr> <td></td> <th>Total</th> <td>{$total|escape|html_money} {$config.monnaie}</td> <td></td> {if !$categorie && $type}<td></td>{/if} </tr> </tfoot> </table> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/operations/saisir.tpl from [95ac71bec2] to [36ab83ac38].
︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <dd><input type="text" name="libelle" id="f_libelle" value="{form_field name=libelle}" required="required" /></dd> <dt><label for="f_montant">Montant</label> <b title="(Champ obligatoire)">obligatoire</b></dt> <dd><input type="number" size="5" name="montant" id="f_montant" value="{form_field name=montant default=0.00}" min="0.00" step="0.01" required="required" /> {$config.monnaie}</dd> <dt><label for="f_numero_piece">Numéro de pièce comptable</label></dt> <dd><input type="text" name="numero_piece" id="f_numero_piece" value="{form_field name=numero_piece}" /></dd> <dt><label for="f_remarques">Remarques</label></dt> <dd><textarea name="remarques" id="f_remarques" rows="4" cols="30">{form_field name=remarques}</textarea></dd> </dl> <dl class="type_recette type_depense"> <dt><label for="f_moyen_paiement">Moyen de paiement</label> <b title="(Champ obligatoire)">obligatoire</b></dt> <dd> <select name="moyen_paiement" id="f_moyen_paiement" required="required"> {foreach from=$moyens_paiement item="moyen"} <option value="{$moyen.code}"{if $moyen.code == $moyen_paiement} selected="selected"{/if}>{$moyen.nom}</option> | > > > > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | <dd><input type="text" name="libelle" id="f_libelle" value="{form_field name=libelle}" required="required" /></dd> <dt><label for="f_montant">Montant</label> <b title="(Champ obligatoire)">obligatoire</b></dt> <dd><input type="number" size="5" name="montant" id="f_montant" value="{form_field name=montant default=0.00}" min="0.00" step="0.01" required="required" /> {$config.monnaie}</dd> <dt><label for="f_numero_piece">Numéro de pièce comptable</label></dt> <dd><input type="text" name="numero_piece" id="f_numero_piece" value="{form_field name=numero_piece}" /></dd> <dt><label for="f_remarques">Remarques</label></dt> <dd><textarea name="remarques" id="f_remarques" rows="4" cols="30">{form_field name=remarques}</textarea></dd> {if count($projets) > 1} <dt><label for="f_projet">Projet</label></dt> <dd>{form_select name="projet" values=$projets}</dd> {/if} </dl> <dl class="type_recette type_depense"> <dt><label for="f_moyen_paiement">Moyen de paiement</label> <b title="(Champ obligatoire)">obligatoire</b></dt> <dd> <select name="moyen_paiement" id="f_moyen_paiement" required="required"> {foreach from=$moyens_paiement item="moyen"} <option value="{$moyen.code}"{if $moyen.code == $moyen_paiement} selected="selected"{/if}>{$moyen.nom}</option> |
︙ | ︙ |
Modified src/templates/admin/compta/operations/voir.tpl from [96d5011b27] to [02afdb29f1].
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | <dt>Exercice</dt> <dd> <a href="{$admin_url}compta/exercices/">{$exercice.libelle}</a> | Du {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'} | <strong>{if $exercice.cloture}Clôturé{else}En cours{/if}</strong> </dd> <dt>Opération créée par</dt> <dd> {if $operation.id_auteur} {if $session->canAccess('compta', Garradin\Membres::DROIT_ACCES)} <a href="{$admin_url}membres/fiche.php?id={$operation.id_auteur}">{$nom_auteur}</a> {else} | > > > > > > > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <dt>Exercice</dt> <dd> <a href="{$admin_url}compta/exercices/">{$exercice.libelle}</a> | Du {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'} | <strong>{if $exercice.cloture}Clôturé{else}En cours{/if}</strong> </dd> {if $operation.id_projet} <dt>Projet</dt> <dd> <a href="{$admin_url}compta/projets/">{$projet.libelle}</a> </dd> {/if} <dt>Opération créée par</dt> <dd> {if $operation.id_auteur} {if $session->canAccess('compta', Garradin\Membres::DROIT_ACCES)} <a href="{$admin_url}membres/fiche.php?id={$operation.id_auteur}">{$nom_auteur}</a> {else} |
︙ | ︙ |
Added src/templates/admin/compta/projets/index.tpl version [4cae68a2fd].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | {include file="admin/_head.tpl" title="Projets" current="compta/exercices"} <ul class="actions"> <li><a href="{$admin_url}compta/exercices/">Exercices</a></li> <li class="current"><a href="{$admin_url}compta/projets/">Projets (compta analytique)</a></li> </ul> {form_errors} {if $action == 'modifier'} <form method="post" action="{$self_url}"> <fieldset> <legend>Modifier un projet</legend> <dl> <dt><label for="f_libelle">Libellé</label></dt> <dd><input type="text" name="libelle" id="f_labelle" value="{form_field name=libelle data=$projet}" /></dd> </dl> <p class="submit"> {csrf_field key="modifier_projet_%d"|args:$projet.id} <input type="submit" name="modifier" value="Modifier →" /> </p> </fieldset> </form> {elseif $action == 'supprimer'} <form method="post" action="{$self_url}"> <fieldset> <legend>Supprimer le projet ?</legend> <h3 class="warning"> Êtes-vous sûr de vouloir supprimer le projet « {$projet.libelle} » ? </h3> <p class="help"> Les opérations liées à ce projet ne seront pas supprimées, mais n'auront plus de projet lié. </p> </fieldset> <p class="submit"> {csrf_field key="supprimer_projet_%d"|args:$projet.id} <input type="submit" name="supprimer" value="Supprimer →" /> </p> </form> {else} {if !empty($liste)} <dl class="catList"> {foreach from=$liste item="projet"} <dt>{$projet.libelle}</dt> <dd class="compte">{$projet.nb_operations} opérations</dd> <dd class="desc"> <a href="{$admin_url}compta/rapports/journal.php?projet={$projet.id}">Journal général</a> | <a href="{$admin_url}compta/rapports/grand_livre.php?projet={$projet.id}">Grand livre</a> | <a href="{$admin_url}compta/rapports/compte_resultat.php?projet={$projet.id}">Compte de résultat</a> | <a href="{$admin_url}compta/rapports/bilan.php?projet={$projet.id}">Bilan</a> </dd> {if $session->canAccess('compta', Garradin\Membres::DROIT_ADMIN)} <dd class="actions"> <a class="icn" href="{$admin_url}compta/projets/?modifier={$projet.id}" title="Modifier">✎</a> <a class="icn" href="{$admin_url}compta/projets/?supprimer={$projet.id}" title="Supprimer">✘</a> </dd> {/if} {/foreach} </dl> {/if} {if $session->canAccess('compta', Garradin\Membres::DROIT_ADMIN)} <form method="post" action="{$self_url}"> <fieldset> <legend>Ajouter un nouveau projet</legend> <dl> <dt><label for="f_libelle">Libellé</label></dt> <dd><input type="text" name="libelle" id="f_labelle" value="{form_field name=libelle}" /></dd> </dl> <p class="submit"> {csrf_field key="ajout_projet"} <input type="submit" name="ajouter" value="Ajouter →" /> </p> </fieldset> </form> {/if} {/if} {include file="admin/_foot.tpl"} |
Added src/templates/admin/compta/rapports/_header.tpl version [246e41f329].
> > > > > > > > > | 1 2 3 4 5 6 7 8 9 | <div class="exercice"> <h2>{$config.nom_asso}</h2> {if isset($projet)} <h3>Projet : {$projet.libelle}</h3> {else} <p>Exercice comptable {if $exercice.cloture}clôturé{else}en cours{/if} du {$exercice.debut|date_fr:'d/m/Y'} au {$exercice.fin|date_fr:'d/m/Y'}, généré le {$cloture|date_fr:'d/m/Y'}</p> {/if} </div> |
Modified src/templates/admin/compta/rapports/bilan.tpl from [059e49c098] to [b3279556ab].
1 2 | {include file="admin/_head.tpl" title="Bilan" current="compta/exercices" body_id="rapport"} | | < < < < | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Bilan" current="compta/exercices" body_id="rapport"} {include file="admin/compta/rapports/_header.tpl"} <table> <colgroup> <col width="50%" /> <col width="50%" /> </colgroup> <tbody> |
︙ | ︙ |
Modified src/templates/admin/compta/rapports/compte_resultat.tpl from [8ca1ec22c9] to [510a2bfff7].
1 2 | {include file="admin/_head.tpl" title="Compte de résultat" current="compta/exercices" body_id="rapport"} | | < < < < | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Compte de résultat" current="compta/exercices" body_id="rapport"} {include file="admin/compta/rapports/_header.tpl"} <table> <colgroup> <col width="50%" /> <col width="50%" /> </colgroup> <tbody> |
︙ | ︙ |
Modified src/templates/admin/compta/rapports/grand_livre.tpl from [00c01f9217] to [9f320d7052].
1 2 | {include file="admin/_head.tpl" title="Grand livre" current="compta/exercices" body_id="rapport"} | | < < < < | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Grand livre" current="compta/exercices" body_id="rapport"} {include file="admin/compta/rapports/_header.tpl"} {foreach from=$livre.classes key="classe" item="comptes"} <h3>{$classe|get_nom_compte}</h3> {foreach from=$comptes item="compte" key="code"} {foreach from=$compte.comptes item="souscompte" key="souscode"} <table class="list"> |
︙ | ︙ |
Modified src/templates/admin/compta/rapports/journal.tpl from [5c52f09c4f] to [7a19ce99c8].
1 2 | {include file="admin/_head.tpl" title="Journal général" current="compta/exercices" body_id="rapport"} | | < < < < | 1 2 3 4 5 6 7 8 9 10 | {include file="admin/_head.tpl" title="Journal général" current="compta/exercices" body_id="rapport"} {include file="admin/compta/rapports/_header.tpl"} <table class="list multi"> <thead> <tr> <td>Date</td> <th>Intitulé</th> <td>Comptes</td> |
︙ | ︙ |
Modified src/www/admin/compta/categories/index.php from [0cf8dc5306] to [e2ecaf3c11].
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 | $cats = new Compta\Categories; if (null !== qg('depenses')) $type = Compta\Categories::DEPENSES; else $type = Compta\Categories::RECETTES; $tpl->assign('type', $type); $tpl->assign('liste', $cats->getList($type)); $tpl->display('admin/compta/categories/index.tpl'); | > | 8 9 10 11 12 13 14 15 16 17 18 19 | $cats = new Compta\Categories; if (null !== qg('depenses')) $type = Compta\Categories::DEPENSES; else $type = Compta\Categories::RECETTES; $tpl->assign('current_nav', $type == Compta\Categories::DEPENSES ? 'depenses' : 'recettes'); $tpl->assign('type', $type); $tpl->assign('liste', $cats->getList($type)); $tpl->display('admin/compta/categories/index.tpl'); |
Modified src/www/admin/compta/operations/saisir.php from [a84763f6af] to [84e11944f3].
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 'montant' => f('montant'), 'date' => f('date'), 'compte_credit' => f('compte_credit'), 'compte_debit' => f('compte_debit'), 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_auteur' => $user->id, ]); } elseif ($type == 'virement') { $id = $journal->add([ 'libelle' => f('libelle'), 'montant' => f('montant'), 'date' => f('date'), 'compte_debit' => f('compte1'), 'compte_credit' => f('compte2'), 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_auteur' => $user->id, ]); } else { if ($type == 'recette') { $cat = 'categorie_recette'; | > > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | 'montant' => f('montant'), 'date' => f('date'), 'compte_credit' => f('compte_credit'), 'compte_debit' => f('compte_debit'), 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_auteur' => $user->id, 'id_projet' => f('projet') || null, ]); } elseif ($type == 'virement') { $id = $journal->add([ 'libelle' => f('libelle'), 'montant' => f('montant'), 'date' => f('date'), 'compte_debit' => f('compte1'), 'compte_credit' => f('compte2'), 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_auteur' => $user->id, 'id_projet' => f('projet') || null, ]); } else { if ($type == 'recette') { $cat = 'categorie_recette'; |
︙ | ︙ | |||
134 135 136 137 138 139 140 141 142 143 144 145 146 147 | 'numero_cheque' => ($type == 'dette') ? null : f('numero_cheque'), 'compte_credit' => $credit, 'compte_debit' => $debit, 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_categorie' => ($type === 'dette') ? null : (int)$cat->id, 'id_auteur' => $user->id, ]); } $session->set('context_compta_date', f('date')); Utils::redirect('/admin/compta/operations/saisir.php?ok='.(int)$id); } | > | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | 'numero_cheque' => ($type == 'dette') ? null : f('numero_cheque'), 'compte_credit' => $credit, 'compte_debit' => $debit, 'numero_piece' => f('numero_piece'), 'remarques' => f('remarques'), 'id_categorie' => ($type === 'dette') ? null : (int)$cat->id, 'id_auteur' => $user->id, 'id_projet' => f('projet') || null, ]); } $session->set('context_compta_date', f('date')); Utils::redirect('/admin/compta/operations/saisir.php?ok='.(int)$id); } |
︙ | ︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | $tpl->assign('moyen_paiement', f('moyen_paiement') ?: 'ES'); $tpl->assign('categories_depenses', $cats->getList(Compta\Categories::DEPENSES)); $tpl->assign('categories_recettes', $cats->getList(Compta\Categories::RECETTES)); $tpl->assign('comptes_bancaires', $banques->getList()); $tpl->assign('banque', f('banque')); $tpl->assign('compte_cheque_e_encaisser', Compta\Comptes::CHEQUE_A_ENCAISSER); $tpl->assign('compte_carte_e_encaisser', Compta\Comptes::CARTE_A_ENCAISSER); if (!$session->get('context_compta_date')) { $exercices = new Compta\Exercices; $exercice = $exercices->getCurrent(); if ($exercice->debut > time() || $exercice->fin < time()) | > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | $tpl->assign('moyen_paiement', f('moyen_paiement') ?: 'ES'); $tpl->assign('categories_depenses', $cats->getList(Compta\Categories::DEPENSES)); $tpl->assign('categories_recettes', $cats->getList(Compta\Categories::RECETTES)); $tpl->assign('comptes_bancaires', $banques->getList()); $tpl->assign('banque', f('banque')); $tpl->assign('compte_cheque_e_encaisser', Compta\Comptes::CHEQUE_A_ENCAISSER); $tpl->assign('compte_carte_e_encaisser', Compta\Comptes::CARTE_A_ENCAISSER); $tpl->assign('projets', [0 => '-- Aucun'] + (new Compta\Projets)->getAssocList()); if (!$session->get('context_compta_date')) { $exercices = new Compta\Exercices; $exercice = $exercices->getCurrent(); if ($exercice->debut > time() || $exercice->fin < time()) |
︙ | ︙ |
Modified src/www/admin/compta/operations/voir.php from [267b3ba2b7] to [6dcec0725f].
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | else { $tpl->assign('compte', $credit->libelle); } $tpl->assign('moyen_paiement', $cats->getMoyenPaiement($operation->moyen_paiement)); } if ($operation->id_auteur) { $auteur = (new Membres)->get($operation->id_auteur); $tpl->assign('nom_auteur', $auteur->identite); } $tpl->assign('related_members', $journal->listRelatedMembers($operation->id)); $tpl->display('admin/compta/operations/voir.tpl'); | > > > > > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | else { $tpl->assign('compte', $credit->libelle); } $tpl->assign('moyen_paiement', $cats->getMoyenPaiement($operation->moyen_paiement)); } if ($operation->id_projet) { $tpl->assign('projet', (new Compta\Projets)->get($operation->id_projet)); } if ($operation->id_auteur) { $auteur = (new Membres)->get($operation->id_auteur); $tpl->assign('nom_auteur', $auteur->identite); } $tpl->assign('related_members', $journal->listRelatedMembers($operation->id)); $tpl->display('admin/compta/operations/voir.tpl'); |
Added src/www/admin/compta/projets/index.php version [daf736a4a0].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <?php namespace Garradin; require_once __DIR__ . '/../_inc.php'; $projets = new Compta\Projets; $action = null; $id = null; if (qg('supprimer')) { $session->requireAccess('compta', Membres::DROIT_ADMIN); $action = 'supprimer'; $id = (int) qg('supprimer'); } elseif (qg('modifier')) { $session->requireAccess('compta', Membres::DROIT_ADMIN); $action = 'modifier'; $id = (int) qg('modifier'); } if ($id) { if (!($projet = $projets->get($id))) { throw new UserException('Ce projet n\'existe pas.'); } $tpl->assign('projet', $projet); } if (f('ajouter') && $form->check('ajout_projet')) { $session->requireAccess('compta', Membres::DROIT_ADMIN); $projets->add(f('libelle')); Utils::redirect('/admin/compta/projets/'); } elseif (f('modifier') && $form->check('modifier_projet_' . $id)) { $projets->edit($id, f('libelle')); Utils::redirect('/admin/compta/projets/'); } elseif (f('supprimer') && $form->check('supprimer_projet_' . $id)) { $projets->remove($id); Utils::redirect('/admin/compta/projets/'); } $tpl->assign('action', $action); $tpl->assign('liste', $projets->getList()); $tpl->display('admin/compta/projets/index.tpl'); |
Added src/www/admin/compta/rapports/_inc.php version [73c58d8a9d].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 | <?php namespace Garradin; require_once __DIR__ . '/../_inc.php'; $rapports = new Compta\Rapports; $criterias = []; if (qg('projet')) { $projets = new Compta\Projets; $projet = $projets->get((int) qg('projet')); if (!$projet) { throw new UserException('Projet inconnu.'); } $criterias['id_projet'] = $projet->id; $tpl->assign('projet', $projet); } elseif (qg('exercice')) { $exercices = new Compta\Exercices; $exercice = $exercices->get((int)qg('exercice')); if (!$exercice) { throw new UserException('Exercice inconnu.'); } $criterias['id_exercice'] = $exercice->id; $tpl->assign('cloture', $exercice->cloture ? $exercice->fin : time()); $tpl->assign('exercice', $exercice); } else { throw new UserException('Critère de rapport inconnu.'); } |
Modified src/www/admin/compta/rapports/bilan.php from [8a023f5709] to [a817281776].
1 2 3 | <?php namespace Garradin; | < < | < < < < < < < < < < < < < < < < | < < < | | 1 2 3 4 5 6 7 8 9 | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $tpl->assign('bilan', $rapports->bilan($criterias)); $tpl->display('admin/compta/rapports/bilan.tpl'); |
Modified src/www/admin/compta/rapports/compte_resultat.php from [a0497a409d] to [7128f79903].
1 2 3 | <?php namespace Garradin; | > | < < < < < < < < < < < < < < < < < < | < < < | | 1 2 3 4 5 6 7 8 9 | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $tpl->assign('compte_resultat', $rapports->compteResultat($criterias)); $tpl->display('admin/compta/rapports/compte_resultat.tpl'); |
Modified src/www/admin/compta/rapports/grand_livre.php from [30a396ce8e] to [f6b332c56d].
1 2 3 | <?php namespace Garradin; | > | < < < < < < < < < < < < < < < < < < | < < < | | 1 2 3 4 5 6 7 8 9 | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $tpl->assign('livre', $rapports->grandLivre($criterias)); $tpl->display('admin/compta/rapports/grand_livre.tpl'); |
Modified src/www/admin/compta/rapports/journal.php from [5f28fca015] to [d73a2c213c].
1 2 3 | <?php namespace Garradin; | > | < < < < < < < < < < < < < < < < < < < < < | < < < | | 1 2 3 4 5 6 7 8 9 | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $tpl->assign('journal', $rapports->journal($criterias)); $tpl->display('admin/compta/rapports/journal.tpl'); |
Modified src/www/admin/upgrade.php from [52f275a46e] to [2ce40cf8ef].
︙ | ︙ | |||
246 247 248 249 250 251 252 | // Mise à jour base de données $db->exec(file_get_contents(ROOT . '/include/data/0.7.2.sql')); $db->exec('END;'); } | | | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | // Mise à jour base de données $db->exec(file_get_contents(ROOT . '/include/data/0.7.2.sql')); $db->exec('END;'); } if (version_compare($v, '0.8.0-beta4', '<')) { // Inscription de l'appid $db->exec('PRAGMA application_id = ' . DB::APPID . ';'); // Changement de la taille de pagesize // Cecit devrait améliorer les performances de la DB $db->exec('PRAGMA page_size = 4096;'); |
︙ | ︙ | |||
286 287 288 289 290 291 292 | { $config->set('champ_identifiant', 'numero'); $config->save(); } // Nettoyage de la base de données $db->exec('VACUUM;'); | | < < < | | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | { $config->set('champ_identifiant', 'numero'); $config->save(); } // Nettoyage de la base de données $db->exec('VACUUM;'); // Mise à jour plan comptable: ajout comptes encaissement $comptes = new Compta\Comptes; $comptes->importPlan(); } Utils::clearCaches(); $config->setVersion(garradin_version()); |
︙ | ︙ |