{if $graph_data === null}
{/if}
{*
* Right sidebar with a pie chart
*}
{*
* Content on the left
*}
[`Best selling products and services`] [`Custom range`]
{else}[`Sales`] [`Custom range`]
{if $top_products}
{*
* Best selling products table
*}
{*
* Best selling services table
*}
{foreach $top_services as $s}
{else}
{if $request_options.sort == 'quantity'} [`Quantity`] {else} [`Quantity`] {/if} | {if $request_options.sort == 'sales'} [`Sales`] {else} [`Sales`] {/if} | {if $request_options.sort == 'profit'} [`Profit`] {else} [`Profit`] {/if} | |||
---|---|---|---|---|---|
[`Show more products`] | |||||
{$wa->shop->getProductImgHtml($p, $size, ['height' => 48, 'width' => 48])} | {$p.name|escape} | {$p.quantity} | {wa_currency_html($p.sales, $def_cur)} | {wa_currency_html($p.profit, $def_cur)} | 0} title="{sprintf('[`Profit percentage = Net profit (%s) / Cost price (%s) = %s%%`]', wa_currency($p.profit, $def_cur), wa_currency($p.sales - $p.profit, $def_cur), round( 100 * $p.profit / ($p.sales - $p.profit)) )}"{/if}> {strip} | {/strip}
[`Services`]
{if $top_services}{$s.name|escape} | +{wa_currency_html($s.total, $def_cur)} | |
+{wa_currency_html($service_total_val, $def_cur)} | {sprintf('[`+%s%% to average order value`]', $service_total_percent)} |
{sprintf('[`On the selected time period, there were no orders with extra services.`]', $wa_app_url|cat:'?action=products#/services/')}
{/if} {else}[`There were no products sold on the selected period.`]
{/if}