/** * 获取用户剩余的可以申请发票的钱 * @param $userId * @return mixed */ public static function findRemainMoneyByUser($userId) { $consume = Invoice::findTotalInvoice($userId); $income = Money::findTotalPay($userId); return $income - $consume; }
?> </td> <td><?php echo $user->department['name']; ?> </td> <td><?php echo $user->recommendCode; ?> </td> <td><?php echo $user->recommendUser['nickname']; ?> </td> <td><?php echo Money::findTotalPay($user->userId); ?> </td> <td><?php echo IncomeConsume::findTotalIncome($user->userId); ?> </td> <td><?php echo $user->bitcoin; ?> </td> <td><?php echo count(Users::findBeRecommend($user->userId)); ?> </td> <td><?php
<option value="pay-more">充值金额大于</option> <option value="pay-equal">充值金额等于</option> <option value="pay-less">充值金额小于</option> </select> <input type="text" name="content" class="form-control" placeholder="请输入查找内容"> <button type="submit" class="btn btn-small btn btn-primary">查找</button> </div> <?php echo Html::endForm(); ?> </div> </div> <table class="table table-bordered table-striped margin-bottom-20"> <tr> <td><strong>总计充值金额:</strong><?php echo Money::findTotalPay($user['userId']); ?> (元)<td> </tr> </table> <table class="table table-hover table-bordered text-align-center"> <thead class="bordered-blue"> <tr> <th class="text-align-center">序号</th> <th class="text-align-center">用户号</th> <th class="text-align-center">用户昵称</th> <th class="text-align-center">用户真实姓名</th> <th class="text-align-center">充值金额</th> <th class="text-align-center">获得云豆数</th> <th class="text-align-center">时间</th> </tr> </thead>