<table cellspacing=1 cellpadding=2 border=0 width=100%>
<tr>
 <td colspan=2><b>Payout Statistics for {$listing.name}</b></td>
</tr>
<tr>
 <td width="15%">Payouts Ratio:</td><td><b>{$totals.ratio*100}% {if $totals.ratio >= 1}<font color=red>in profit</font>{/if}</b></td>
</tr>
<tr>
 <td>Profit:</td>
 <td><b style="color:green">${$totals.profit|number_format:2}</b> {if $totals.payouts > 0}in {$totals.payouts} payouts{/if}</td>
</tr>
<tr>
 <td>Investment:</td>
 <td><b style="color:red">${$totals.spent|number_format:2}</b> {if $totals.spends > 0}in {$totals.spends} spends{/if}</td>
</tr>
</table>

<table cellspacing=1 cellpadding=2 border=0 width="100%">
<tr>
 <th class="title_box" align="center">Date</th>
 <th class="title_box" align="center">Amount</th>
 <th class="title_box" align="center">Comment</th>
</tr>
{if $stats}
{section name=s loop=$stats}
<tr class={if $smarty.section.s.rownum % 2 != 0}detailsbg1{else}detailsbg2{/if}>
 <td align="center">{$stats[s].fdate}</td>
 <td align="center">{if $stats[s].type}<font color="green">{else}<font color="red">{/if}${$stats[s].amount}</font></td>
 <td align="center">{$stats[s].comment}</td>
</tr>
{/section}
{else}
<tr>
 <td colspan=4 align=center>No Payouts.</td>
</tr>
{/if}
</table>