本文整理汇总了PHP中Coupon::total_available方法的典型用法代码示例。如果您正苦于以下问题:PHP Coupon::total_available方法的具体用法?PHP Coupon::total_available怎么用?PHP Coupon::total_available使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Coupon
的用法示例。
在下文中一共展示了Coupon::total_available方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: account_summary
private function account_summary($xml)
{
if (!$this->bind_check($xml)) {
return;
}
$uid = $this->user_profile->id;
$from = $xml->FromUserName;
$to = $xml->ToUserName;
$url = _url('/user');
if (ENV == 'dev') {
$url = preg_replace('/^https/', 'http', $url);
}
$account = Account::get($uid);
if (!$account) {
$account = new Account();
}
$unuse_coupon = Coupon::total_available($uid);
// $my_profit = $account->my_profit();
$repay_sum_need = Repay::get_sum_amount_by_uid($uid, Repay::STATUS_NEW);
$prj_count = Order::get_prj_count_by_uid($uid, array(Order::STATUS_PAYDONE, Order::STATUS_NEW, Order::STATUS_BLOCK));
// $platform_interest_done = PlatformInterest::get_total_amount_by_uid($uid, Trade::STATUS_DONE);
$platform_interest_new = PlatformInterest::get_total_amount_by_uid($uid, Trade::STATUS_NEW);
// $stock_transfer_done = StockTransfer::get_total_amount_by_uid($uid, Trade::STATUS_DONE);
$lqjh_account = LqjhAccount::get($uid);
// $qxjh_amount = ApolloOrder::get_amount_by_uid($uid, ApolloOrder::STATUS_PAYDONE);
if ($lqjh_account) {
$lqjh_amount = $lqjh_account->get_amount();
} else {
$lqjh_amount = 0;
}
$bxjh_repay_new = BxjhRepay::get_sum_amount_by_uid($uid, BxjhRepay::STATUS_NEW);
// $bxjh_platform_interest_new = BxjhPlatformInterest::get_sum_amount_by_uid($uid, BxjhPlatformInterest::STATUS_NEW);
$repay_sum_already = Account::get_total_profit($uid);
$asset = Account::get_total_asset($uid);
$remain_amount = Account::get_remain_amount($uid);
$ret_text = '';
$ret_text .= "总资产 (元): " . Money::show_money($asset) . "\n";
$ret_text .= "账户余额(元): " . Money::show_money($remain_amount) . "\n";
$ret_text .= "累计收益(元): " . Money::show_money($repay_sum_already) . "\n";
$ret_text .= "\n";
// $ret_text .= "在投项目(个): " . $prj_count . "\n";
$ret_text .= "待收本金(元): " . Money::show_money($repay_sum_need->total_amount - $repay_sum_need->total_interest + $bxjh_repay_new->total_amount - $bxjh_repay_new->total_interest) . "\n";
$ret_text .= "零钱金额(元): " . Money::show_money($lqjh_amount) . "\n";
// $ret_text .= "待收利息(元): " . Money::show_money($repay_sum_need->total_interest+ $platform_interest_new) . "\n";
$ret_text .= "\n";
$ret_text .= "未用投资券总价值(元): " . Money::show_money($unuse_coupon) . "\n\n";
$ret_text = preg_replace('/<\\/?span>/', '', $ret_text);
$news_arr = array(array('title' => '账户概览', 'desc' => $ret_text, 'link' => $url));
$this->wx_reply->imm_reply_news($to, $from, $news_arr);
}