<table width="100%" cellspacing="0" cellpadding="8" border="0">
    <tr class="hp_table_subtitle">
        <td class="border_top">{$lang.index.stat_all_payments}</td>
	<td class="border_top" align="right">{$payment_stat.total_payment}&nbsp;{$form.costunits}</td>
    </tr>
    <tr class="odd">
	<td class="border_top">{$lang.index.membership_payments}</td>
	<td class="border_top" align="right">{$payment_stat.total_membership}&nbsp;{$form.costunits}</td>
    </tr>
    <tr class="even">
	<td class="border_top">{$lang.index.services_payments}</td>
	<td class="border_top" align="right">{$payment_stat.total_services}&nbsp;{$form.costunits}</td>
    </tr>
    <tr class="odd">
	<td class="border_top">{$lang.index.users_accounts}</td>
	<td class="border_top" align="right">{$payment_stat.users_accounts}&nbsp;{$form.costunits}</td>
    </tr>
    {if $payment_stat.services.sms_payment > 0}
    <tr class="even">
	<td class="border_top">{$lang.index.sms_payments}:</td>
	<td class="border_top" align="right">{$payment_stat.services.sms_payment}&nbsp;{$form.costunits}</td>
    </tr>
    {/if}
    <tr class="{if $payment_stat.services.sms_payment > 0}odd{else}even{/if}">
	<td class="border_top">{$lang.index.most_profitable_service}</td>
	<td class="border_top" align="right">{$payment_stat.profitable_services}</td>
    </tr>
    <tr class="{if $payment_stat.services.sms_payment > 0}even{else}odd{/if}">
	<td class="border_top">{$lang.index.most_profitable_membership}</td>
	<td class="border_top" align="right">{$payment_stat.profitable_membership}</td>
    </tr>
    <tr class="{if $payment_stat.services.sms_payment > 0}odd{else}even{/if}">
	<td class="border_top">
            {$lang.index.total_payments_services}<br>
            <select name="service" onchange="getPaymentServiceStats();" style="margin:10px 0;">
                <option  value="paysys" selected="selected"> {$lang.index.please_select}  </option>
                {foreach from=$payment_stat.services key=service item=_item}
                <option value="{$service}" {if $select_payments eq $service} selected {/if}> {$lang.index.payments.$service} </option>
                {/foreach}
                <option value="{$key_membership}" {if $select_payments eq $key_membership} selected {/if}> {$lang.index.payments.$key_membership} </option>
            </select>
        </td>
        <td class="border_top" align="right">
            <div id="payment_service_stats" style="display: inline;"></div>
	</td>
    </tr>
</table>
<script type="text/javascript">
{literal}
$(document).ready(function() {
    getPaymentServiceStats();
});    
{/literal}
</script>