Added a balance statement on the index page
This commit is contained in:
parent
af2363c7cd
commit
9c90c37dd8
@ -1143,6 +1143,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
if(!$current_user->getAdmin()) {
|
||||
$user_balance = 0;
|
||||
foreach($users_list as $user1) {
|
||||
$user_balance -= $balances[$current_user->getId()][$user1->getId()];
|
||||
$user_balance += $balances[$user1->getId()][$current_user->getId()];
|
||||
}
|
||||
$tpl->assign('user_balance', $user_balance);
|
||||
}
|
||||
|
||||
$tpl->assign('users', secureDisplay($users_list));
|
||||
$tpl->assign('invoices', secureDisplay($invoices_list));
|
||||
$tpl->assign('paybacks', secureDisplay($paybacks));
|
||||
|
@ -53,6 +53,7 @@
|
||||
{/if}
|
||||
{/loop}
|
||||
</table>
|
||||
<p class="center">Balance : {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="detailed_summary">
|
||||
|
@ -53,6 +53,7 @@
|
||||
{/if}
|
||||
{/loop}
|
||||
</table>
|
||||
<p class="center">Solde : {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="detailed_summary">
|
||||
|
Loading…
Reference in New Issue
Block a user