{include file='reportsview/r_division.tpl'
    div_title="Umsatzrendite"
    div_top="Umsatz - Gesamtkosten"
    div_bottom="Umsatz"
    div_top_value="{isfloat value=$revenue} - {isfloat value=$sum_overall}"
    div_bottom_value="{isfloat value=$revenue}"
    div_total="{if $revenue}{isfloat value=( ($revenue - $sum_overall)/$revenue )*100}{else}-{/if} %"}
    
{include file='reportsview/r_doubledivision.tpl'
    div_title="Umsatzziel"
    div_top="Umsatz"
    div_bottom="Mitarbeiter"
    div_right_math="/"
    div_right="Jahre"
    div_top_value="{isfloat value=$revenue}"
    div_bottom_value="{isfloat value=$employees}"
    div_right_value="{isfloat value=$days/365.25}"
    div_total="{if $days && $employees}{isfloat value=( ($revenue/$employees) / ($days/365.25) )} {$currency_symbol}{else}-{/if}"}

{include file='reportsview/r_division.tpl'
    div_title="Arbeitskostenquote"
    div_top="Arbeitskosten"
    div_bottom="Gesamtkosten"
    div_top_value="{isfloat value=$sum_work_costs}"
    div_bottom_value="{isfloat value=$sum_overall}"
    div_total="{if $sum_overall}{isfloat value=( $sum_work_costs/$sum_overall )*100}{else}-{/if} %"}

{include file='reportsview/r_division.tpl'
    div_title="Projektstundenanteil"
    div_top="Projektstunden"
    div_bottom="Gesamtstunden"
    div_top_value="{isfloat value=$project_hours}"
    div_bottom_value="{isfloat value=$overall_hours}"
    div_total="{if $overall_hours}{isfloat value=( $project_hours/$overall_hours )*100}{else}-{/if} %"}

<pd4ml:page.break>
    
{include file='reportsview/r_division.tpl'
    div_title="Mittlerer Bürostundensatz"
    div_top="Gesamtkosten"
    div_bottom="Projektstunden"
    div_top_value="{isfloat value=$sum_overall}"
    div_bottom_value="{isfloat value=$project_hours}"
    div_total="{if $project_hours}{isfloat value=($sum_overall/$project_hours)} {$currency_symbol}{else}-{/if}"}

{include file='reportsview/r_division.tpl'
    div_title="Gemeinkostenfaktor"
    div_top="Gesamtkosten"
    div_bottom="Einzelkosten"
    div_top_value="{isfloat value=$sum_overall}"
    div_bottom_value="{isfloat value=$individual_costs}"
    div_total="{if $individual_costs}{isfloat value=($sum_overall/$individual_costs)}{else}-{/if}"}
    
<h3 style="clear:both;">Messgrößen (Ohne Zeitraumeinschränkung)</h3>

<table class="editablepop" style="width:500px; margin:15px;">
    <thead>
        <tr>
            <th>Messgrößen</th>
            <th>Summe der Messgrößen</th>
            <th>Stunden der Messgrößen</th>
            <th>Stunde/Messgrößen</th>
        </tr>
    </thead>
    <tbody>
    {foreach item="item" name="index" from=$measurements}
        <tr class="{if $smarty.foreach.index.iteration is even}even{/if}">
            <td title="Messgrößen">{*
                *}{$item->name}
            </td>
            <td title="Summe der Messgrößen" style="text-align:right;">{*
                *}{isfloat value=$item->mess_sum}
            </td>
            <td title="Stunden der Messgrößen" style="text-align:right;">{*
                *}{isfloat value=$item->mess_hours}
            </td>
            <td title="Stunde/Messgrößen" style="text-align:right;">{*
                *}{if $item->mess_sum}{isfloat value=$item->mess_hours/$item->mess_sum}{else}-{/if}
            </td>
        </tr>
    {/foreach}
    </tbody>
</table>
