Overview
Comment: | Add list of debts and credits for a user |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
328a714b2c5c34ce6b7e5c7d3793cfd3 |
User & Date: | bohwaz on 2022-06-07 16:40:48 |
Other Links: | manifest | tags |
Context
2022-06-07
| ||
17:20 | Fix duration in services list check-in: d99d64b8b5 user: bohwaz tags: trunk, stable | |
16:40 | Add list of debts and credits for a user check-in: 328a714b2c user: bohwaz tags: trunk | |
16:40 | Do not paginate list of services check-in: 68e5f07fc3 user: bohwaz tags: trunk, stable | |
Changes
Modified src/templates/me/services.tpl from [941510c129] to [ce6b8b28f7].
1 2 3 4 5 6 7 | {include file="admin/_head.tpl" title="Mes activités & cotisations" current="me/services"} <dl class="cotisation"> <dt>Mes activités et cotisations</dt> {foreach from=$services item="service"} <dd{if $service.archived} class="disabled"{/if}> {$service.label} | > > > | 1 2 3 4 5 6 7 8 9 10 | <?php use Garradin\Entities\Accounting\Account; ?> {include file="admin/_head.tpl" title="Mes activités & cotisations" current="me/services"} <dl class="cotisation"> <dt>Mes activités et cotisations</dt> {foreach from=$services item="service"} <dd{if $service.archived} class="disabled"{/if}> {$service.label} |
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | </dd> {foreachelse} <dd> Vous n'êtes inscrit à aucune activité ou cotisation. </dd> {/foreach} </dl> {if $list->count()} <h2 class="ruler">Historique des inscriptions</h2> {include file="common/dynamic_list_head.tpl"} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | </dd> {foreachelse} <dd> Vous n'êtes inscrit à aucune activité ou cotisation. </dd> {/foreach} </dl> <h2 class="ruler">Dettes et créances</h2> {if !count($accounts)} <p class="help">Aucune dette ou créance n'est associée à votre profil.</p> {else} <table class="list"> <thead> <tr> <td class="money">Montant</td> <th>Compte</th> <td></td> </tr> </thead> <tbody> {foreach from=$accounts item="account"} <tr> <td class="money">{$account.balance|raw|money_currency}</td> <th>{$account.label}</th> <td> {if $account.position == Account::LIABILITY}<em>Nous vous devons {$account.balance|raw|money_currency}.</em> {else}<strong class="error">Vous nous devez {$account.balance|raw|money_currency}.</strong>{/if} </td> </tr> {/foreach} </tbody> </table> {/if} {if $list->count()} <h2 class="ruler">Historique des inscriptions</h2> {include file="common/dynamic_list_head.tpl"} |
︙ | ︙ |
Modified src/www/admin/me/services.php from [29032889e2] to [127612d905].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <?php namespace Garradin; use Garradin\Services\Services_User; require_once __DIR__ . '/../_inc.php'; $tpl->assign('membre', $user); $list = Services_User::perUserList($user->id); $list->loadFromQueryString(); $tpl->assign(compact('list')); $tpl->assign('services', Services_User::listDistinctForUser($user->id)); $tpl->display('me/services.tpl'); | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <?php namespace Garradin; use Garradin\Services\Services_User; use Garradin\Accounting\Reports; use Garradin\Entities\Accounting\Account; require_once __DIR__ . '/../_inc.php'; $tpl->assign('membre', $user); $list = Services_User::perUserList($user->id); $list->loadFromQueryString(); $tpl->assign(compact('list')); $tpl->assign('services', Services_User::listDistinctForUser($user->id)); $tpl->assign('accounts', Reports::getAccountsBalances(['user' => $user->id, 'type' => Account::TYPE_THIRD_PARTY])); $tpl->display('me/services.tpl'); |