<div style="margin-bottom:5px" class="printonly">{$i.portlet_overdue_planned_fees}</div>
<div style="max-height:{$max_height}px; overflow:auto;">
<table class="dashed">
        <colgroup>
            <col style="width: 20mm;" />
            <col />
            <col />
            <col />
            <col style="width: 20mm;" />
        </colgroup>
    <thead>
        <tr>
            <th style="min-width:65px">{$i.externalexpenses_date}</th>
            <th>{$i.fees_project}</th>
            <th>{$i.fees_address_name}</th>
            <th>{$i.fees_cost_centre_name}</th>
            <th>{$i.externalexpenses_value}</th>        
        </tr>
    </thead>
    <tbody>
        {assign var='sum' value=0}
        {foreach item="row" from=$data}
            <tr>
                <td title="{$i.externalexpenses_date}">{if isset($row->fee_date)}{$row->fee_date->us_date()}{/if}</td>
                <td title="{$i.fees_project}">{if isset($row->project)}{$row->project}{/if}</td>
                <td title="{$i.fees_address_name}">{if isset($row->address_name)}{$row->address_name}{/if}</td>
                <td title="{$i.fees_cost_centre_name}">{if isset($row->cost_centre_name)}{$row->cost_centre_name}{/if}</td>
                <td title="{$i.externalexpenses_value}" class="floatval">{if isset($row->value)}{float_to_usnumber($row->value)}{/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=3>&nbsp;</td>
            <td title="{$i.basic_total}" class="floatval">{float_to_usnumber($sum)}</td>
        </tr>
        <tr>
            <td colspan=5>{$i.basic_to}: {$filter_to}</td>
        </tr>
    </tbody>
</table>
</div>        