<tfoot>
    <tr class="headstyle">
        {$maxf=2}
        {if $font_size_global>9}
            {$maxf=0}
        {/if}

        <td title="{$i.reporting_rep_tag_name}">{$i.basic_total}</td>
        {if $has_right_costs}
        <td  title="{$i.basic_total} {$i.reporting_rep_actual_costs}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_cost_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_fee_costs}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->planned_fees_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_total_is_hon_decr}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->hon_decr_costs_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_fee_internal}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fee_internal_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_cost_diff}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->cost_diff_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_cost_used}" style="white-space:nowrap; text-align:right; border-top: gray95;">n.a.</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_cost_internal_used}" style="white-space:nowrap; text-align:right; border-top: gray95;">n.a.</td>
        {/if}
        <td  title="{$i.basic_total} {$i.reporting_rep_completion_level}" style="white-space:nowrap; text-align:right; border-top: gray95;">n.a.</td>
        {if $has_right_costs}
        <td  title="{$i.basic_total} {$i.reporting_rep_weighted_completion_level}" style="white-space:nowrap; text-align:right; border-top: gray95;">n.a.</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_fee_internal_completed}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fee_internal_completed_sum}</td>
        {/if}
        {*<td  style="white-space:nowrap; text-align:right; border-top: gray95;"></td>
        <td  style="white-space:nowrap; text-align:right; border-top: gray95;"></td>*}
        <td  title="{$i.basic_total} {$i.reporting_rep_total_hours}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_times_hours_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_fee_hours}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->planned_fee_hours_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_hours_diff}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->hours_diff_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_hours_used}" style="white-space:nowrap; text-align:right; border-top: gray95;">n.a.</td>
        {if $has_right_costs}
        <td  title="{$i.basic_total} {$i.reporting_rep_costs_per_hour}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->costs_per_hour_sum}</td>
{*        <td  style="white-space:nowrap; text-align:right; border-top: gray95;"></td>
        <td  style="white-space:nowrap; text-align:right; border-top: gray95;"></td>*}
        {if is_numeric($fees_calc->sum_value)} {assign var="calc_diff" value={$fees_calc->sum_value}-{$data_item->fee_value_sum}} {else} {assign var="calc_diff" value=0}  {/if}
        {if is_numeric($fees_calc->sum_remited_after_tax)} {assign var="remitted_diff" value={$fees_calc->sum_remited_after_tax}-{$data_item->fee_value_remitted_sum}} {else} {assign var="remitted_diff" value=0}  {/if}
        {if is_numeric($fees_planned->sum_value)} {assign var="planned_diff" value={$fees_planned->sum_value}-{$data_item->planned_fee_value_sum}} {else} {assign var="planned_diff" value=0}  {/if}
        <td  title="{$i.basic_total} {$i.reporting_rep_fees_per_hour}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fees_per_hour_sum}</td>
        <td  title="{$i.basic_total} {$i.reporting_rep_fees_per_fee_hour}" style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fees_per_fee_hour_sum}</td>
        {if $show_values_from_feeadmin}
            <td  {if {$calc_diff} > 0} class="hoverhelp header" title="{isfloat maxf=$maxf value=$calc_diff} {$i.reporting_not_allocated_to_wp}" {/if} style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fee_value_sum}</td>
            <td  {if {$remitted_diff} > 0} class="hoverhelp header" title="{isfloat maxf=$maxf value=$remitted_diff} {$i.reporting_not_allocated_to_wp}" {/if} style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->fee_value_remitted_sum}</td>
            <td  {if {$planned_diff} > 0} class="hoverhelp header" title="{isfloat maxf=$maxf value=$planned_diff} {$i.reporting_not_allocated_to_wp}" {/if} style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->planned_fee_value_sum}</td>
        {/if}
        {/if}
    </tr>
</tfoot>
