public function _saveBalance($type)
	{
		if ($type == 'creation')
		{
			$model = Account::blank();
		}
		else
		{
			$model = Account::oneByUserId($this->uid);
		}

		$model->set([
			'uid'      => $this->uid,
			'balance'  => $this->balance,
			'earnings' => $this->earnings,
			'credit'   => $this->credit
		]);

		if (!$model->save())
		{
			$this->setError($model->getError());

			return false;
		}

		return true;
	}