rabin před 1 rokem
rodič
revize
5795995adc
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      src/Profit.php

+ 4 - 2
src/Profit.php

@@ -8,16 +8,18 @@ class Profit extends Core
     {
         $data['account'] = Dever::load('account/lib/info')->getInfo($this->uid);
         $data['list'] = Dever::db('account/config_profit')->select(array('config_id' => $data['account']['config_id']));
-        $data['total'] = 0;
+        $data['total'] = $data['account']['cash'];
+        $data['profit_total'] = 0;
         if ($data['list']) {
         	foreach ($data['list'] as $k => $v) {
         		$profit = Dever::db('account/profit')->one(array('uid' => $this->uid, 'config_profit_id' => $v['id']));
         		if ($profit) {
-        			$data['total'] += $profit['ycash'];
+        			$data['profit_total'] += $profit['ycash'];
         		}
         	}
         }
         $data['total'] = Dever::number($data['total']);
+        $data['profit_total'] = Dever::number($data['profit_total']);
         return $data;
     }