Overview
Comment:Déplacement des rapports de compte
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4ec077c81ea25e95554162f9c8f5fe7d84bc3fdc
User & Date: bohwaz on 2012-10-05 02:09:46
Other Links: manifest | tags
Context
2012-10-05
02:10
Appel correct de _inc.php check-in: f14c9b93ec user: bohwaz tags: trunk
02:09
Déplacement des rapports de compte check-in: 4ec077c81e user: bohwaz tags: trunk
2012-10-01
00:14
Indiquer mailto: dans les adresses mails check-in: 4151daeb1e user: bohwaz tags: trunk
Changes

Modified include/class.compta_journal.php from [0d10c6f300] to [d1b0322073].

41
42
43
44
45
46
47

48
49
50
51
52
53
54
        $db = Garradin_DB::getInstance();
        $exercice = $this->_getCurrentExercice();
        $exercice = is_null($exercice) ? 'IS NULL' : '= ' . (int)$exercice;
        $compte = $inclure_sous_comptes
            ? 'LIKE \'' . $db->escapeString(trim($compte)) . '%\''
            : '= \'' . $db->escapeString(trim($compte)) . '\'';


        $query = 'SELECT
            COALESCE((SELECT SUM(montant) FROM compta_journal
                WHERE compte_debit '.$compte.' AND id_exercice '.$exercice.'), 0)
            - COALESCE((SELECT SUM(montant) FROM compta_journal
                WHERE compte_credit '.$compte.' AND id_exercice '.$exercice.'), 0);';

        return $db->querySingle($query);







>







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
        $db = Garradin_DB::getInstance();
        $exercice = $this->_getCurrentExercice();
        $exercice = is_null($exercice) ? 'IS NULL' : '= ' . (int)$exercice;
        $compte = $inclure_sous_comptes
            ? 'LIKE \'' . $db->escapeString(trim($compte)) . '%\''
            : '= \'' . $db->escapeString(trim($compte)) . '\'';

        // FIXME utiliser compta_comptes.position pour déterminer le sens !
        $query = 'SELECT
            COALESCE((SELECT SUM(montant) FROM compta_journal
                WHERE compte_debit '.$compte.' AND id_exercice '.$exercice.'), 0)
            - COALESCE((SELECT SUM(montant) FROM compta_journal
                WHERE compte_credit '.$compte.' AND id_exercice '.$exercice.'), 0);';

        return $db->querySingle($query);

Modified templates/admin/compta/gestion.tpl from [8bb25b009e] to [d13fcc4165].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{include file="admin/_head.tpl" title="Suivi des opérations" current="compta/gestion"}

<ul class="actions">
    <li class="recettes{if $type == Garradin_Compta_Categories::RECETTES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?recettes">Recettes</a></li>
    <li class="depenses{if $type == Garradin_Compta_Categories::DEPENSES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?depenses">Dépenses</a></li>
    <li class="autres{if $type == Garradin_Compta_Categories::AUTRES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?autres">Autres</a></li>
    <li class="journal"><a href="{$www_url}admin/compta/journal.php">Journal général</a></li>
    <li class="grand_livre"><a href="{$www_url}admin/compta/grand_livre.php">Grand livre</a></li>
    <li class="compte_resultat"><a href="{$www_url}admin/compta/compte_resultat.php">Compte de sultat</a></li>
</ul>

{if $type != Garradin_Compta_Categories::AUTRES}
<form method="get" action="{$self_url}">
    <fieldset>
        <legend>Filtrer par catégorie</legend>
        <select name="cat" onchange="if (!this.value) location.href = '?{if $type == Garradin_Compta_Categories::RECETTES}recettes{else}depenses{/if}'; else this.form.submit();">






<
<
|







1
2
3
4
5
6


7
8
9
10
11
12
13
14
{include file="admin/_head.tpl" title="Suivi des opérations" current="compta/gestion"}

<ul class="actions">
    <li class="recettes{if $type == Garradin_Compta_Categories::RECETTES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?recettes">Recettes</a></li>
    <li class="depenses{if $type == Garradin_Compta_Categories::DEPENSES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?depenses">Dépenses</a></li>
    <li class="autres{if $type == Garradin_Compta_Categories::AUTRES} current{/if}"><a href="{$www_url}admin/compta/gestion.php?autres">Autres</a></li>


    <li><a href="{$www_url}admin/compta/compte_journal.php?id={Garradin_Compta_Comptes::CAISSE}">Journal de caisse</a></li>
</ul>

{if $type != Garradin_Compta_Categories::AUTRES}
<form method="get" action="{$self_url}">
    <fieldset>
        <legend>Filtrer par catégorie</legend>
        <select name="cat" onchange="if (!this.value) location.href = '?{if $type == Garradin_Compta_Categories::RECETTES}recettes{else}depenses{/if}'; else this.form.submit();">

