{$_cost_id = waRequest::request("cost_id", null)} {$_promo_id = waRequest::request("promo_id", null)} {$_start_date = waRequest::request("start_date", null)} {$_finish_date = waRequest::request("finish_date", null)} {* PAGE *}
{* HEADER *}

[`Marketing costs`]

{$_groupby = waRequest::request("groupby", "days")} {$_timeframe = waRequest::request("timeframe", "90")} {$_from = waRequest::request("from", null)} {$_to = waRequest::request("to", null)} {$_time_filters = [ "30" => [ "id" => "30", "name" => _w('Last %d day', 'Last %d days', 30), "uri" => "`$marketing_url`costs/?timeframe=30&groupby=days" ], "90" => [ "id" => "90", "name" => _w('Last %d day', 'Last %d days', 90), "uri" => "`$marketing_url`costs/?timeframe=90&groupby=days" ], "365" => [ "id" => "365", "name" => _w('Last %d day', 'Last %d days', 365), "uri" => "`$marketing_url`costs/?timeframe=365&groupby=months" ], "all" => [ "id" => "all", "name" => _w("All time"), "uri" => "`$marketing_url`costs/?timeframe=all&groupby=months" ], "custom" => [ "id" => "custom", "name" => _w("Select dates..."), "uri" => "javascript:void(0);" ] ]} {$_active_time_filter = $_time_filters["90"]} {if !empty($_timeframe) && !empty($_time_filters[$_timeframe])} {$_active_time_filter = $_time_filters[$_timeframe]} {/if}
{* BODY *}
{* CHART *}
{* EDITOR *} {* ADD *} {* BOTTOM TABLE *}
{if count($expenses)} {include file="./MarketingCostRows.html" inline}
{else}

[`No marketing expenses on the selected period`]

[`Add your marketing expenses to automate ROI (Return On Investment) calculation by traffic source and campaign.`]

{/if}