{assign var="title" value="Affiliate stats"} {include file="admin/header.inc.html"} {include file="admin/user_nb.inc.html" selected="aff_sales"}

{$title} / Affiliate Clicks / Referred Users

  {if $error}
{foreach from=$error item=e}
  • {$e} {/foreach}
  • {/if}
        Period        

    {if $days}

    Stats for period

    {foreach from=$days item=d key=dd} {if $d.raw>0 || $d.debit>0 || $d.credit>0 } {if $d.detail} {/if} {/if} {/foreach}
      CLICKS COMMISSIONS
    Date Raw Unique Transactions Credit Debit Total
    {$d.dat|amember_date_format} {$d.raw|string_format:"%d"} {$d.uniq|string_format:"%d"} {$d.trans} {if $d.debit ne ""}{$d.debit}{/if} {$d.credit} {if $d.total ne ""}{if $d.total < 0.0}{/if}{$d.total|string_format:"%.2f"}{/if}{if $d.total < 0.0}{/if}
    {foreach from=$d.detail item=dv} {if $dv.record_type == 'debit'}Commission void {else} {/if} Payment #{$dv.payment_id|escape} for {$dv.pr_title|escape}, paid by {$dv.login} ({$dv.name_f|escape} {$dv.name_l|escape}), paid: {$dv.p_amount|escape}, commission: {$dv.c_amount|escape}, level {$dv.tier|escape}
    {/foreach}
    TOTAL {$total.raw|string_format:"%d"} {$total.uniq|string_format:"%d"} {$total.trans|string_format:"%d"} {if $total.debit ne ""}{$total.debit|string_format:"%.2f"}{/if} {$total.credit|string_format:"%.2f"} {if $total.total < 0.0}{/if}{$total.total|string_format:"%.2f"}{if $total.total < 0.0}{/if}
    {/if} {if $refs}

    Top 20 Referrers

    {foreach from=$refs item=r} {/foreach}
    CLICKS REFERRER
    Raw Unique
    {$r.raw|string_format:"%d"} {$r.uniq|string_format:"%d"} {$r.ref}
    {/if}
    {include file="admin/footer.inc.html"}