{$_title = "[`Reports`]"} {* DATE *} {$filter_dates = [ "30" => [ "id" => "30", "uri" => crmHelper::getUrl(["timeframe" => 30, "start" => null, "end" => null]), "name" => _w('Last %d day', 'Last %d days', 30), "group_by" => "days", "timeframe" => 30 ], "90" => [ "id" => "90", "uri" => crmHelper::getUrl(["timeframe" => 90, "start" => null, "end" => null]), "name" => _w('Last %d day', 'Last %d days', 90), "group_by" => "days", "timeframe" => 90 ], "365" => [ "id" => "365", "uri" => crmHelper::getUrl(["timeframe" => 365, "start" => null, "end" => null]), "name" => _w('Last %d day', 'Last %d days', 365), "group_by" => "months", "timeframe" => 365 ], "all" => [ "id" => "all", "uri" => crmHelper::getUrl(["timeframe" => "all", "start" => null, "end" => null]), "name" => "[`All time`]", "group_by" => "months", "timeframe" => "all" ], "custom" => [ "id" => "custom", "uri" => "javascript:void(0);", "name" => "[`Select dates...`]", "group_by" => "", "timeframe" => "custom" ] ]} {if $timeframe && !empty($filter_dates[$timeframe])} {$selected_filter_date = $filter_dates[$timeframe]} {else} {$selected_filter_date = reset($filter_dates)} {/if}
{* need for generation uri, "custom" timeframe *}
{if !empty($charts)}{/if}
{if $paid_invoices_stat.count}

{$paid_invoices_stat.count} {_w('invoice paid', 'invoices paid', $paid_invoices_stat.count)}. [`Total paid amount`]: {$paid_invoices_stat.amount|wa_format_amount_currency:$paid_invoices_stat.currency_id}

{/if}
{if !empty($charts) && $paid_invoices_stat.count}
{else}
[`There are no paid invoices for specified period.`]
{/if}