date)); $year = date("Y",strtotime($trans->date)); return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'retrait' ; }); $retraits_data[] = sizeof($retraits_query_mounth); } $startDate = (new DateTime('01-'.$months[11].'-'.$years[11]))-> format('Y-m-d H:i:s'); $endDate = date_create_from_format ('m/Y',$months[0].'/'.$years[0])-> format('Y-m-d H:i:s'); $retraits = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){ $date = strtotime($trans->date); // return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'debit' ; return $trans->type_transaction == 'retrait' ; }); /** ** Dépots **/ $date = date("Y"); $depots_data[] = ''; $depots_data =array(); for ($i = 1; $i <= 12; $i++) { $depots_query_mounth= array_filter($transactions, function ($trans) use ($i, $months ,$years){ $month = date("m",strtotime($trans->date)); $year = date("Y",strtotime($trans->date)); return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'depot' ; }); $depots_data[] = sizeof($depots_query_mounth); } $depots = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){ $date = strtotime($trans->date); // return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'credit' ; return $trans->type_transaction == 'depot' ; }); if($transactions!=false){ $transac=sizeof($transactions); $array_transac = array(); $num = 0; if ($transac > 0) { foreach($transactions as $row) { $num++; $array_transac[] = $row->type_transaction; } $vals_transac = array_count_values($array_transac); $pieChart = array(); foreach(array_keys($vals_transac) as $paramName) { $color = dechex(rand(0x000000, 0xFFFFFF)); $trash = array("value" => $vals_transac[$paramName], "color" => "#".$color, "highlight" => "#".$color, "label" => $paramName); $pieChart[]= $trash; } } }else{ $pieChart = array(); } $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL ); ?>

Wallet

Erreur!

Success!

lang->line('Solde Principal') ?>

lang->line('Solde Commission') ?>

lang->line('Total commission de la banque') ?>

lang->line("Parts dépots & retraits"); ?>

".$this->lang->line('Nom').""; ?> result() as $row) { $wallet = null; foreach ($agentWalletInfos->result() as $value) { if ($value->agent_id == $row->agent_id) { $wallet = $value; break; } } $com = 0; $princ = 0; if($wallet) { $com = $wallet->balance_com; $princ = $wallet->balance_princ; } echo ""; $nb_depots = 0; $nb_retraits = 0; $commission_banque = 0; foreach($depots as $depot){ if($depot->code_parrain == $row->member_code) { $nb_depots ++; $commission_banque+= $depot->commission_banque; } } foreach($retraits as $retrait){ if($retrait->code_parrain == $row->member_code) { $nb_retraits ++; $commission_banque+= $retrait->commission_banque; } } echo ""; } } ?>
".$this->lang->line('Solde Principal')." ".$this->lang->line('Solde Commission')." ".$this->lang->line('Commission banque')." ".$this->lang->line('DEPOT'). 's'." ".$this->lang->line('RETRAIT').'s'."
".$row->lastname." ".Money::of(round($princ,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')." ".Money::of(round($com,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')."".Money::of(round($commission_banque,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')." ".$nb_depots." ".$nb_retraits."
load->view('include/recharge_account_modal',['walletPassword' => $walletPassword, 'network' => $network, 'country' => $country, 'wallet_id' => $wallet_id]) ?>