<?php require_once('includes/requirecompere.inc.php'); $mb_id=current_mb_id(); $currentmap=loadCurrencyNames(); $DBConn->connect(true); $profits=db_sum_monthly_profit($DBConn,$mb_id,'0000-00-00 00:00:00','9999-12-31 23:59:59',false); $dataset['PROFIT']=$profits; foreach ($dataset['PROFIT'] as &$profit) { $profit['total_profit']=format_money($profit['total_profit'],$profit['cs_currency']); $profit['total_tax']=format_money($profit['total_tax'],$profit['cs_currency']); $profit['total_lecture_expense']=format_money($profit['total_lecture_expense'],$profit['cs_currency']); $profit['total_amount']=format_money($profit['total_profit']+$profit['total_tax'],$profit['cs_currency']); $profit['cs_currency']=$currentmap[$profit['cs_currency']]; } $dataset['PROFIT-NONE']=$profits?array():array(0); ?>