View Single Post
  #15  
Old 24th September 2010, 15:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,242 Times in 4,108 Posts
Default

Looks good. But you missed to call the parent function to add the data that gets normally added. Try to add a call to parent:repareDataRow($rec); at the end of the function:

Code:
class list_action extends listform_actions {

public function prepareDataRow($rec) {

global $app, $sql_comissao, $sql_nao_comissao;

$sql_comissao = "SELECT SUM(valor_comissao) FROM indicacao WHERE status = '0' AND indicou_id = ".$_SESSION['s']['user']['userid'];
$sql_nao_comissao = "SELECT SUM(valor_comissao) FROM indicacao WHERE status = '1' AND indicou_id = ".$_SESSION['s']['user']['userid'];

$soma = $app->db->queryOneRecord($sql_comissao);
$soma_nao = $app->db->queryOneRecord($sql_nao_comissao);

$app->tpl->setVar('total_valor_comissionado', $soma);
$app->tpl->setVar('total_valor_nao_comissionado', $soma_nao);

parent::prepareDataRow($rec);

}
}
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote