{include="header"}

<div id="quick_summary">
    <h2>Balance</h2>
    <p class="center">Read <em>line</em> owes <em>case</em>€ to <em>column</em>. You can click on links to confirm the payback.
    <table> 
        <tr>
            <th>Owes\To</th>
            {loop="users"}
                <th>{$value.name}</th>
            {/loop}
        </tr>
        {loop="users"}
            <tr>
                <th>{$value.name}</th>
            </tr>
        {/loop}
    </table>
</div>
<div id="detailed_summary">
    <h2>Detailed list of bills for last month</h2>

    <table>
        <tr>
            <th>Date</th>
            <th>Paid by</th>
            <th>Users in</th>
            <th>Amount</th>
            <th>What ?</th>
            <th>Edit</th>
            <th>Delete</th>
        </tr>
        {loop="bill"}
            <tr>
                <td>{$value.date}</td>
                <td>{$value.buyer}</td>
                <td>{$value.users_in}</td>
                <td>{$value.amount}</td>
                <td>{$value.what}</td>
                <td><a href="index.php?do=edit_bill&id=">Edit</a></td>
                <td><a href="index.php?do=delete_bill&id=">Delete</a></td>
            </tr>
        {/loop}
    </table>
</div>