/** * 获取用户剩余的可以申请发票的钱 * @param $userId * @return mixed */ public static function findRemainMoneyByUser($userId) { $consume = Invoice::findTotalInvoice($userId); $income = Money::findTotalPay($userId); return $income - $consume; }
<option value="money-equal">开票金额等于</option> <option value="money-less">开票金额小于</option> <option value="orderNumber">快递单号</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 Invoice::findTotalInvoice($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> <th class="text-align-center">管理员回复内容</th> <th class="text-align-center">快递单号</th>