{if $item.daily eq 1}

{$item.reportname}

{else}

{$item.eventname} {$item.eventdate|date_format:"%m.%d.%Y"}

{$item.reportname}
{/if} {strip} {if $item.column} {assign var='cols' value=0} {foreach from=$item.column item="header" name="header"} {math equation='x + 1' x=$cols assign='cols'} {/foreach} {/if} {assign var='groupheader' value=''} {assign var='count' value=0} {assign var='sum' value=0} {assign var='countgroup' value=0} {assign var='sumgroup' value=0} {if $item.daily eq 1} {assign var='subgroupheader' value=''} {assign var='type' value=''} {assign var='countsubgroup' value=0} {assign var='sumsubgroup' value=0} {/if} {*$item.items|@vdie*} {foreach from=$item.items item="row"} {assign var='newgroup' value=$row.payment} {if $item.daily eq 1} {assign var='newsubgroup' value=$row.event_name} {/if} {if (($subgroupheader neq $newsubgroup) or ($groupheader neq $newgroup)) and $item.daily eq 1} {if $subgroupheader neq ''} {/if} {if $groupheader eq $newgroup} {/if} {assign var='subgroupheader' value=$newsubgroup} {assign var='countsubgroup' value=0} {assign var='sumsubgroup' value=0} {/if} {if $groupheader neq $newgroup} {if $groupheader neq ''} {/if} {/if} {if $item.daily eq 1 and $type neq $row.type} {assign var='type' value=$row.type} {/if} {if $groupheader neq $newgroup} {if $item.daily eq 1 and $newsubgroup neq ''} {/if} {assign var='groupheader' value=$newgroup} {assign var='countgroup' value=0} {assign var='sumgroup' value=0} {/if} {math equation='x + 1' x=$countsubgroup assign='countsubgroup'} {math equation='x + 1' x=$countgroup assign='countgroup'} {math equation='x + 1' x=$count assign='count'} {math equation='x + y' x=$sumsubgroup y=$row.amount assign='sumsubgroup'} {math equation='x + y' x=$sumgroup y=$row.amount assign='sumgroup'} {math equation='x + y' x=$sum y=$row.amount assign='sum'} {foreach from=$item.column item="row_format" } {list_parse_cell_params nums=$row_format.params data=$row} {/list_parse_cell_params} {/foreach} {foreachelse} {/foreach} {if $item.daily eq 1 and $subgroupheader neq ''} {/if}
{if $header.order_by} {$header.title} {if preg_match("/^`$header.order_by`( DESC)?$/", $item.order_by)}    {/if} {else} {$header.title} {/if}
Subtotal for {$subgroupheader}

{$countsubgroup} {if $item.daily eq 1}payment{else}attendee{/if} {if $countsubgroup neq 1}s{/if}     ${$sumsubgroup|money}

 

{$newsubgroup}{*Payments*}

Total {$groupheader}

{$countgroup} {if $item.daily eq 1}payment{else}attendee{/if} {if $countgroup neq 1}s{/if}     ${$sumgroup|money}

 

{$row.type}

{$newgroup}{*Payments*}

{$newsubgroup}{*Payments*}

{include file=$row_format.tpl}
Empty list
Subtotal for {$subgroupheader}

{$countsubgroup} {if $item.daily eq 1}payment{else}attendee{/if} {if $countsubgroup neq 1}s{/if}     ${$sumsubgroup|money}

 
Total {$groupheader}

{$countgroup} {if $item.daily eq 1}payment{else}attendee{/if} {if $countgroup neq 1}s{/if}     ${$sumgroup|money}

 
Total Payments for day

{$count} {if $item.daily eq 1}payment{else}attendee{/if} {if $count neq 1}s{/if}     ${$sum|money}

 

{/strip}