{strip} {$_title = "[`Invoices`]"} {$_states = crmInvoice::getStates(true)} {if empty($list_params.state_id)} {$state = "all"} {else} {$state = $list_params.state_id} {/if} {$_active_state = $_states[strtoupper($state)]} {$_sort_array = [ "newest" => [ "name" => "[`Newest`]", "uri" => "`$wa_app_url`invoice/?sort=newest" ], "updated" => [ "name" => "[`Updated`]", "uri" => "`$wa_app_url`invoice/?sort=updated" ], "paid" => [ "name" => "[`Paid`]", "uri" => "`$wa_app_url`invoice/?sort=paid" ] ]} {if empty($list_params.sort_filter)} {$sort = "newest"} {else} {$sort = $list_params.sort_filter} {/if} {$_active_sort = $_sort_array[$sort]}
{include file="$invoice_template"}
{/strip}