<tr data-id="{$data_item->id}" title="[{$data_item->p_title}]">
    {$maxf=2}
    {if $font_size_global>9}
        {$maxf=0}
    {/if}
    {if $deduct_hon_decr_costs}
        {$title_fee_internal_completed=$i.reporting_rep_fee_internal_completed}
        {$title_fee_costs=$i.reporting_rep_fee_internal}
    {else}
        {$title_fee_internal_completed=$i.reporting_rep_fee_internal_completed_all}
        {$title_fee_costs=$i.reporting_rep_fee_costs}
    {/if}

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

    {if $has_right_controlpanel}
        <td class="noprint">{*
            *}<div class="dialog_make_btn16 show_only noprint" title="{$i.basic_controlpanel}" onclick="parent.started_work.open_controlpanel({$data_item->id}, '{prepare_string($data_item->project, false, 'FORJS')}', '{$date_main}', '{$date_prev}');"></div>{*
        *}</td>
    {/if}
    {if !$one_project_only || $show_project_details}
        <td title="{if $data_item->date_prev}{substr($data_item->date_prev, 0, 10)}{else}No Date{/if} - {if $data_item->date}{substr($data_item->date, 0, 10)}{else}No Date{/if} [PrID: {$data_item->id}]">{*
            *}{$data_item->project}{*
            *}{if $show_project_details && $data_item->is_add_to_indirect_costs} <div class="dialog_make_btn14 is_add2indirect_costs_2d" title="{$i.reporting_rep_is_add_to_indirect_costs}">IC</div>{/if}{*
            *}{if $show_project_details && $data_item->is_private_project} <div class="dialog_make_btn14 is_private_2d" title="{$i.reporting_rep_is_private_project}">P</div>{/if}{*
        *}</td>
    {/if}
    {if $show_project_details}
        <td title="{$i.reporting_rep_project_name} [PrID: {$data_item->id}]">{$data_item->project_name}</td>
        <td title="{$i.reporting_rep_project_number}">{$data_item->project_number}</td>
        <td title="{$i.reporting_rep_cost_centre_names}">{$data_item->cost_centre_names}</td>
        <td title="{$i.reporting_rep_project_manager_name} [{$i.reporting_rep_project_manager_abbreviation}: {$data_item->project_manager_abbreviation}]">{$data_item->project_manager_name}</td>
        <td title="{$i.reporting_rep_client_name}">{$data_item->client_name}</td>
        <td title="{$i.reporting_rep_office_in_charge_name}">{$data_item->office_in_charge_name}</td>
        <td title="{$i.reporting_rep_project_phase_name}">{$data_item->project_phase_name}</td>
        <td title="{$i.reporting_rep_start_date}">{$data_item->start_date->us_date()}</td>
        <td title="{$i.reporting_rep_end_date}">{$data_item->end_date->us_date()}</td>
        <td title="{$i.reporting_rep_project_category_name}">{$data_item->project_category_name}</td>
        <td title="{$i.reporting_rep_comment}">{if isset($data_item->purpose)}{mb_substr($data_item->purpose, 0, 255)}{/if}</td>
    {/if}
    {if $show_project_addi_details}
        {foreach item=field from=$addi_fields}
            {if $field->type != US_exmodel::T_BLOCK}
                <td>{*
                    *}{assign var='field_id' value=$field->field}{*
                    *}{addiview_report field=$field value=$data_item->$field_id item=$data_item}{*
                *}</td>
            {else}
                <td style="width:18mm; background:{if isset($field->color)}{$field->color}{else}lightcyan{/if};" title="{$field->field}"></td>
            {/if}
        {/foreach}
    {/if}

    {if $has_right_costs}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_fee_costs} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->planned_fees_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_fee_costs} [{$data_item->p_title}]" data-text="{$data_item->planned_fees}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->planned_fees}</td>

        {if $project_intern_extern}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_fee_costs_external} {$date_prev}; {$data_item->planned_fees_externallist_prev} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_external_prev}" style="white-space:nowrap; text-align:right; background-color: 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}</td>
            {/if}
            <td title="{$i.reporting_rep_fee_costs_external}; {$data_item->planned_fees_externallist} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_external}" 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}</td>
        {/if}

        {if $deduct_hon_decr_costs}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_total_is_hon_decr} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->hon_decr_costs_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->hon_decr_costs_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_total_is_hon_decr} [{$data_item->p_title}]" data-text="{$data_item->hon_decr_costs}" style="white-space:nowrap; text-align:right;" title="hon_decr_costs">{*
                *}{isfloat maxf=$maxf value=$data_item->hon_decr_costs}</td>
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_fee_internal} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_prev-$data_item->hon_decr_costs_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->planned_fees_prev-$data_item->hon_decr_costs_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_fee_internal} [{$data_item->p_title}]" data-text="{$data_item->planned_fees-$data_item->hon_decr_costs}" style="white-space:nowrap; text-align:right;" title="planned_fees-hon_decr_costs">{*
                *}{isfloat maxf=$maxf value=$data_item->planned_fees-$data_item->hon_decr_costs}</td>
        {/if}
    {/if}
    {if $has_right_costs && $show_budget}
        {if $data_item->planned_fees>0}
            <td title="{$i.reporting_rep_x_fee_part} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_costs/$data_item->planned_fees}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat value=($data_item->budget_plan_costs/$data_item->planned_fees)*100}%
            </td>
        {else}
            <td title="{$i.reporting_rep_x_fee_part} [{$data_item->p_title}]" data-text="" style="white-space:nowrap; text-align:right;">--</td>
        {/if}
        <td title="{$i.reporting_rep_budget_costs} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_costs}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->budget_plan_costs}{*
            *}<a href="{site_url url="start/open/projectadmin/index/`$xjxcookie`/view_budgetplan/`$data_item->id`"}" target="_blank" onclick="usComm.windowOpen(this.href); return false;" class="edit_btn"></a>
        </td>
        {if $project_intern_extern}
            <td title="{$i.reporting_rep_budget_costs} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_costs_external}" 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}</td>
        {/if}
    {/if}
    {if $has_right_costs && $show_cost_details}
        <td title="{$i.reporting_rep_x_time_costs} [{$data_item->p_title}]" data-text="{$data_item->total_times_cost}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
            *}{isfloat maxf=$maxf value=$data_item->total_times_cost}</td>
        <td title="{$i.reporting_rep_x_travel_costs} [{$data_item->p_title}]" data-text="{$data_item->total_travels_cost}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
            *}{isfloat maxf=$maxf value=$data_item->total_travels_cost}</td>
        <td title="{$i.reporting_rep_x_extra_costs} [{$data_item->p_title}]" data-text="{$data_item->total_extras_cost}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
            *}{isfloat maxf=$maxf value=$data_item->total_extras_cost}</td>
    {/if}
    {if $has_right_costs}
        <td title="{$i.reporting_rep_x_internal_expenses} [{$data_item->p_title}]" data-text="{$data_item->total_cost_internal}" style="white-space:nowrap; text-align:right;" title="total_cost_internal">{*
            *}{isfloat maxf=$maxf value=$data_item->total_cost_internal}</td>
    {/if}
    {if $has_right_costs && $show_extexp_details}
        <td title="{$i.reporting_rep_x_costs_charged} [{$data_item->p_title}]" data-text="{$data_item->total_externalexpenses_charged_cost}" style="white-space:nowrap; text-align:right;" title="total_externalexpenses_charged_cost">{*
            *}{isfloat maxf=$maxf value=$data_item->total_externalexpenses_charged_cost}</td>
        <td title="{$i.reporting_rep_x_costs} [{$data_item->p_title}]" data-text="{$data_item->total_externalexpenses_cost}" style="white-space:nowrap; text-align:right;" title="total_externalexpenses_cost">{*
            *}{isfloat maxf=$maxf value=$data_item->total_externalexpenses_cost}</td>
        <td title="{$i.reporting_rep_x_costs_planned} [{$data_item->p_title}]" data-text="{$data_item->total_externalexpenses_planned_cost}" style="white-space:nowrap; text-align:right;" title="total_externalexpenses_planned_cost">{*
            *}{isfloat maxf=$maxf value=$data_item->total_externalexpenses_planned_cost}</td>
        {if $show_categories}
            {$sum_categories=0}
            {foreach item=fee_category from=$fee_categories}
                {$category_id="total_externalexpenses_cost_`$fee_category->id`"}
                <td title="{$i.reporting_categories_costs} {$fee_category->name}" data-text="{$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 title="{$i.reporting_no_categories}" style="box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">&nbsp;</td>
            {/foreach}
            <td title="{$i.reporting_categories_costs} {$i.reporting_categories_sum}" data-text="{$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 title="{$i.reporting_categories_costs} {$i.reporting_categories_no_sum}" data-text="{$data_item->total_externalexpenses_cost-$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_categories}</td>
        {/if}
    {/if}
    {if $has_right_costs}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_actual_costs} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->total_cost_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->total_cost_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_actual_costs} [{$data_item->p_title}]" data-text="{$data_item->total_cost}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
            *}{isfloat maxf=$maxf value=$data_item->total_cost}</td>
    {/if}
    {if $has_right_costs && $show_fees_diff}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_cost_diff} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_prev-$data_item->total_cost_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->planned_fees_prev-$data_item->total_cost_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_cost_diff} [{$data_item->p_title}]" data-text="{$data_item->planned_fees-$data_item->total_cost}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->planned_fees-$data_item->total_cost}</td>
            {if $show_all_datespan}
            <td title="{$i.reporting_rep_cost_diff} II {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->planned_fees_prev-$data_item->hon_decr_costs_prev-$data_item->total_cost_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->planned_fees_prev-$data_item->hon_decr_costs_prev-$data_item->total_cost_prev}</td>
            {/if}
        <td title="{$i.reporting_rep_cost_diff} II [{$data_item->p_title}]" data-text="{$data_item->planned_fees-$data_item->hon_decr_costs-$data_item->total_cost}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->planned_fees-$data_item->hon_decr_costs-$data_item->total_cost}</td>
    {/if}
    {if $show_hours}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_fees_hours} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_plan_hours_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_plan_hours_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_fees_hours} [{$data_item->p_title}]" data-text="{$data_item->fees_plan_hours}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->fees_plan_hours}</td>
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_budget_hours} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_hours_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->budget_plan_hours_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_budget_hours} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_hours}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->budget_plan_hours}</td>
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_total_hours} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->total_times_hours_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->total_times_hours_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_total_hours} [{$data_item->p_title}]" data-text="{$data_item->total_times_hours}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->total_times_hours}</td>
        
        {if $show_calcexp}
            {* ---- Aufwand ---- ---- ---- ---- *}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_calcexp_hours_deducted} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_times_hours_prev}" style="white-space:nowrap; text-align:right;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_times_hours_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_x_calcexp_hours_deducted} [{$data_item->p_title}]" data-text="{$data_item->calcexp_times_hours}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->calcexp_times_hours}</td>
        {/if}
    {/if}
    
    {if $show_all_datespan}
        <td title="{$i.reporting_rep_completion_level} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->completion_level_prev}"  style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
            *}{isfloat value=$data_item->completion_level_prev*100}%</td>
    {/if}
    <td title="{$i.reporting_rep_completion_level} [{$data_item->p_title}]" data-text="{$data_item->completion_level}" style="white-space:nowrap; text-align:right;" title="completion_level">{*
        *}{isfloat value=$data_item->completion_level*100}%{*
        *}<a href="{site_url url="start/open/projectadmin/index/`$xjxcookie`/view_completion_level/`$data_item->id`"}" target="_blank" onclick="usComm.windowOpen(this.href); return false;" class="edit_btn"></a>
    </td>
    
    {if $has_right_costs}
        {if $show_all_datespan}
            <td title="{$title_fee_internal_completed} {$date_prev} [{$data_item->p_title}]" data-text="{$completed_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$completed_prev}</td>
            {/if}
        <td title="{$title_fee_internal_completed} [{$data_item->p_title}]" data-text="{$completed}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="completed">{*
            *}{isfloat maxf=$maxf value=$completed}</td>

        <td title="{if $deduct_hon_decr_costs}{$i.reporting_rep_fee_internal_completed_diff}{else}{$i.reporting_rep_fee_internal_completed_all_diff}{/if} {$date_prev} [{if $data_item->date_prev}{substr($data_item->date_prev, 0, 10)}{else}No Date{/if}] [{$data_item->p_title}]" 
            data-text="{$completed_diff_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; {if $completed_diff_prev<0}color:#CC0000;{else}color:darkslategray;{/if}">{*
            *}{isfloat maxf=$maxf value=$completed_diff_prev}</td>
        <td title="{if $deduct_hon_decr_costs}{$i.reporting_rep_fee_internal_completed_diff}{else}{$i.reporting_rep_fee_internal_completed_all_diff}{/if} {$date_main} [{if $data_item->date}{substr($data_item->date, 0, 10)}{else}No Date{/if}] [{$data_item->p_title}]" 
            data-text="{$completed_diff}" style="white-space:nowrap; text-align:right; background-color: gray95; {if $completed_diff<0}color:red;{/if};">{*
            *}{isfloat maxf=$maxf value=$completed_diff}</td>

        {if $prognosis_prev eq '--'}
            <td title="{$i.reporting_rep_x_prognosis_profit_loss} {$date_prev} [{$data_item->p_title}]" data-text="" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">--</td>
        {else}
            <td title="{$i.reporting_rep_x_prognosis_profit_loss} {$date_prev} [{$data_item->p_title}]" data-text="{$prognosis_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; {if $prognosis_prev<0}color:#CC0000;{else}color:darkslategray;{/if}">{*
                *}{isfloat maxf=$maxf value=$prognosis_prev}</td>
        {/if}
        {if $prognosis eq '--'}
            <td title="{$i.reporting_rep_x_prognosis_profit_loss} {$date_main} [{$data_item->p_title}]" data-text="" style="white-space:nowrap; text-align:right; background-color: gray95;">--</td>
        {else}
            <td title="{$i.reporting_rep_x_prognosis_profit_loss} {$date_main} [{$data_item->p_title}]" data-text="{$prognosis}" style="white-space:nowrap; text-align:right; background-color: gray95; {if $prognosis<0}color:red;{/if};" title="prognosis">{*
                *}{isfloat maxf=$maxf value=$prognosis}</td>
        {/if}
    {/if}

    {if $has_right_costs && ($show_budget || $show_budget_completed) && $show_fees_diff}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_cost_diff} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_costs_prev-$data_item->total_cost_prev}" {*
                *} style="white-space:nowrap; text-align:right; background-color: 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-$data_item->total_cost_prev}
            </td>
        {/if}
        <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_cost_diff} [{$data_item->p_title}]" data-text="{$data_item->budget_plan_costs-$data_item->total_cost}" style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">{*
            *}{isfloat maxf=$maxf value=$data_item->budget_plan_costs-$data_item->total_cost}
        </td>
    {/if}
    {if $has_right_costs && $show_budget_completed}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_fee_internal_completed} {$date_prev} [{$data_item->p_title}]" data-text="{$completed_budget_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">{*
                *}{isfloat maxf=$maxf value=$completed_budget_prev}</td>
            {/if}
        <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_fee_internal_completed} [{$data_item->p_title}]" data-text="{$completed_budget}" style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);" title="completed">{*
            *}{isfloat maxf=$maxf value=$completed_budget}</td>

        <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_fee_internal_completed_diff} {$date_prev} [{$data_item->p_title}]" data-text="{$completed_budget_diff_prev}"  {*
            *} style="white-space:nowrap; text-align:right; background-color: mintcream; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $completed_budget_diff_prev<0}color:#CC0000;{else}color:darkslategray;{/if}">{*
            *}{isfloat maxf=$maxf value=$completed_budget_diff_prev}</td>
        <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_fee_internal_completed_diff} {$date_main} [{$data_item->p_title}]" data-text="{$completed_budget_diff}" {*
            *} style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $completed_budget_diff<0}color:red;{/if};">{*
            *}{isfloat maxf=$maxf value=$completed_budget_diff}</td>

        {if $prognosis_budget_prev eq '--'}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_x_prognosis_profit_loss} {$date_prev} [{$data_item->p_title}]" data-text="" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">--</td>
        {else}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_x_prognosis_profit_loss} {$date_prev} [{$data_item->p_title}]" data-text="{$prognosis_budget_prev}" {*
                *} style="white-space:nowrap; text-align:right; background-color: mintcream; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $prognosis_budget_prev<0}color:#CC0000;{else}color:darkslategray;{/if}">{*
                *}{isfloat maxf=$maxf value=$prognosis_budget_prev}</td>
            {/if}
            {if $prognosis_budget eq '--'}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_x_prognosis_profit_loss} {$date_main} [{$data_item->p_title}]" data-text="" style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5);">--</td>
        {else}
            <td title="{$i.reporting_rep_budget_costs_s} {$i.reporting_rep_x_prognosis_profit_loss} {$date_main} [{$data_item->p_title}]" data-text="{$prognosis_budget}" {*
                *} style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0px 0px 4px 0px rgba(144, 66, 66, 0.5); {if $prognosis_budget<0}color:red;{/if};" title="prognosis_budget">{*
                *}{isfloat maxf=$maxf value=$prognosis_budget}</td>
            {/if}
        {/if}
    
    {if $has_right_costs}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_work_in_hand} {$date_prev} [{$data_item->p_title}]" data-text="{$work_in_hand_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$work_in_hand_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_work_in_hand} {$date_main} [{$data_item->p_title}]" data-text="{$work_in_hand}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="work_in_hand">{*
            *}{isfloat maxf=$maxf value=$work_in_hand}</td>
    {/if}

    {if $has_right_costs && $show_fees}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_x_sum_fee_invoiced} &lt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_x_sum_fee_invoiced} &lt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="fees_invoiced">{*
            *}{isfloat maxf=$maxf value=$data_item->fees_invoiced}</td>

        {if $show_feehist}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_invoiced} &gt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_after_prev}" style="white-space:nowrap; text-align:right; background-color: 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}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_invoiced} &gt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_after}" style="white-space:nowrap; text-align:right; background-color: 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}</td>
        {/if}

        {if $show_fees_finally_invoiced}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_finally_invoiced} < {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_finally_invoiced} < {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced}</td>
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_finally_invoiced_not} < {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced_not_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_not_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_finally_invoiced_not} < {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced_not}" style="white-space:nowrap; text-align:right; background-color: gray95;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_finally_invoiced_not}</td>
            {if $show_orgit}
                {if $show_all_datespan}
                    <td title="{$title_fee_internal_completed} - {$i.reporting_rep_x_sum_fee_finally_invoiced} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$completed_prev-$data_item->fees_invoiced_finally_invoiced_prev}</td>
                {/if}
                <td title="{$title_fee_internal_completed} - {$i.reporting_rep_x_sum_fee_finally_invoiced} {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_finally_invoiced}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="completed - fees_invoiced_finally_invoiced">{*
                    *}{isfloat maxf=$maxf value=$completed-$data_item->fees_invoiced_finally_invoiced}</td>
            {/if}
        {/if}

        {if $show_feehist}{* Honorar geplant *}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_planned} &lt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_planned_before_prev}" style="white-space:nowrap; text-align:right; background-color: 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}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_planned} &lt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_planned_before}" style="white-space:nowrap; text-align:right; background-color: gray95; box-shadow: inset 0 -1px 1px rgba(255,0,0,0.01);" title="fees_planned_before">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_planned_before}</td>
        {/if}

        {if $show_all_datespan}
            <td title="{$i.reporting_rep_x_sum_fee_planned} &gt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_planned_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_planned_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_x_sum_fee_planned} &gt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_planned}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="fees_planned">{*
            *}{isfloat maxf=$maxf value=$data_item->fees_planned}</td>
        
        {if $show_all_datespan}{* Honorar bezahlt *}
            <td title="{$i.reporting_rep_x_sum_fee_done} &lt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_remited_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_remited_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_x_sum_fee_done} &lt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_remited}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="fees_remited">{*
            *}{isfloat maxf=$maxf value=$data_item->fees_remited}</td>
        
        {if $show_feehist}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_done} &gt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_remited_after_prev}" style="white-space:nowrap; text-align:right; background-color: 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}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_done} &gt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_remited_after}" style="white-space:nowrap; text-align:right; background-color: 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}</td>

            {if $show_all_datespan}{* Honorar Abzug *}
                <td title="{$i.reporting_rep_x_sum_fee_deduction} &lt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_deduction_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->fees_deduction_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_deduction} &lt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_deduction}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="fees_deduction">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_deduction}</td>
        {/if}

        {if $show_all_datespan}{* Honorar offen *}
            <td title="{$i.reporting_rep_x_sum_fee_open} &lt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_prev-$data_item->fees_remited_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$data_item->fees_invoiced_prev-$data_item->fees_remited_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_x_sum_fee_open} &lt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced-$data_item->fees_remited}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="fees_invoiced-fees_remited">{*
            *}{isfloat maxf=$maxf value=$data_item->fees_invoiced-$data_item->fees_remited}</td>

        {if $show_feehist}
            {if $show_all_datespan}
                <td title="{$i.reporting_rep_x_sum_fee_open} &gt; {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_after_prev-$data_item->fees_remited_after_prev}" style="white-space:nowrap; text-align:right; background-color: 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-$data_item->fees_remited_after_prev}</td>
            {/if}
            <td title="{$i.reporting_rep_x_sum_fee_open} &gt; {$date_main} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced_after-$data_item->fees_remited_after}" style="white-space:nowrap; text-align:right; background-color: 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-$data_item->fees_remited_after}</td>
        {/if}

        {if $show_all_datespan}
            <td title="{$i.reporting_rep_work_in_progress} {$date_prev} [{$data_item->p_title}]" data-text="{$completed_prev-$data_item->fees_invoiced_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$completed_prev-$data_item->fees_invoiced_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_work_in_progress} {$date_main} [{$data_item->p_title}]" data-text="{$completed-$data_item->fees_invoiced}" style="white-space:nowrap; text-align:right; background-color: gray95;" title="completed-fees_invoiced">{*
            *}{isfloat maxf=$maxf value=$completed-$data_item->fees_invoiced}</td>

        {if $show_fees_to_remit}
            {if $show_all_datespan}
                {$a = $data_item->planned_fees_prev-$data_item->fees_invoiced_prev}
                <td title="{$i.reporting_rep_x_fee_value_not_remited} {$date_prev} [{$data_item->p_title}]" data-text="{$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-$data_item->fees_invoiced}
            <td title="{$i.reporting_rep_x_fee_value_not_remited} {$date_main} [{$data_item->p_title}]" data-text="{$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-$data_item->fees_invoiced_prev}
                <td title="{$i.reporting_rep_x_fee_value_to_remit} {$date_prev} [{$data_item->p_title}]" data-text="{$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-$data_item->fees_invoiced}
            <td title="{$i.reporting_rep_x_fee_value_to_remit} {$date_main} [{$data_item->p_title}]" data-text="{$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-$data_item->total_times_cost_prev}
            <td title="{$i.reporting_rep_times_costs_in_comparison} [{$data_item->p_title}]" data-text="{$a}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$a}</td>

            {$b = $data_item->total_travels_cost-$data_item->total_travels_cost_prev}
            <td title="{$i.reporting_rep_travels_costs_in_comparison} [{$data_item->p_title}]" data-text="{$b}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$b}</td>

            {$c = $data_item->total_extras_cost-$data_item->total_extras_cost_prev}
            <td title="{$i.reporting_rep_extras_costs_in_comparison} [{$data_item->p_title}]" data-text="{$c}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$c}</td>

            {$d = $data_item->total_externalexpenses_cost-$data_item->total_externalexpenses_cost_prev}            
            <td title="{$i.reporting_rep_externalexpenses_costs_in_comparison} [{$data_item->p_title}]" data-text="{$d}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{isfloat maxf=$maxf value=$d}</td>

            {$e = $data_item->total_cost-$data_item->total_cost_prev}
            <td title="{$i.reporting_rep_total_costs_in_comparison} [{$data_item->p_title}]" data-text="{$e}" style="white-space:nowrap; text-align:right; background-color: 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`"}
                <td title="{$i.reporting_categories_fees} {$fee_category->name} [{$data_item->p_title}]" data-text="{$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 title="{$i.reporting_no_categories} [{$data_item->p_title}]" style="box-shadow: inset 0px 0px 4px 0px rgba(144, 144, 66, 0.5);">&nbsp;</td>
            {/foreach}
            <td title="{$i.reporting_categories_fees} {$i.reporting_categories_sum} [{$data_item->p_title}]" data-text="{$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 title="{$i.reporting_categories_fees} {$i.reporting_categories_no_sum} [{$data_item->p_title}]" data-text="{$data_item->fees_invoiced-$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_categories}</td>
        {/if}
    {/if}
    {if $show_dates}
        <td title="{$i.reporting_rep_last_times} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right; background-color: rgba(176,120,199,0.1);">{$data_item->last_times->us_date()}</td>
        <td title="{$i.reporting_rep_last_completion_level} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right; background-color: rgba(176,120,199,0.1);">{$data_item->last_completion_level->us_date()}</td>
    {/if}
    {if $show_calcexp}
        <td title="{$i.reporting_rep_is_calcexp}" style="text-align: center;">{boolview value=$data_item->is_calc_from_expenses}</td>
        {if $show_project_details}
            <td title="{$i.reporting_rep_times_rate}">{if $data_item->is_calc_from_expenses && isset($data_item->project_category_rates->times_name)}{$data_item->project_category_rates->times_name}{/if}</td>
            <td title="{$i.reporting_rep_areas_rate}">{if $data_item->is_calc_from_expenses && isset($data_item->project_category_rates->area_name)}{$data_item->project_category_rates->area_name}{/if}</td>
            <td title="{$i.reporting_rep_travels_rate}">{if $data_item->is_calc_from_expenses && isset($data_item->project_category_rates->travel_name)}{$data_item->project_category_rates->travel_name}{/if}</td>
            <td title="{$i.reporting_rep_extras_rate}">{if $data_item->is_calc_from_expenses && isset($data_item->project_category_rates->extra_name)}{$data_item->project_category_rates->extra_name}{/if}</td>
        {/if}
        {* ---- Datum ---- ---- ---- ---- *}
        {if $show_all_datespan}
            <td title="{$i.reporting_calcexp_type_date} {$date_prev} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{$data_item->calcexp_lastdate_prev->us_date()}</td>
        {/if}
        <td title="{$i.reporting_calcexp_type_date} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right;">{$data_item->calcexp_lastdate->us_date()}</td>
        {if $show_all_datespan}
            <td title="{$i.reporting_calcexp_loc_date} {$date_prev} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{$data_item->calcexp_loc_lastdate_prev->us_date()}</td>
        {/if}
        <td title="{$i.reporting_calcexp_loc_date} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right;">{$data_item->calcexp_loc_lastdate->us_date()}</td>
        {if $show_all_datespan}
            <td title="{$i.reporting_fees_invoiced_lastdate} {$date_prev} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                *}{$data_item->fees_invoiced_lastdate_prev->us_date()}</td>
        {/if}
        <td title="{$i.reporting_fees_invoiced_lastdate} [{$data_item->p_title}]" style="white-space:nowrap; text-align:right;">{$data_item->fees_invoiced_lastdate->us_date()}</td>
        {if $has_right_costs}
            {* ---- Aufwand ---- ---- ---- ---- *}
            {if !$show_calcexp_woa}
                <td title="{$i.reporting_calcexp_typeproj_open} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_proj_curr}" style="white-space:nowrap; text-align:right; background-color: rgba(176,120,199,0.1);">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_open_proj_curr}</td>
            {else}
                <td title="{$i.reporting_calcexp_typewoa_open} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_woa_curr}" style="white-space:nowrap; text-align:right; background-color: rgba(176,120,199,0.1);">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_open_woa_curr}</td>
            {/if}
            {if !$show_calcexp_woa}
                {if $show_all_datespan}
                    <td title="{$i.reporting_calcexp_typeproj_open} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_proj_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->calcexp_open_proj_prev}</td>
                {/if}
                <td title="{$i.reporting_calcexp_typeproj_open} {$date_main} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_proj}" style="white-space:nowrap; text-align:right;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_open_proj}</td>
                {if $show_all_datespan}
                    <td title="{$i.reporting_calcexp_typeproj_done} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_done_proj_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->calcexp_done_proj_prev}</td>
                {/if}
                <td title="{$i.reporting_calcexp_typeproj_done} [{$data_item->p_title}]" data-text="{$data_item->calcexp_done_proj}" style="white-space:nowrap; text-align:right;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_done_proj}</td>
            {else}
                {if $show_all_datespan}
                    <td title="{$i.reporting_calcexp_typewoa_open} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_woa_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->calcexp_open_woa_prev}</td>
                {/if}
                <td title="{$i.reporting_calcexp_typewoa_open} {$date_main} [{$data_item->p_title}]" data-text="{$data_item->calcexp_open_woa}" style="white-space:nowrap; text-align:right;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_open_woa}</td>
                {if $show_all_datespan}
                    <td title="{$i.reporting_calcexp_typewoa_done} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_done_woa_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                        *}{isfloat maxf=$maxf value=$data_item->calcexp_done_woa_prev}</td>
                {/if}
                <td title="{$i.reporting_calcexp_typewoa_done} [{$data_item->p_title}]" data-text="{$data_item->calcexp_done_woa}" style="white-space:nowrap; text-align:right;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_done_woa}</td>
            {/if}
            {* ---- Honorarabr. ---- ---- ---- ---- *}
            {if $show_all_datespan}
                <td title="{$i.reporting_project_no_estim_offers} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->project_no_estim_offers_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->project_no_estim_offers_prev}</td>
            {/if}
            <td title="{$i.reporting_project_no_estim_offers} [{$data_item->p_title}]" data-text="{$data_item->project_no_estim_offers}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->project_no_estim_offers}</td>
            {if $show_all_datespan}
                <td title="{$i.reporting_calcexp_loc_done} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->calcexp_loc_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$data_item->calcexp_loc_prev}</td>
            {/if}
            <td title="{$i.reporting_calcexp_loc_done} [{$data_item->p_title}]" data-text="{$data_item->calcexp_loc}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->calcexp_loc}</td>
            {* ---- Gesamt ---- ---- ---- ---- *}
            {if $show_all_datespan}
                <td title="{$i.reporting_calcexp_done} {$date_prev} [{$data_item->p_title}]" data-text="{$calcexp_done_prev}" style="white-space:nowrap; text-align:right; background-color: mintcream; color:darkslategray;">{*
                    *}{isfloat maxf=$maxf value=$calcexp_done_prev}</td>
            {/if}
            <td title="{$i.reporting_calcexp_done}" data-text="{$calcexp_done}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$calcexp_done}</td>
        {/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_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);" title="{$i.reporting_rep_fee_costs} {$cost_centre->name} {$date_prev} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->$item_costs_id_prev}</td>
            {/if}
            {$item_costs_id="cs_planned_fees_`$cost_centre->id`"}
            {$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);" title="{$i.reporting_rep_fee_costs} {$cost_centre->name} [{$data_item->p_title}]">{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_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);" title="{$i.reporting_rep_actual_costs} {$cost_centre->name} {$date_prev} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->$item_costs_id_prev}</td>
            {/if}
            {$item_costs_id="cs_total_cost_`$cost_centre->id`"}
            {$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);" title="{$i.reporting_rep_actual_costs} {$cost_centre->name} [{$data_item->p_title}]">{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);" title="{$i.reporting_no_costcentres} [{$data_item->p_title}]">--</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);" title="{$i.reporting_rep_fee_costs} {$i.reporting_costcentres_no_sum} {$date_prev} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->planned_fees_prev-$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);" title="{$i.reporting_rep_fee_costs} {$i.reporting_costcentres_no_sum} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->planned_fees-$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);" title="{$i.reporting_rep_actual_costs} {$i.reporting_costcentres_no_sum} {$date_prev} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->total_cost_prev-$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);" title="{$i.reporting_rep_actual_costs} {$i.reporting_costcentres_no_sum} [{$data_item->p_title}]">{isfloat maxf=$maxf value=$data_item->total_cost-$sum_cs_total_cost}</td>
        {/if}
    {/if}
    {if $has_right_costs && $show_offers}
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_offers_offered} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->offers_offered_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->offers_offered_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_offers_offered} [{$data_item->p_title}]" data-text="{$data_item->offers_offered}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->offers_offered}</td>
        {if $show_all_datespan}
            <td title="{$i.reporting_rep_offers_ordered} {$date_prev} [{$data_item->p_title}]" data-text="{$data_item->offers_ordered_prev}" style="white-space:nowrap; text-align:right;">{*
                *}{isfloat maxf=$maxf value=$data_item->offers_ordered_prev}</td>
        {/if}
        <td title="{$i.reporting_rep_offers_ordered} [{$data_item->p_title}]" data-text="{$data_item->offers_ordered}" style="white-space:nowrap; text-align:right;">{*
            *}{isfloat maxf=$maxf value=$data_item->offers_ordered}</td>
    {/if}
</tr>