Modified templates/admin/compta/index.tpl from [24a5537e1b] to [03ea5ae7c0].

1
2
3
4
5
6
7
8
9
10








11
12
13
14
15
16
17
18
19
20
21
22
{include file="admin/_head.tpl" title="Comptabilité" current="compta"}

<p class="alert">
    <strong>Attention !</strong>
    La comptabilité est une fonctionnalité en beta,
    il est déconseillé pour le moment de l'utiliser pour la
    comptabilité réelle de votre association.<br />
    Vous êtes cependant encouragé à la tester et à faire part
    de votre retour sur le site de <a href="http://dev.kd2.org/garradin/">Garradin</a>.
</p>









<h3>Évolution des recettes et dépenses sur les 30 derniers jours</h3>
<p>
    <img src="{$www_url}admin/compta/graph.php?g=recettes_depenses" />
</p>

<h3>Évolution actif/passif sur les 30 derniers jours</h3>
<p>
    <img src="{$www_url}admin/compta/graph.php?g=actif_passif" />
</p>

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










>
>
>
>
>
>
>
>












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
{include file="admin/_head.tpl" title="Comptabilité" current="compta"}

<p class="alert">
    <strong>Attention !</strong>
    La comptabilité est une fonctionnalité en beta,
    il est déconseillé pour le moment de l'utiliser pour la
    comptabilité réelle de votre association.<br />
    Vous êtes cependant encouragé à la tester et à faire part
    de votre retour sur le site de <a href="http://dev.kd2.org/garradin/">Garradin</a>.
</p>

<ul class="actions">
    <li class="gestion"><a href="{$www_url}admin/compta/gestion.php">Suivi des opérations</a></li>
    <li class="journal"><a href="{$www_url}admin/compta/rapport/journal.php">Journal général</a></li>
    <li class="grand_livre"><a href="{$www_url}admin/compta/rapport/grand_livre.php">Grand livre</a></li>
    <li class="compte_resultat"><a href="{$www_url}admin/compta/rapport/compte_resultat.php">Compte de résultat</a></li>
    <li class="bilan"><a href="{$www_url}admin/compta/rapport/bilan.php">Bilan</a></li>
</ul>

<h3>Évolution des recettes et dépenses sur les 30 derniers jours</h3>
<p>
    <img src="{$www_url}admin/compta/graph.php?g=recettes_depenses" />
</p>

<h3>Évolution actif/passif sur les 30 derniers jours</h3>
<p>
    <img src="{$www_url}admin/compta/graph.php?g=actif_passif" />
</p>

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

Name change from templates/admin/compta/compte_resultat.tpl to templates/admin/compta/rapport/compte_resultat.tpl.

Name change from templates/admin/compta/grand_livre.tpl to templates/admin/compta/rapport/grand_livre.tpl.

Name change from templates/admin/compta/journal.tpl to templates/admin/compta/rapport/journal.tpl.

Modified www/admin/compta/rapport/compte_resultat.php from [b0eaae1d4d] to [63af06184d].

15
16
17
18
19
20
21
22
23
24

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('compte_resultat', $journal->getCompteResultat());

$tpl->assign('now', time());
$tpl->assign('exercice', $journal->getCurrentExercice());

$tpl->display('admin/compta/compte_resultat.tpl');

?>







|


15
16
17
18
19
20
21
22
23
24

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('compte_resultat', $journal->getCompteResultat());

$tpl->assign('now', time());
$tpl->assign('exercice', $journal->getCurrentExercice());

$tpl->display('admin/compta/rapport/compte_resultat.tpl');

?>

Modified www/admin/compta/rapport/grand_livre.php from [85f8b6a432] to [5b16d9228a].

15
16
17
18
19
20
21
22
23
24

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('livre', $journal->getGrandLivre());

$tpl->assign('now', time());
$tpl->assign('exercice', $journal->getCurrentExercice());

$tpl->display('admin/compta/grand_livre.tpl');

?>







|


15
16
17
18
19
20
21
22
23
24

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('livre', $journal->getGrandLivre());

$tpl->assign('now', time());
$tpl->assign('exercice', $journal->getCurrentExercice());

$tpl->display('admin/compta/rapport/grand_livre.tpl');

?>

Modified www/admin/compta/rapport/journal.php from [1ba98ada2c] to [21fe2b934f].

12
13
14
15
16
17
18
19
20
21
	global $liste_comptes;
	return $liste_comptes[$compte];
}

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('journal', $journal->getJournal());

$tpl->display('admin/compta/journal.tpl');

?>







|


12
13
14
15
16
17
18
19
20
21
	global $liste_comptes;
	return $liste_comptes[$compte];
}

$tpl->register_modifier('get_nom_compte', 'get_nom_compte');
$tpl->assign('journal', $journal->getJournal());

$tpl->display('admin/compta/rapport/journal.tpl');

?>