<div class="ui-report-header ui-widget-header ui-corner-all noprint" style="pd4ml-display:none;">
    <a class="dialog_make_text_btn ui-corner-all" style="pd4ml-display:none;"
       onclick="evaluation.open_file(this, 'pdf', '{site_url url="reportportlet/`$reports_xjxcookie`/g_project_overview/result_pdf/`$g_project_overview_file_id`"}', 'XNOX')">
        <span class="dialog_make_btn16 pdf"></span>
        PDF
    </a>

    {portlet file='report_designs_list'}

    {if $filter_project_manager}<span style="margin-left:40px; display:inline-block;" class="warningsmall ui-corner-all">{$i.reporting_only_project_manager}</span>{/if}
    {if $filter_division_manager}<span style="margin-left:40px; display:inline-block;" class="warningsmall ui-corner-all">{$i.reporting_only_division_manager}</span>{/if}
</div>

{if isset($data)}
    <div style="width:100%; position: relative;">
        {if $data->photo_file_uri neq ''}
            <style scoped>
                div.photo-file {
                    position: absolute;
                    right:2px;
                    top:2px;
                }
                @media screen {
                    div.photo-file img {
                        max-height: 74px;
                        max-width: 120px;
                    }
                }
                @media screen and (min-width : 800px)  {
                    div.photo-file img {
                        max-height: 10vh;
                        max-width: 15vw;
                    }
                }
                @media pdf {
                    div.photo-file img {
                        height: 74px;
                    }
                }
            </style>
            <div class="ui-widget-header ui-corner-all photo-file">
                <img src="{$data->image64}" style="" />
            </div>
        {/if}
        <table style="width: 100%">
            <tr>
                <th style="text-align:left;" class="ui-widget-header"><h2>{$i.reporting_rep_project}: {$data->project}</h2></th>
            </tr>
        </table>

        {include file='Reports/basics/_filterinfo.tpl' filterinfos=$filterinfo valid_filterinfo=TRUE show_always=TRUE}

        <table style="width: 100%; margin-top:10px; border: 0 none;">
            <tr>
                <th style="width: 30%; text-align:left">{$i.reporting_rep_client_name}</th>
                <th style="width: 30%; text-align:left">{$i.reporting_rep_project_manager_name}</th>
                <th style="width: 30%; text-align:left">{$i.reporting_rep_start}</th>
            </tr>
            <tr>
                <td>{$data->client}</td>
                <td>{$data->project_manager}</td>
                <td>{$data->start_date->us_date()}</td>
            </tr>
            <tr>
                <th>{$i.reporting_rep_cost_centre_names}</th>
                <th style="text-align:left">{$i.reporting_rep_project_phase}</th>
                <th style="text-align:left">{$i.reporting_rep_end}</th>
            </tr>
            <tr>
                <td>{$data->cost_centres}</td>
                <td>{$data->project_phase}</td>
                <td>{$data->end_date->us_date()}</td>
            </tr>
        </table>

        <table style="width: 100%; border-collapse: collapse; border: 0 none;">
            <tr>
                <td style="width: 30%; vertical-align: top; padding-right: 20px; border: 0 none;">
                    <h3 style="width:100%; margin-top: 20px;" class="ui-widget-header">{$i.reporting_rep_x_project_costs}</h3>
                    <table style="width:100%;">
                        <tr><td>{$i.reporting_rep_x_time_costs}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_costs->time_costs)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_travel_costs}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_costs->travel_costs)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_extra_costs}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_costs->extra_costs)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_internal_expenses}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_costs->internal_costs)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_costs}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_costs->external_costs)}</td></tr>
                    </table>

                    <h3 style="width:100%; margin-top: 20px;" class="ui-widget-header">{$i.reporting_rep_x_project_hours}</h3>
                    <table style="width:100%;">
                        <tr><td>{$i.reporting_rep_fee_hours}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_hours->target)}</td></tr>
                        <tr><td>{$i.reporting_rep_total_hours}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_hours->actual)}</td></tr>
                        <tr><td>{$i.reporting_rep_diff}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->project_hours->diff)}</td></tr>
                    </table>
                </td>
                <td style="width: 30%; vertical-align: top; padding-right: 20px; border: 0 none;">
                    <h3 style="width:100%; margin-top: 20px;" class="ui-widget-header">{$i.reporting_rep_fees}</h3>
                    <table style="width:100%;">
                        <tr>
                            <td {if $linethrough}class="linethrough"{/if}>{$i.reporting_rep_x_sum_target_fee}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->fees->target)}</td>
                        </tr>
                        <tr>
                            <td {if $linethrough}class="linethrough"{/if}>{$i.reporting_rep_x_sum_target_fee_internal}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->fees->target_internal)}</td>
                        </tr>
                        <tr>
                            <td>{$i.reporting_rep_x_sum_fee_value_remited2}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->fees->invoiced)}</td>
                        </tr>
                        <tr>
                            <td {if $linethrough}class="linethrough"{/if}>{$i.reporting_rep_x_diff_target_fee}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->fees->diff_target)}</td>
                        </tr>
                        <tr>
                            <td {if $linethrough}class="linethrough"{/if}>{$i.reporting_rep_x_diff_target_fee_internal}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->fees->diff_target_internal)}</td>
                        </tr>
                        <tr>
                            <td>{$i.reporting_rep_x_project_costs}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->fees->project_costs)}</td>
                        </tr>
                        <tr>
                            <td>{$i.reporting_rep_x_diff_fee_remited_proj_costs}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->fees->diff_invoiced_project_costs)}</td>
                        </tr>
                        <tr>
                            <td {if $linethrough}class="linethrough"{/if}>{$i.reporting_rep_x_diff_target_fee_int_proj_costs}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->fees->diff_target_internal_project_costs)}</td>
                        </tr>
                        <tr>
                            <td>{$i.reporting_rep_x_sum_fee_already_done}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->fees->remited)}</td>
                        </tr>
                    </table>
                </td>
                <td style="width: 30%; vertical-align: top; padding-right: 20px; border: 0 none;">
                    <h3 style="width:100%; margin-top: 20px;" class="ui-widget-header">{$i.reporting_rep_x_planned_fees_costs}</h3>
                    <table style="width:100%;">
                        <tr><td>{$i.reporting_rep_x_planned_fee}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->planned_fees_costs->fees)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_planned_costs}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->planned_fees_costs->costs)}</td></tr>
                        <tr><td>{$i.reporting_rep_x_planned_costs_hon_decr}</td><td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->planned_fees_costs->costs_hon_decr)}</td></tr>
                    </table>

                    <h3 style="width:100%; margin-top: 20px;" class="ui-widget-header">{$i.reporting_rep_x_forecast}</h3>
                    <table style="width:100%;">
                        <tr>
                            <td>{$i.reporting_rep_x_sum_project_comp}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->forecast->compl)}%</td>
                        </tr>
                        <tr>
                            <td class="hoverhelp" title="{$i.reporting_rep_x_sum_target_fee_internal} * ({$i.reporting_rep_x_sum_project_comp} / 100)">{$i.reporting_rep_x_work_complete_fee}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->forecast->work_complete_fee)}</td>
                        </tr>
                        <tr>
                            <td class="hoverhelp" title="{$i.reporting_rep_x_project_costs} * (100 / {$i.reporting_rep_x_sum_project_comp})">{$i.reporting_rep_x_cost_prognosis}</td>
                            <td style="text-align:right; line-height:1.5em; vertical-align:top">{isfloat value=floatval($data->forecast->cost_prognosis)}</td>
                        </tr>
                        <tr>
                            <td {if $linethrough}class="linethrough"{else}class="hoverhelp"{/if} title="{$i.reporting_rep_x_sum_target_fee_internal} - {$i.reporting_rep_x_cost_prognosis}">{$i.reporting_rep_x_prognosis_profit_loss}</td>
                            <td {if $linethrough}class="linethrough"{/if} style="text-align:right; line-height:1.5em; vertical-align:top;">{isfloat value=floatval($data->forecast->prognosis_profit_loss)}</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>

        {if $portlet_psp_show_times}
            <table class="editablepop" style="width: 100%;  margin-top:10px;">
                <thead>
                    <tr><th style="text-align:left;" colspan="7" class="ui-widget-header">{$i.reporting_rep_x_time_costs}</th></tr>
                    <tr>
                        <th>{$i.reporting_staff}</th>
                        <th>{$i.reporting_rep_total_hours}</th>
                            {if $user_has_mgmtplus_right}
                            <th>{$i.reporting_staff_hourly_wage}</th>
                            <th>{$i.reporting_total_no_multipliers}</th>
                            <th>{$i.reporting_fee_multipliers_percntg}</th>
                            <th>{$i.reporting_fee_multipliers_value}</th>
                            <th>{$i.reporting_rep_x_internal_expenses}</th>
                            {/if}
                    </tr>
                </thead>
                <tbody>

                    {foreach item="item" name="index" from=$stdc_times_detail}
                        {$ist_times_sum = $ist_times_sum + $item->number_sum}
                        {$bruttostdlohn_sum = $bruttostdlohn_sum + $item->total_no_multipliers}
                        {$fee_multipliers_value = $fee_multipliers_value + $item->fee_multipliers_value}
                        {$times_kosten_sum = $times_kosten_sum + $item->total}
                    {/foreach}  

                    {foreach item="item" name="index" from=$stdc_times_detail}
                        <tr class="{if $smarty.foreach.index.iteration is even}even{/if}">
                            <td>{$item->staff_name}</td>
                            <td style="text-align:right;">{isfloat value=$item->number_sum}</td>
                            {if $user_has_mgmtplus_right}
                                <td style="text-align:right;">{isfloat value=$item->gross_hourly_wage}</td>
                                <td style="text-align:right;">{isfloat value=$item->total_no_multipliers}</td>
                                <td style="text-align:right;">{isfloat value=$item->fee_multipliers_percntg} %</td>
                                <td style="text-align:right;">{isfloat value=$item->fee_multipliers_value}</td>
                                <td style="text-align:right;">{isfloat value=$item->total}</td>
                            {/if}
                        </tr>
                    {/foreach}
                </tbody>

                <tfoot>
                    <tr>
                        <td>{$i.basic_total}</td>
                        <td style="text-align:right;">{isfloat value=$ist_times_sum}</td>
                        {if $user_has_mgmtplus_right}
                            <td></td>
                            <td style="text-align:right;">{isfloat value=$bruttostdlohn_sum}</td>
                            <td></td>
                            <td style="text-align:right;">{isfloat value=$fee_multipliers_value}</td>
                            <td style="text-align:right;">{isfloat value=$times_kosten_sum}</td>
                        {/if}
                    </tr>
                </tfoot>
            </table>
        {/if}

        {if $portlet_psp_show_travels}
            {include file="G_project_overview/view_gov_show_travels.tpl"}
        {/if}

        {if $portlet_psp_show_extras}
            {include file="G_project_overview/view_gov_show_extras.tpl"}
        {/if}

        {if $portlet_psp_show_costs}
            {include file="G_project_overview/view_gov_show_costs.tpl"}
        {/if}

        {if $portlet_psp_show_costs_planned}
            {include file="G_project_overview/view_gov_show_costs_planned.tpl"}
        {/if}

        {if $portlet_psp_show_fees}
            {include file="G_project_overview/view_gov_show_fees.tpl"}
        {/if}

        {if $portlet_psp_show_fees_planned}
            {include file="G_project_overview/view_gov_show_fees_planned.tpl"}
        {/if}

        {if $portlet_psp_show_offers}
            {include file="G_project_overview/view_gov_show_offers.tpl"}
        {/if}

        {if $portlet_psp_show_project_addi_fields}
            {include file="G_project_overview/view_gov_project_addi_fields.tpl"}
        {/if}

        {if $portlet_psp_show_project_client_detail}
            {include file="G_project_overview/view_gov_show_project_client_detail.tpl"}
        {/if}

        {if $portlet_psp_show_project_participants}
            {include file="G_project_overview/view_gov_project_participants.tpl"}
        {/if}

    </div>
{else}
    <h4>{$i.basic_no_result1}</h4>
{/if}