{if !ConfigHelper::checkPrivilege('hide_summaries')}
<table class="lmsbox" id="lms-ui-welcome-box-customers">
    <colgroup>
        <col style="width: 50%;">
        <col style="width: 50%;">
    </colgroup>
    <thead>
        <tr>
            <td colspan="2" class="text-center bold nobr">
                <i class="lms-ui-icon-customer"></i> {trans("Customers")}
            </td>
        </tr>
    </thead>
    <tbody>
		{foreach $_CSTATUSES as $statusidx => $status}
        <tr>
            <td class="text-right bold">
                <a href="?m=customerlist&s[]={$statusidx}&s[]=72">{$status.summarylabel}</a>
            </td>
            <td>
                {$alias = $status.alias}
                {$customerstats.$alias}
                {if $statusidx == $smarty.const.CSTATUS_DEBT_COLLECTION}
                    ({trans("amount")} {moneyf($customerstats.debtcollectionvalue)})
                {/if}
            </td>
        </tr>
        {/foreach}
        <tr>
            <td class="text-right bold">
                <a href="?m=customerlist&s[]=0">{trans("Total:")}</a>
            </td>
            <td class="nobr">
                {$customerstats.total}
            </td>
        </tr>
        {if ConfigHelper::checkConfig('privileges.superuser') || !ConfigHelper::checkConfig('privileges.hide_finances')}
        <tr>
            <td class="text-right bold">
                <a href="?m=customerlist&s[]=52&s[]=72">{trans("Total Dues:")}</a>
            </td>
            <td>
                {$customerstats.debt} ({trans("amount")} {moneyf($customerstats.debtvalue)})
            </td>
        </tr>
        {/if}
        <tr>
            <td class="text-right bold">
                <a href="?m=documentlist&amp;s=0">{trans("Documents waiting for approval")}:</a>
            </td>
            <td>
                {$documentsnotapproved}
            </td>
        </tr>
	{if $customerschanges}
        <tr>
            <td class="text-right bold">
                <a href="?m=userpanel&module=info&f=changes">{trans("Changes of customers waiting for approval:")}</a>
            </td>
            <td>
                {$customerschanges}
            </td>
        </tr>
	{/if}
    </tbody>
</table>
{/if}
