{* Affiliate program settings and info *} {if $smarty.const.CONF_AFFILIATE_PROGRAM_ENABLED} {if !$show_tables}{$smarty.const.MSG_PERIOD_ISNT_SPECIFIED}
{/if} {if $show_tables} {* commissions table *} {if $CommissionsNumber} {if $delete_commission}
{$smarty.const.AFFP_MSG_COMMISSION_DELETED}

{/if}
{assign var="admhl" value=0} {foreach from=$Commissions item=_Commission} {if $admhl eq 1} {else}{assign var="admhl" value=1}{/if} {assign_array var="TotalCommissionsAmount" index=$_Commission.CurrencyISO3 value=$TotalCommissionsAmount[$_Commission.CurrencyISO3]+$_Commission.Amount} {/foreach}
{$smarty.const.AFFP_STRING_CUSTOMER_COMMISSIONS} ({$smarty.const.STRING_FROM} {$from} {$smarty.const.STRING_TILL} {$till})
ID {$smarty.const.ADMIN_CURRENT_DATE} {$smarty.const.TABLE_CUSTOMER} {$smarty.const.STRING_DESCRIPTION} {$smarty.const.STRING_SUM}  
C-{$_Commission.cID} {$_Commission.xDateTime} {$_Commission.CustomerLogin} {$_Commission.Description} {$_Commission.Amount} {$_Commission.CurrencyISO3} {$smarty.const.EDIT_BUTTON} | X
{else} {$smarty.const.AFFP_MSG_NOCOMMISISONS_FOUND}
{/if}{* if $CommissionsNumber *} {* payments table *} {if $PaymentsNumber} {if $delete_payment}
{$smarty.const.AFFP_MSG_PAYMENT_DELETED}

{/if}
{assign var="admhl" value=0} {foreach from=$Payments item=_Payment} {if $admhl eq 1} {else}{assign var="admhl" value=1}{/if} {assign_array var="TotalPaymentsAmount" index=$_Payment.CurrencyISO3 value=$TotalPaymentsAmount[$_Payment.CurrencyISO3]+$_Payment.Amount} {/foreach}
{$smarty.const.AFFP_STRING_PAYMENTS_TO_CUSTOMERS} ({$smarty.const.STRING_FROM} {$from} {$smarty.const.STRING_TILL} {$till})
ID {$smarty.const.ADMIN_CURRENT_DATE} {$smarty.const.TABLE_CUSTOMER} {$smarty.const.STRING_DESCRIPTION} {$smarty.const.STRING_SUM}  
P-{$_Payment.pID} {$_Payment.xDate} {$_Payment.CustomerLogin} {$_Payment.Description} {$_Payment.Amount} {$_Payment.CurrencyISO3} {$smarty.const.EDIT_BUTTON} | X
{$smarty.const.AFFP_USER_BALANCE}:  {foreach from=$CurrencyISO3 item=_currency} {if $TotalCommissionsAmount[$_currency.currency_iso_3] or $TotalPaymentsAmount[$_currency.currency_iso_3]} {/if} {/foreach}
{"`$TotalCommissionsAmount[$_currency.currency_iso_3]-$TotalPaymentsAmount[$_currency.currency_iso_3]`"|string_format:"%.2f"} {$_currency.currency_iso_3}
{else} {$smarty.const.AFFP_MSG_NOPAYMENTS_FOUND}
{/if} {/if} {if $error_new_commission}
{$error_new_commission}

{/if} {if $newCommissionStatus}
{$smarty.const.AFFP_MSG_NEW_COMMISSION_OK}

{/if}
{$smarty.const.AFFP_SUBMIT_NEW_COMMISSION}
{$smarty.const.ADMIN_CURRENT_DATE} {$smarty.const.STRING_SUM} {$smarty.const.CUSTOMER_LOGIN} {$smarty.const.STRING_DESCRIPTION}
 
{$smarty.const.ADD_BUTTON}
{if $error_new_payment}
{$error_new_payment}

{/if} {if $newPayStatus}
{$smarty.const.AFFP_MSG_NEW_PAY_OK}

{/if}
{$smarty.const.AFFP_SUBMIT_NEW_PAYMENT}
{$smarty.const.ADMIN_CURRENT_DATE} {$smarty.const.STRING_SUM} {$smarty.const.CUSTOMER_LOGIN} {$smarty.const.STRING_DESCRIPTION}
 
{$smarty.const.ADD_BUTTON}
{$smarty.const.USEFUL_FOR_YOU}
{$smarty.const.ALERT_ADMIN2}
{else} {$smarty.const.AFFP_MSG_PROGRAM_DISABLED}. {$smarty.const.AFF_GO_SETTINGS}
{$smarty.const.USEFUL_FOR_YOU}
{$smarty.const.ALERT_ADMIN2}
{/if}