public function setInterestm(Event $event) { /** @var InvestList $investList */ $investList = $event->sender; $investListId = $investList->id; $step = Utils::moneyFormat($investList->interest / $investList->invest->invest_date); $payTime = $investList->pay_time; if ($investList->invest->type == Invest::TYPE_MONEY) { for ($i = 1; $i <= $investList->invest->invest_date; $i++) { wanhunet::$app->db->createCommand()->insert(InvestMonth::tableName(), ['invest_list_id' => $investListId, 'm_step' => $step, 'm_status' => Invest::STATUS_ACTIVE, 'm_time' => $payTime + 3600 * 24 * 30 * $i, 'm_date' => $i, 'created_at' => $payTime, 'updated_at' => $payTime])->execute(); } } }
echo $sum; ?> </td> <td><?php echo Utils::moneyFormat($earnSum); ?> </td> </tr> <tr> <td>体验投标</td> <td><?php echo Utils::moneyFormat($esum); ?> </td> <td><?php echo Utils::moneyFormat($eearnSum); ?> </td> </tr> </table> </a> </section> <aside class='p10'> <p>*玖信理财承诺不会泄露您的个人信息*</p> </aside> <footer class="ind-footer" style="padding-bottom:40px;"> <aside class="fot"> <ul> <li><a href="<?php echo \yii\helpers\Url::to(['text/about']);
//= \yii\helpers\Url::to(['invest/fund']) ?> <!--">查看资金流水</a></p>--> </aside> <section class="profit-content"> <table> <?php foreach ($list as $key => $vo) { ?> <tr> <td><?php echo date('Y.m.d', $key); ?> </td> <td>+<?php echo \wanhunet\helpers\Utils::moneyFormat($vo); ?> </td> </tr> <?php } ?> </table> </section> <script> var a = function () { $(".amsincome-word").width(($(".ams-income").width() - 13) / 2); $(".profit-content").css("min-height", $(window).height() - $(".Y-income").height() - $(".ams-income").height() - 101); }; $(document).ready(function () {
?> <tr> <td><?php echo Utils::moneyFormat($e->investment_sum); ?> </td> <td><?php echo date('Y.m.d', $e->interest_time); ?> </td> <td><?php echo $e->invest->rate; ?> %</td> <td>+<?php echo Utils::moneyFormat($e->interest); ?> </td> </tr> <?php } ?> </table> </section> <?php $this->beginBlock('inline_scripts'); ?> <script> var a = function () {
<td>金额</td> </tr> <?php foreach ($investList as $invest) { ?> <tr> <td><?php echo date("Y.m.d", $invest->pay_time); ?> </td> <td><?php echo $invest->invest->title; ?> </td> <td>¥<?php echo \wanhunet\helpers\Utils::moneyFormat($invest->investment_sum); ?> </td> </tr> <?php } ?> </table> </section> <?php $this->beginBlock('inline_scripts'); ?> <script> var a = function () { $(".amsincome-word").width(($(".ams-income").width() - 13) / 2);
public function actionMain() { $investListBaseModel = InvestList::find()->where(['status' => InvestList::STATUS_PAYED, 'member_id' => wanhunet::$app->user->getId()])->orWhere(['status' => InvestList::STATUS_ORDER_TRIAL, 'member_id' => wanhunet::$app->user->getId()])->joinWith(['invest' => function ($query) { /** @var \yii\db\ActiveQuery $query */ $query->andWhere(['type' => Invest::TYPE_MONEY]); }]); $investSum = clone $investListBaseModel; $investSum = Utils::moneyFormat($investSum->sum('investment_sum')); $allEarn = clone $investListBaseModel; $allEarn = $allEarn->andWhere(['<=', 'interest_time', time()])->sum('interest'); $earnIng = clone $investListBaseModel; $earnIngAll = $earnIng->andWhere(['>=', 'interest_time', time()])->all(); $earnIng = 0; /** @var InvestList[] $earnIngAll */ foreach ($earnIngAll as $e) { // var_dump($e->getEarnings('now')); $earnIng += $e->getEarnings('now'); } $yesterdayEarnIng = clone $investListBaseModel; $yesterdayEarnIngAll = $yesterdayEarnIng->andWhere(['>=', 'interest_time', time() - 3600 * 24])->all(); $yesterdayEarnIng = 0; /** @var InvestList[] $yesterdayEarnIngAll */ foreach ($yesterdayEarnIngAll as $e) { // var_dump($e->getEarnings('1')); $yesterdayEarnIng += $e->getEarnings(1); } ////////////////////////////////// $einvestListBaseModel = InvestList::find()->where(['status' => InvestList::STATUS_PAYED, 'member_id' => wanhunet::$app->user->getId()])->joinWith(['invest' => function ($query) { /** @var \yii\db\ActiveQuery $query */ $query->andWhere(['type' => Invest::TYPE_EXPERIENCE_MONEY])->orWhere(['type' => Invest::TYPE_REG]); }]); $einvestSum = clone $einvestListBaseModel; $einvestSum = Utils::moneyFormat($einvestSum->sum('investment_sum')); $eallEarn = clone $einvestListBaseModel; $eallEarn = $eallEarn->andWhere(['<=', 'interest_time', time()])->sum('interest'); $eearnIng = clone $einvestListBaseModel; $eearnIngAll = $eearnIng->andWhere(['>=', 'interest_time', time()])->all(); $eearnIng = 0; /** @var InvestList[] $eearnIngAll */ foreach ($eearnIngAll as $e) { $eearnIng += $e->getEarnings('now'); } $eyesterdayEarnIng = clone $einvestListBaseModel; $eyesterdayEarnIngAll = $eyesterdayEarnIng->andWhere(['>=', 'interest_time', time() - 3600 * 24])->all(); $eyesterdayEarnIng = 0; /** @var InvestList[] $eyesterdayEarnIngAll */ foreach ($eyesterdayEarnIngAll as $e) { $eyesterdayEarnIng += $e->getEarnings(1); } return $this->view('main', ['sum' => $investSum, 'earnSum' => $allEarn + $earnIng, 'yesterdayEarnIng' => $yesterdayEarnIng, 'esum' => $einvestSum, 'eearnSum' => $eallEarn + $eearnIng, 'eyesterdayEarnIng' => $eyesterdayEarnIng]); }
?> ">查看体验金规则 ></a> </div> </div> <aside class=" profit-content"> <table> <?php foreach ($einvestList as $invest) { ?> <tr> <td><?php echo $invest->invest->title; ?> </td> <td>+<?php echo \wanhunet\helpers\Utils::moneyFormat($invest->interest); ?> (元)</td> </tr> <?php } ?> </table> </aside> <div style="height:50px;"></div> <div class="pvi_fo"> <a href="<?php echo \yii\helpers\Url::to(['text/tiyanjishangxian']); ?> " class="pvi_fo_od" style="border-right:1px solid #ccc;"> <p>提高体验金投标上限</p>
/** * 获取账户余额 * @return int */ public function getMoney() { return Utils::moneyFormat($this->assetModel->money); }