public function init() { $user = Yii::$app->session->get('user'); $maxMoney = Money::findRemainMoneyByUser($user['userId']); if ($maxMoney) { $this->maxMoney = intval($maxMoney); } else { $this->maxMoney = 0; } }
public function init() { $user = Yii::$app->session->get('user'); $remainMoney = Money::findRemainMoneyByUser($user['userId']); if ($remainMoney) { $this->remainMoney = $remainMoney; } else { $this->maxInvoiceMoney = 0; } $address = $user['address']; $this->address = $address; }