{include="header"} {if condition="$notice != ''"}

{$notice}

{/if}

{$i18n['balance']}

{if condition="$current_user->getAdmin()"}

{$i18n['home_table_caption']} {loop="users"} {/loop} {loop="users"} {loop="users"} {if condition="$balances[$value1->getId()][$value2->getId()] === 'X'"} {elseif condition="$balances[$value1->getId()][$value2->getId()] === '-' || ($value2->getId() != $current_user->getId() && !$current_user->getAdmin())"} {else} {/if} {/loop} {/loop}
{$i18n['owes']}\{$i18n['to']}{$value->getDisplayName()}
{$value->getDisplayName()}{$balances[$value1->getId()][$value2->getId()]}{$balances[$value1->getId()][$value2->getId()]}
{else} {loop="$users"} {if condition="$balances[$value->getId()][$current_user->getId()] !== 'X' && $balances[$value->getId()][$current_user->getId()] !== '-'"} {elseif condition="$balances[$current_user->getId()][$value->getId()] !== 'X' && $balances[$current_user->getId()][$value->getId()] !== '-'"} {/if} {/loop}
{$i18n['users']} {$i18n['you_owe_him']} {$i18n['he_owes_you']}
{$value->getDisplayName()} - {$balances[$value->getId()][$current_user->getId()]}{$currency}
{$value->getDisplayName()} {$balances[$current_user->getId()][$value->getId()]}{$currency} -

{$i18n['balance']}{$i18n['before_double_ponctuation']}: {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}

{/if}

{$i18n['detailed_list_bills']}{if condition="$all == 0"} {$i18n['for_last_month']}{/if}

{if condition="$all == 0"}

{$i18n['display_all_bills']}

{else}

{$i18n['only_last_month_bills']}

{/if} {if condition="$invoices !== false && count($invoices)>=1"} {loop="invoices"} {/loop}
{$i18n['date']} {$i18n['paid_by']} {$i18n['users_in']} {$i18n['amount']} {$i18n['what']}{$i18n['before_double_ponctuation']}? {$i18n['edit']} {$i18n['delete']}
{$value->getDate('d/m/Y A')} {$users[$value->getBuyer()]->getDisplayName()} {loop="$value->getUsersIn()->get()"} {$users[$key2]->getDisplayName()} {if condition="$value2 > 1"} ({$value2} {$i18n['guests']}) {elseif condition="$value2 == 1"} ({$value2} {$i18n['guest']}) {/if} {if condition="$value1->getBuyer() != $key2"} - {if condition="$paybacks[$value1->getId()] === false || !in_array($key2, array_keys($paybacks[$value1->getId()]))"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {$i18n['remains']} {$value1->getAmountPerPerson($key2)} {$currency} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {else} {if condition="$paybacks[$value1->getId()][$key2]->getAmount() == $value1->getAmountPerPerson($key2)"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {$i18n['paid']} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {else} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {$i18n['remains']} {$value1->getAmountPerPerson($key2) - $paybacks[$value1->getId()][$key2]->getAmount()}{$currency} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {/if} {/if} {/if} {/if}
{/loop}
{$value->getAmount()}{$currency} {$value->getWhat()} {if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"} {$i18n['edit']} {else} - {/if} {if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"} {$i18n['delete']} {else} - {/if}
{else}

{$i18n['no_bills']}

{/if}
{include="footer"}