<table class="dashed">
    <tr>
        <th class="floatval">{$i.basic_year}</th>
        <th class="floatval">{$i.reporting_hours} {$i.reporting_rep_x_total}</th>
        <th class="floatval">{$i.reporting_hours} {$i.reporting_not_productive}</th>
        <th class="floatval">{$i.reporting_social_caused}</th>
        <th class="floatval">{$i.reporting_company_caused}</th>
        <th class="floatval">{$i.reporting_hours} {$i.reporting_productive}</th>
        <th class="floatval">{$i.reporting_factor_prod_noprod}</th>
        <th class="floatval">{$i.reporting_factor_prod_total}</th>
    </tr>
{foreach item="prod" from=$productivities}
    {if $prod->total<>0}
        <tr>
            <td title="{$i.basic_year}">{$prod->years}</td>
            <td title="{$i.reporting_hours} {$i.reporting_rep_x_total}" class="floatval">{float_to_usnumber($prod->total,2)}</td>
            <td title="{$i.reporting_hours} {$i.reporting_not_productive}" class="floatval">{float_to_usnumber($prod->total-$prod->prod_hours,2)}</td>
            <td title="{$i.reporting_social_caused}" class="floatval">{float_to_usnumber($prod->social_hours,2)}</td>
            <td title="{$i.reporting_company_caused}" class="floatval">{float_to_usnumber($prod->total-$prod->prod_hours-$prod->social_hours,2)}</td>
            <td title="{$i.reporting_hours} {$i.reporting_productive}" class="floatval">{float_to_usnumber($prod->prod_hours,2)}</td>
            <td title="{$i.reporting_factor_prod_noprod}" class="floatval">{if $prod->prod_hours<>0}{float_to_usnumber(($prod->total-$prod->prod_hours)/$prod->prod_hours*100,2)}&nbsp;%{else}-{/if}</td>
            <td title="{$i.reporting_factor_prod_total}" class="floatval">{if $prod->total<>0}{float_to_usnumber($prod->prod_hours/$prod->total*100,2)}&nbsp;%{else}-{/if}</td>
        </tr>
    {/if}
{/foreach}
    {if $date_from != ''}
        <tr>
            <td colspan=8>{$i.reporting_time_period}: {$date_from} - {$date_to}</td>
        </tr>  
    {/if}
</table>