{if $form_validation} { $block->display("core:alert_fields") } {/if}
{translate module=affiliate} title_view {/translate}
{translate module=affiliate} field_id {/translate} {$affiliate.id}
{translate module=affiliate} field_date_orig {/translate} {$list->date_time($affiliate.date_orig)}
{translate module=affiliate} field_date_last {/translate} {$list->date_time("")}
{translate module=affiliate} field_status {/translate} {if $affiliate.status == "1"} {translate} true {/translate} {else} {translate} false {/translate} {/if}
{translate module=affiliate} field_max_tiers {/translate} {$affiliate.max_tiers}
{translate module=affiliate} field_commission_minimum {/translate} { $list->format_currency($affiliate.commission_minimum, "") }
{translate module=affiliate} field_recurr_max_commission_periods {/translate} {$affiliate.recurr_max_commission_periods}
{translate module=affiliate} field_new_commission_type {/translate} {if $affiliate.new_commission_type == "0"} {translate module=affiliate} none {/translate} {/if} {if $affiliate.new_commission_type == "1"} {translate module=affiliate} percent {/translate} {/if} {if $affiliate.new_commission_type == "2"} {translate module=affiliate} flat {/translate} {/if}
{translate module=affiliate} field_recurr_commission_type {/translate} {if $affiliate.recurr_commission_type == "0"} {translate module=affiliate} none {/translate} {/if} {if $affiliate.recurr_commission_type == "1"} {translate module=affiliate} percent {/translate} {/if} {if $affiliate.recurr_commission_type == "2"} {translate module=affiliate} flat {/translate} {/if}
{foreach from=$static_var item=record} {/foreach}
{$record.name} {$record.html}
{translate module=affiliate} field_affiliate_plugin {/translate} { $list->menu_files("", "affiliate_affiliate_plugin", $affiliate.affiliate_plugin, "affiliate_plugin", "", ".php", "") }
{assign var="afile" value=$affiliate.affiliate_plugin} {assign var="ablock" value="affiliate:plugin_"} {assign var="blockfile" value="$ablock$afile"} { $block->display($blockfile) }
 

{translate module=affiliate} title_statistics {/translate}
{foreach from=$affiliate.static_var item=record} {/foreach}
{translate module=affiliate} sessions {/translate} {$affiliate_stats.stats_sessions}
{translate module=affiliate} accounts {/translate} {$affiliate_stats.stats_accounts}
{translate module=affiliate} invoices {/translate} {$list->format_currency($affiliate_stats.stats_invoices_amt, '')} ( {$affiliate_stats.stats_invoices} )   
{translate module=affiliate} commissions {/translate} {$list->format_currency($affiliate_stats.stats_commissions, '')}
{translate module=affiliate} commissions_due {/translate} {$list->format_currency($affiliate_stats.commissions_due, '')}
{if $affiliate_campaign != ""}
{translate module=affiliate} title_campaigns {/translate}
{foreach from=$affiliate_campaign item=affiliate_campaign} {/foreach}
{$affiliate_campaign.name} {translate module=affiliate} campaign_code {/translate}
{/if}
{translate module=affiliate} field_new_commission_rate {/translate}
{ $list->unserial($affiliate.new_commission_rate,"new_commission_rate") } {foreach key=key item=item from=$new_commission_rate} {if $item} {/if}{/foreach}
{translate module=affiliate}tier{/translate} {math equation="x+y" x=$key y=1} {if $affiliate.new_commission_type == "0"} {elseif $affiliate.new_commission_type == "1"} {math equation="x*y" x=$item y=100} % {elseif $affiliate.new_commission_type == "2"} {$list->format_currency($item, '')} {/if}
{translate module=affiliate} field_recurr_commission_rate {/translate}
{ $list->unserial($affiliate.recurr_commission_rate,"recurr_commission_rate") } {foreach key=key item=item from=$recurr_commission_rate} {if $item} {/if}{/foreach}
{translate module=affiliate}tier{/translate} {math equation="x+y" x=$key y=1} {if $affiliate.recurr_commission_type == "0"} {elseif $affiliate.recurr_commission_type == "1"} {math equation="x*y" x=$item y=100} % {elseif $affiliate.recurr_commission_type == "2"} {$list->format_currency($item, '')} {/if}