Overview
SHA1:3fcc27ed052df8ea0ea86f33a81c179aab7844c6
Date: 2013-06-18 09:04:24
User: bohwaz
Comment:Corrections
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2013-06-18
09:04
[1b4f728d61] Début gestion transactions (user: bohwaz, tags: trunk)
09:04
[3fcc27ed05] Corrections (user: bohwaz, tags: trunk)
2013-06-08
09:11
[8d9bbb17fd] Merge 0.5.4 (user: bohwaz, tags: trunk)
Changes

Modified include/class.transactions.php from [ecac52251c] to [a6b5c28074].

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136
137
138
139
140
	 */
	public function delete($id)
	{
		$db = DB::getInstance();

		if ($db->simpleQuerySingle('SELECT 1 FROM membres_transactions WHERE id_transaction = ? LIMIT 1;', false, (int) $id))
		{
			throw new UserException('Il existe des transactions utilisant cette catégorie de transaction.')
		}

		return $db->simpleExec('DELETE FROM transactions WHERE id = ?;', (int) $id);
	}

	public function get($id)
	{
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM transactions WHERE id = ?;', true, (int) $id);
	}

	public function listByName()
	{

		return $db->simpleStatementFetch('SELECT * FROM transactions ORDER BY intitule;')
	}
}

?>







|













>
|




115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
	 */
	public function delete($id)
	{
		$db = DB::getInstance();

		if ($db->simpleQuerySingle('SELECT 1 FROM membres_transactions WHERE id_transaction = ? LIMIT 1;', false, (int) $id))
		{
			throw new UserException('Il existe des transactions utilisant cette catégorie de transaction.');
		}

		return $db->simpleExec('DELETE FROM transactions WHERE id = ?;', (int) $id);
	}

	public function get($id)
	{
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM transactions WHERE id = ?;', true, (int) $id);
	}

	public function listByName()
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM transactions ORDER BY intitule;');
	}
}

?>

Modified templates/admin/_head.tpl from [5b934e5585] to [b7ef29b5f2].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
        {if $user.droits.membres >= Garradin\Membres::DROIT_ACCES}
            <li class="list_members{if $current == 'membres'} current{/if}"><a href="{$admin_url}membres/">Membres <small>({$nb_membres|escape})</small></a>
            {if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}
            <ul>
                <li class="add member{if $current == 'membres/ajouter'} current{/if}"><a href="{$admin_url}membres/ajouter.php">Ajouter</a></li>
                {if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
                <li class="member config{if $current == 'membres/categories'} current{/if}"><a href="{$admin_url}membres/categories.php">Catégories</a></li>
                <li class="member_transactions{if $current == 'membres/transactions'} current{/if}"><a href="{$admin_url}membres/transactions.php">Transactions</a></li>
                <li class="members_mail{if $current == 'membres/message_collectif'} current{/if}"><a href="{$admin_url}membres/message_collectif.php">Message collectif</a></li>
                {/if}
            </ul>
            {/if}
            </li>
        {/if}
        {if $user.droits.compta >= Garradin\Membres::DROIT_ACCES}







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
        {if $user.droits.membres >= Garradin\Membres::DROIT_ACCES}
            <li class="list_members{if $current == 'membres'} current{/if}"><a href="{$admin_url}membres/">Membres <small>({$nb_membres|escape})</small></a>
            {if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}
            <ul>
                <li class="add member{if $current == 'membres/ajouter'} current{/if}"><a href="{$admin_url}membres/ajouter.php">Ajouter</a></li>
                {if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
                <li class="member config{if $current == 'membres/categories'} current{/if}"><a href="{$admin_url}membres/categories.php">Catégories</a></li>
                <li class="member_transactions{if $current == 'membres/transactions'} current{/if}"><a href="{$admin_url}membres/transactions/">Transactions</a></li>
                <li class="members_mail{if $current == 'membres/message_collectif'} current{/if}"><a href="{$admin_url}membres/message_collectif.php">Message collectif</a></li>
                {/if}
            </ul>
            {/if}
            </li>
        {/if}
        {if $user.droits.compta >= Garradin\Membres::DROIT_ACCES}