This works brilliantly. Thank youAlso, if you did want to just enabled/disable this on a per client basis. You can use a custom client field and call it something like Hide Cancelled Services, and set the field type to Tick Box. If you don't want your client to see this option, check the admin only box, otherwise this checkbox will show up in the client My Detail section.
If this was your only custom field, this would be stored in $clientsdetails.customfields1 and you would then need to update the clientareaproducts.tpl template file to hide the cancelled and terminated services as long as the checkbox is selected.
e.g.
{foreach from=$services item=service}
{if ($service.rawstatus ne "cancelled" and $service.rawstatus ne "terminated") || $clientsdetails.customfields1 ne "on"}
<tr>
<td>{$service.group} - {$service.product}{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td>
<td>{$service.amount}</td>
<td>{$service.billingcycle}</td>
<td>{$service.nextduedate}</td>
<td><span class="label {$service.rawstatus}">{$service.statustext}</span></td>
<td class="textcenter"><form method="post" action="{$smarty.server.PHP_SELF}?action=productde tails"><input type="hidden" name="id" value="{$service.id}" /><input type="submit" value="{$LANG.clientareaviewdetails}" class="btn info" /></form></td>
</tr>
{/if}
{foreachelse}
<tr>
<td colspan="6" class="textcenter">{$LANG.norecordsfound}</td>
</tr>
{/foreach}


