<table class="dashed">
    <tr>
        <th class="floatval"></th>
        <th class="floatval">{$i.fees_address_name}</th>
        <th class="floatval">{$i.fees_sum_value}</th>
        <th class="floatval">{$i.basic_percentage}</th>
    </tr>
{foreach name="loop" item="ranking" from=$customer_ranking}
    <tr>
        <th class="floatval">{$smarty.foreach.loop.iteration}</th>
        <td>{$ranking->address_name_long}</td>
        <td class="floatval">{float_to_usnumber($ranking->fee_sum,2)}</td>
        <td class="floatval">{if $fee_sum<>0}{float_to_usnumber($ranking->fee_sum/$fee_sum*100,2)}&nbsp;%{else}-{/if}</td>
        {$sum = $sum + $ranking->fee_sum}
    </tr>
{/foreach}
    {if $date_from != ''}
        <tr>
            <td colspan=4>{$i.reporting_time_period}: {$date_from} - {$date_to}</td>
        </tr>
      
    {/if}
    
    <tr>
        <th>{$i.basic_total}:</th>
        <td></td>
        <td class="floatval">{float_to_usnumber($sum)}</td>
        <td></td>
    </tr>
</table>