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

        {include file='reportsview/portlet_started_work_row_calc.tpl' scope='parent'}

        {if $has_right_controlpanel}
            <td class="noprint"></td>
        {/if}
        <td {if $show_project_details}colspan="12"{/if}>{$i.basic_total}</td>
        
        {if $show_project_addi_details}
            <td title="{$i.basic_addi_fields}" colspan="{count($addi_fields)}"></td>
        {/if}
        
        {if $has_right_costs}
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->planned_fees_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->planned_fees_sum}</td>

            {if $project_intern_extern}
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{isfloat maxf=$maxf value=$data_item->planned_fees_external_prev_sum}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{isfloat maxf=$maxf value=$data_item->planned_fees_external_sum}</td>
            {/if}

            {if $deduct_hon_decr_costs}
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->hon_decr_costs_prev_sum}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right;" title="hon_decr_costs">{isfloat maxf=$maxf value=$data_item->hon_decr_costs_sum}</td>
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->planned_fees_prev_sum-$data_item->hon_decr_costs_prev_sum}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right;" title="planned_fees-hon_decr_costs">{isfloat maxf=$maxf value=$data_item->planned_fees_sum-$data_item->hon_decr_costs_sum}</td>
            {/if}
        {/if}
        {if $has_right_costs && $show_budget}
            <td style="white-space:nowrap; text-align:right;">n.a.</td>
            <td style="white-space:nowrap; text-align:right;">
                {isfloat maxf=$maxf value=$data_item->budget_plan_costs_sum}</a>
            </td>
            {if $project_intern_extern}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">
                    {isfloat maxf=$maxf value=$data_item->budget_plan_costs_external_sum}</a>
                </td>
            {/if}
        {/if}
        {if $has_right_costs && $show_cost_details}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_times_cost_sum}</td>
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_travels_cost_sum}</td>
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_extras_cost_sum}</td>
        {/if}
        {if $has_right_costs}
            <td style="white-space:nowrap; text-align:right;" title="total_cost_internal">{isfloat maxf=$maxf value=$data_item->total_cost_internal_sum}</td>
        {/if}
        {if $has_right_costs && $show_extexp_details}
            <td style="white-space:nowrap; text-align:right;" title="total_externalexpenses_charged_cost">{isfloat maxf=$maxf value=$data_item->total_externalexpenses_charged_cost_sum}</td>
            <td style="white-space:nowrap; text-align:right;" title="total_externalexpenses_cost">{isfloat maxf=$maxf value=$data_item->total_externalexpenses_cost_sum}</td>
            <td style="white-space:nowrap; text-align:right;" title="total_externalexpenses_planned_cost">{isfloat maxf=$maxf value=$data_item->total_externalexpenses_planned_cost_sum}</td>
            {if $show_categories}
                {$sum_categories=0}
                {foreach item=fee_category from=$fee_categories}
                    {$category_id="total_externalexpenses_cost_`$fee_category->id`_sum"}
                    <td data-sort-value="{$data_item->$category_id}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                        *}{isfloat maxf=$maxf value=$data_item->$category_id}</td>
                    {$sum_categories=$sum_categories+$data_item->$category_id}
                {foreachelse}
                    <td style="box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">&nbsp;</td>
                {/foreach}
                <td data-sort-value="{$sum_categories}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                    *}{isfloat maxf=$maxf value=$sum_categories}</td>
                <td data-sort-value="{$data_item->total_externalexpenses_cost_sum-$sum_categories}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                    *}{isfloat maxf=$maxf value=$data_item->total_externalexpenses_cost_sum-$sum_categories}</td>
            {/if}
        {/if}
        {if $has_right_costs}
            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->total_cost_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;">{isfloat maxf=$maxf value=$data_item->total_cost_sum}</td>
        {/if}
        {if $has_right_costs && $show_fees_diff}
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->planned_fees_prev_sum-$data_item->total_cost_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->planned_fees_sum-$data_item->total_cost_sum}</td>
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->planned_fees_prev_sum-$data_item->hon_decr_costs_prev_sum-$data_item->total_cost_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->planned_fees_sum-$data_item->hon_decr_costs_sum-$data_item->total_cost_sum}</td>
        {/if}
        {if $show_hours}
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->fees_plan_hours_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->fees_plan_hours_sum}</td>
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->budget_plan_hours_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->budget_plan_hours_sum}</td>
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->total_times_hours_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->total_times_hours_sum}</td>
        
            {if $show_calcexp}
                {* ---- Aufwand ---- ---- ---- ---- *}
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_times_hours_prev_sum}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_times_hours_sum}</td>
            {/if}
        {/if}
        
        {if $show_all_datespan}
            <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">n.a.</td>
        {/if}
        <td style="white-space:nowrap; text-align:right;" title="completion_level">n.a.</td>
        
        {if $has_right_costs}

            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$completed_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="completed">{isfloat maxf=$maxf value=$completed_sum}</td>

            <td style="white-space:nowrap; text-align:right; border-top: mintcream; {if $completed_diff_prev_sum<0}color:#CC0000;{else}color:darkslategray;{/if}">{isfloat maxf=$maxf value=$completed_diff_prev_sum}</td>
            <td style="white-space:nowrap; text-align:right; border-top: gray95; {if $completed_diff_sum<0}color:red;{/if};" title="completed_diff">{isfloat maxf=$maxf value=$completed_diff_sum}</td>

            {if $prognosis_prev_sum eq '--'}
                <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">--</td>
            {else}
                <td style="white-space:nowrap; text-align:right; border-top: mintcream; {if $prognosis_prev_sum<0}color:#CC0000;{else}color:darkslategray;{/if}">{isfloat maxf=$maxf value=$prognosis_prev_sum}</td>
            {/if}
            {if $prognosis_sum eq '--'}
                <td style="white-space:nowrap; text-align:right; border-top: gray95;">--</td>
            {else}
                <td style="white-space:nowrap; text-align:right; border-top: gray95; {if $prognosis_sum<0}color:red;{/if};" title="prognosis">{isfloat maxf=$maxf value=$prognosis_sum}</td>
            {/if}
        {/if}

        {if $has_right_costs && ($show_budget || $show_budget_completed) && $show_fees_diff}
            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">
                    {isfloat maxf=$maxf value=$data_item->budget_plan_costs_prev_sum-$data_item->total_cost_prev_sum}
                </td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">
                {isfloat maxf=$maxf value=$data_item->budget_plan_costs_sum-$data_item->total_cost_sum}
            </td>
        {/if}
        {if $has_right_costs && $show_budget_completed}
            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">{isfloat maxf=$maxf value=$completed_budget_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);" title="completed">{isfloat maxf=$maxf value=$completed_budget_sum}</td>

            <td style="white-space:nowrap; text-align:right; border-top: mintcream; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $completed_budget_diff_prev_sum<0}color:#CC0000;{else}color:darkslategray;{/if}">{isfloat maxf=$maxf value=$completed_budget_diff_prev_sum}</td>
            <td style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $completed_budget_diff_sum<0}color:red;{/if};" title="completed_budget_diff">{isfloat maxf=$maxf value=$completed_budget_diff_sum}</td>

            {if $prognosis_budget_prev_sum eq '--'}
                <td style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">--</td>
            {else}
                <td style="white-space:nowrap; text-align:right; border-top: mintcream; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $prognosis_budget_prev_sum<0}color:#CC0000;{else}color:darkslategray;{/if}">{isfloat maxf=$maxf value=$prognosis_budget_prev_sum}</td>
            {/if}
            {if $prognosis_budget_sum eq '--'}
                <td style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">--</td>
            {else}
                <td style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $prognosis_budget_sum<0}color:red;{/if};" title="prognosis_budget">{isfloat maxf=$maxf value=$prognosis_budget_sum}</td>
            {/if}
        {/if}

        {if $has_right_costs}
            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$work_in_hand_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="work_in_hand">{isfloat maxf=$maxf value=$work_in_hand_sum}</td>
        {/if}

        {if $has_right_costs && $show_fees}
            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->fees_invoiced_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="fees_invoiced">{isfloat maxf=$maxf value=$data_item->fees_invoiced_sum}</td>
            {if $show_feehist}
                {if $show_all_datespan}
                    <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);">{isfloat maxf=$maxf value=$data_item->fees_invoiced_after_prev_sum}</td>
                {/if}
                <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);" title="fees_invoiced_after">{isfloat maxf=$maxf value=$data_item->fees_invoiced_after_sum}</td>
            {/if}

            {if $show_fees_finally_invoiced}
                {if $show_all_datespan}
                    <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_prev_sum}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_prev_sum}</td>
                    {/if}
                <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_sum}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_sum}</td>
                {if $show_all_datespan}
                    <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_not_prev_sum}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_not_prev_sum}</td>
                    {/if}
                <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_not_sum}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_not_sum}</td>
                {if $show_orgit}
                    {if $show_all_datespan}
                        <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_prev_sum}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                            *}{isfloat maxf=$maxf value=$completed_prev_sum-$data_item->fees_invoiced_finally_invoiced_prev_sum}</td>
                        {/if}
                    <td data-sort-value="{$data_item->fees_invoiced_finally_invoiced_sum}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                            *}{isfloat maxf=$maxf value=$completed_sum-$data_item->fees_invoiced_finally_invoiced_sum}</td>
                {/if}
            {/if}

            {if $show_feehist}
                {if $show_all_datespan}
                    <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);">{isfloat maxf=$maxf value=$data_item->fees_planned_before_prev_sum}</td>
                {/if}
                <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);" title="fees_planned">{isfloat maxf=$maxf value=$data_item->fees_planned_before_sum}</td>
            {/if}

            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->fees_planned_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="fees_planned">{isfloat maxf=$maxf value=$data_item->fees_planned_sum}</td>

            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->fees_remited_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="fees_remited">{isfloat maxf=$maxf value=$data_item->fees_remited_sum}</td>

            {if $show_feehist}
                {if $show_all_datespan}
                    <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);">{isfloat maxf=$maxf value=$data_item->fees_remited_after_prev_sum}</td>
                {/if}
                <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);" title="fees_remited_after">{isfloat maxf=$maxf value=$data_item->fees_remited_after_sum}</td>

                {if $show_all_datespan}
                    <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->fees_deduction_prev_sum}</td>
                {/if}
                <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="fees_deduction">{isfloat maxf=$maxf value=$data_item->fees_deduction_sum}</td>
            {/if}

            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->fees_invoiced_prev_sum-$data_item->fees_remited_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="fees_invoiced-fees_remited">{isfloat maxf=$maxf value=$data_item->fees_invoiced_sum-$data_item->fees_remited_sum}</td>

            {if $show_feehist}
                {if $show_all_datespan}
                    <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);">{isfloat maxf=$maxf value=$data_item->fees_invoiced_after_prev_sum-$data_item->fees_remited_after_prev_sum}</td>
                {/if}
                <td  style="white-space:nowrap; text-align:right; border-top: gray95; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);" title="fees_invoiced_after-fees_remited_after">{isfloat maxf=$maxf value=$data_item->fees_invoiced_after_sum-$data_item->fees_remited_after_sum}</td>
            {/if}

            {if $show_all_datespan}
                <td  style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$completed_prev_sum-$data_item->fees_invoiced_prev_sum}</td>
            {/if}
            <td  style="white-space:nowrap; text-align:right; border-top: gray95;" title="completed-fees_invoiced">{isfloat maxf=$maxf value=$completed_sum-$data_item->fees_invoiced_sum}</td>

            {if $show_fees_to_remit}
                {if $show_all_datespan}
                    {$a = $data_item->planned_fees_prev_sum-$data_item->fees_invoiced_prev_sum}
                    <td data-sort-value="{$a}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$a}</td>
                {/if}
                {$a = $data_item->planned_fees_sum-$data_item->fees_invoiced_sum}
                <td data-sort-value="{$a}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                    *}{isfloat maxf=$maxf value=$a}</td>
                {if $show_all_datespan}
                    {$a = $data_item->total_cost_prev_sum-$data_item->fees_invoiced_prev_sum}
                    <td data-sort-value="{$a}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$a}</td>
                {/if}
                {$a = $data_item->total_cost_sum-$data_item->fees_invoiced_sum}
                <td data-sort-value="{$a}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                    *}{isfloat maxf=$maxf value=$a}</td>
            {/if}

            {if $show_actualcosts_comp}
                {$a = $data_item->total_times_cost_sum-$data_item->total_times_cost_prev_sum}
                <td data-sort-value="{$a}" style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$a}</td>

                {$b = $data_item->total_travels_cost_sum-$data_item->total_travels_cost_prev_sum}
                <td data-sort-value="{$b}" style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$b}</td>

                {$c = $data_item->total_extras_cost_sum-$data_item->total_extras_cost_prev_sum}
                <td data-sort-value="{$c}" style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$c}</td>

                {$d = $data_item->total_externalexpenses_cost_sum-$data_item->total_externalexpenses_cost_prev_sum}            
                <td data-sort-value="{$d}" style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$d}</td>

                {$e = $data_item->total_cost_sum-$data_item->total_cost_prev_sum}
                <td data-sort-value="{$e}" style="white-space:nowrap; text-align:right; border-top: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$e}</td>
            {/if}

            {if $show_categories}
                {$sum_categories=0}
                {foreach item=fee_category from=$fee_categories}
                    {$category_id="fees_invoiced_`$fee_category->id`_sum"}
                    <td data-sort-value="{$data_item->$category_id}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                        *}{isfloat maxf=$maxf value=$data_item->$category_id}</td>
                    {$sum_categories=$sum_categories+$data_item->$category_id}
                {foreachelse}
                    <td style="box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">&nbsp;</td>
                {/foreach}
                <td data-sort-value="{$sum_categories}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                    *}{isfloat maxf=$maxf value=$sum_categories}</td>
                <td data-sort-value="{$data_item->fees_invoiced_sum-$sum_categories}" style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_sum-$sum_categories}</td>
            {/if}
        {/if}
        {if $show_dates}
            <td style="text-align:right; background-color: rgba(176,120,199,0.1);">n.a.</td>
            <td style="text-align:right; background-color: rgba(176,120,199,0.1);">n.a.</td>
        {/if}
        {if $show_calcexp}
            <td style="text-align: center;" {if $show_project_details}colspan="5"{/if}>n.a.</td>
            {* ---- Datum ---- ---- ---- ---- *}
            {if $show_all_datespan}
                <td style="text-align:right; border-top: mintcream; color:darkslategray;">n.a.</td>
            {/if}
            <td style="text-align:right;">n.a.</td>
            {if $show_all_datespan}
                <td style="text-align:right; border-top: mintcream; color:darkslategray;">n.a.</td>
            {/if}
            <td style="text-align:right;">n.a.</td>
            {if $show_all_datespan}
                <td style="text-align:right; border-top: mintcream; color:darkslategray;">n.a.</td>
            {/if}
            <td style="text-align:right;">n.a.</td>
            {if $has_right_costs}
                {* ---- Aufwand ---- ---- ---- ---- *}
                {if !$show_calcexp_woa}
                    <td style="text-align:right; background-color: rgba(176,120,199,0.1);">{isfloat maxf=$maxf value=$data_item->calcexp_open_proj_curr_sum}</td>
                {else}
                    <td style="text-align:right; background-color: rgba(176,120,199,0.1);">{isfloat maxf=$maxf value=$data_item->calcexp_open_woa_curr_sum}</td>
                {/if}
                {if !$show_calcexp_woa}
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_open_proj_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_open_proj_sum}</td>
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_done_proj_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_done_proj_sum}</td>
                {else}
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_open_woa_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_open_woa_sum}</td>
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_done_woa_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_done_woa_sum}</td>
                {/if}
                {* ---- Honorarabr. ---- ---- ---- ---- *}
                {if $show_all_datespan}
                    <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->project_no_estim_offers_prev_sum}</td>
                {/if}
                <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->project_no_estim_offers_sum}</td>
                {if $show_all_datespan}
                    <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_loc_prev_sum}</td>
                {/if}
                <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_loc_sum}</td>
                {* ---- Gesamt ---- ---- ---- ---- *}
                {if !$show_calcexp_woa}
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_done_proj_prev_sum + $data_item->calcexp_loc_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_done_proj_sum + $data_item->calcexp_loc_sum}</td>
                {else}
                    {if $show_all_datespan}
                        <td style="text-align:right; border-top: mintcream; color:darkslategray;">{isfloat maxf=$maxf value=$data_item->calcexp_done_woa_prev_sum + $data_item->calcexp_loc_prev_sum}</td>
                    {/if}
                    <td style="text-align:right;">{isfloat maxf=$maxf value=$data_item->calcexp_done_woa_sum + $data_item->calcexp_loc_sum}</td>
                {/if}
            {/if}
        {/if}
        {if $has_right_costs && $show_costcentres}
            {$sum_cs_fee_costs = 0}{$sum_cs_fee_costs_prev = 0}{$sum_cs_total_cost = 0}{$sum_cs_total_cost_prev = 0}
            {foreach item=cost_centre from=$cost_centres_list}
                {if $show_all_datespan}
                    {$item_costs_id_prev="cs_planned_fees_`$cost_centre->id`_prev_sum"}
                    {$sum_cs_fee_costs_prev = $sum_cs_fee_costs_prev + $data_item->$item_costs_id_prev}
                    <td style="white-space:nowrap; text-align:right; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->$item_costs_id_prev}</td>
                {/if}
                {$item_costs_id="cs_planned_fees_`$cost_centre->id`_sum"}
                {$sum_cs_fee_costs = $sum_cs_fee_costs + $data_item->$item_costs_id}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->$item_costs_id}</td>
                {if $show_all_datespan}
                    {$item_costs_id_prev="cs_total_cost_`$cost_centre->id`_prev_sum"}
                    {$sum_cs_total_cost_prev = $sum_cs_total_cost_prev + $data_item->$item_costs_id_prev}
                    <td style="white-space:nowrap; text-align:right; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->$item_costs_id_prev}</td>
                {/if}
                {$item_costs_id="cs_total_cost_`$cost_centre->id`_sum"}
                {$sum_cs_total_cost = $sum_cs_total_cost + $data_item->$item_costs_id}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->$item_costs_id}</td>
            {foreachelse}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">&nbsp;</td>
            {/foreach}
            {if $cost_centre@total>=1}
                {* Not in assigned cost centres *}
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->planned_fees_prev_sum-$sum_cs_fee_costs_prev}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->planned_fees_sum-$sum_cs_fee_costs}</td>
                {if $show_all_datespan}
                    <td style="white-space:nowrap; text-align:right; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->total_cost_prev_sum-$sum_cs_total_cost_prev}</td>
                {/if}
                <td style="white-space:nowrap; text-align:right; box-shadow: inset 0px 0px 4px 0px rgba(255, 170, 100, 0.5);">{isfloat maxf=$maxf value=$data_item->total_cost_sum-$sum_cs_total_cost}</td>
            {/if}
        {/if}
        {if $has_right_costs && $show_offers}
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->offers_offered_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->offers_offered_sum}</td>
            {if $show_all_datespan}
                <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->offers_ordered_prev_sum}</td>
            {/if}
            <td style="white-space:nowrap; text-align:right;">{isfloat maxf=$maxf value=$data_item->offers_ordered_sum}</td>
        {/if}
    </tr>
</tfoot>
