{* Affiliate program settings and info *} {if $safemode}
{$smarty.const.ADMIN_SAFEMODE_WARNING}
{/if}
{* recruited customers table *} {$smarty.const.STRING_AFFILIATE_CUSTOMERS}

{$smarty.const.STRING_AFFILIATE_CUSTOMERS}: {$RecruitedCustomersNumber}
{if $RecruitedCustomersNumber} {foreach from=$RecruitedCustomers item=_Customer name=i} {/foreach}
{$_Customer.Login} {if $_Customer.ActivationCode} {$smarty.const.STR_NOTACTIVATED} {else} {$smarty.const.STR_ACTIVATED} {/if} {$_Customer.reg_datetime} {$smarty.const.AFFP_REMOVE_USER}
{/if}{* if $RecruitedCustomersNumber *} {* calendar form *}
{$smarty.const.AFFP_COMMISSION_PAYMENTS}

{$smarty.const.STRING_CALENDAR}
{if $Error_DateFormat}
{$smarty.const.AFFP_MSG_ERROR_DATE_FORMAT}
{/if} {$smarty.const.STRING_FROM}: {$smarty.const.STRING_TILL}:
{if !$show_tables} {$smarty.const.MSG_PERIOD_ISNT_SPECIFIED} {/if}
{* commissions table *} {if $show_tables} {$smarty.const.AFFP_STRING_CUSTOMER_COMMISSIONS} ({$smarty.const.STRING_FROM} {$from} {$smarty.const.STRING_TILL} {$till}) {if $delete_commission}
{$smarty.const.AFFP_MSG_COMMISSION_DELETED}
{/if} {/if}{* if $show_tables *}

{$smarty.const.AFFP_SUBMIT_NEW_COMMISSION}

{if $CommissionsNumber and $show_tables}
{foreach from=$Commissions item=_Commission} {assign_array var="TotalCommissionsAmount" index=$_Commission.CurrencyISO3 value=$TotalCommissionsAmount[$_Commission.CurrencyISO3]+$_Commission.Amount} {/foreach}
C-{$_Commission.cID} {$_Commission.xDateTime} {$_Commission.Description} {$_Commission.Amount} {$_Commission.CurrencyISO3} {$smarty.const.EDIT_BUTTON} {$smarty.const.DELETE_BUTTON}
{$smarty.const.STRING_SUM} {foreach from=$TotalCommissionsAmount key=_key item=_total} {/foreach}
{$_total|string_format:"%.2f"}{$_key}
{elseif $show_tables}

{$smarty.const.AFFP_MSG_NOCOMMISISONS_FOUND} {/if}{* if $CommissionsNumber and show_tables *} {* payments table *}
{if $show_tables} {$smarty.const.AFFP_STRING_PAYMENTS_TO_CUSTOMERS} ({$smarty.const.STRING_FROM} {$from} {$smarty.const.STRING_TILL} {$till}) {if $delete_payment}
{$smarty.const.AFFP_MSG_PAYMENT_DELETED}
{/if} {/if}{* if $show_tables *}

{$smarty.const.AFFP_SUBMIT_NEW_PAYMENT}

{if $PaymentsNumber and $show_tables}
{foreach from=$Payments item=_Payment} {assign_array var="TotalPaymentsAmount" index=$_Payment.CurrencyISO3 value=$TotalPaymentsAmount[$_Payment.CurrencyISO3]+$_Payment.Amount} {/foreach}
P-{$_Payment.pID} {$_Payment.xDate} {$_Payment.Description} {$_Payment.Amount} {$_Payment.CurrencyISO3} {$smarty.const.EDIT_BUTTON} {$smarty.const.DELETE_BUTTON}
{$smarty.const.STRING_SUM} {foreach from=$TotalPaymentsAmount key=_key item=_total} {/foreach}
{$_total|string_format:"%.2f"}{$_key}
{elseif $show_tables}

{$smarty.const.AFFP_MSG_NOPAYMENTS_FOUND} {/if}{* if $PaymentsNumber and $show_tables *} {if $PaymentsNumber and $CommissionsNumber and $show_tables}
{* balance *} {/if}{* if $PaymentsNumber and $CommissionsNumber and $show_tables *}