<div style="margin-bottom:5px" class="printonly">{$i.portlet_next_planned_costs}</div>
<div style="max-height:{$max_height}px; overflow:auto;">
<table class="dashed">
        <colgroup>
            <col style="width: 20mm;" />
            <col />
            <col />
            <col style="width: 20mm;" />
            <col style="width: 20mm;" />
        </colgroup>
    <thead>
        <tr>
            <th style="min-width:65px">{$i.externalexpenses_date}</th>
            <th>{$i.externalexpenses_project}</th>
            <th>{$i.externalexpenses_address}</th>
            <th>{$i.externalexpenses_value}</th>
            <th>{$i.externalexpenses_purpose}</th>
        </tr>
    </thead>
    <tbody>
        {assign var='sum' value=0}
        {foreach item="row" from=$data}
            <tr>
                <td title="{$i.externalexpenses_date}">{if isset($row->date)}{$row->date->us_date()}{/if}</td>
                <td title="{$i.externalexpenses_project}">{if isset($row->project)}{$row->project}{/if}</td>
                <td title="{$i.externalexpenses_address}">{if isset($row->address)}{$row->address}{/if}</td>
                <td title="{$i.externalexpenses_value}" class="floatval">{if isset($row->value)}{float_to_usnumber($row->value)}{/if}</td>
                <td title="{$i.externalexpenses_purpose}">{if isset($row->purpose)}{$row->purpose}{/if}</td>
            </tr>
            {assign var='sum' value=$sum + $row->value}
        {/foreach}
        <tr style="font-weight:bold">
            <td title="{$i.basic_total}">{$i.basic_total}</td>
            <td title="{$i.basic_total}" colspan=2>&nbsp;</td>
            <td title="{$i.basic_total}" class="floatval">{float_to_usnumber($sum)}</td>
            <td title="{$i.basic_total}">&nbsp;</td>
        </tr>
        <tr>
            <td colspan=4>{$i.reporting_time_period}: {$filter_from} - {$filter_to}</td>
        </tr>
    </tbody>
</table>
</div>