维护用户销售统计

This commit is contained in:
wanyongkang
2020-11-24 16:46:29 +08:00
parent 0b71a679f7
commit 74e7f832d6

View File

@@ -203,12 +203,12 @@ class SellInfo extends Controller
$user_register_count = count($register_id_list);
$user_register_cost_count = $register_cost_data ? $register_cost_data['num'] : 0;
$data['sell_percent'] = ($all_cost ? round($user_cost / $all_cost * 100, 2) : 0) . '%';
$data['cost_percent'] = ($all_cost_num ? round($user_cost_num / $all_cost_num * 100, 2) : 0) . '%';
$data['cost_register'] = ($user_register_count ? round($user_register_cost_count / $user_register_count * 100, 2) : 0) . '%';
$data['cost_old_user'] = (($all_cost_num - $user_register_cost_count) ? round(($user_cost_num - $user_register_cost_count) / ($cost_data['num'] - $user_register_cost_count) * 100, 2) : 0) . '%';
$data['sell_percent'] = ($all_cost ? $user_cost .'/'. $all_cost.'='.round($user_cost / $all_cost * 100, 2) : 0) . '%';
$data['cost_percent'] = ($all_cost_num ? $user_cost_num .'/'. $all_cost_num.'='.round($user_cost_num / $all_cost_num * 100, 2) : 0) . '%';
$data['cost_register'] = ($user_register_count ? $user_register_cost_count .'/'. $user_register_count.'='.round($user_register_cost_count / $user_register_count * 100, 2) : 0) . '%';
$data['cost_old_user'] = (($all_cost_num - $user_register_cost_count) ? ($user_cost_num - $user_register_cost_count) .'/'. ($cost_data['num'] - $user_register_cost_count).'='.round(($user_cost_num - $user_register_cost_count) / ($cost_data['num'] - $user_register_cost_count) * 100, 2) : 0) . '%';
$data['com_cost'] = round(($user_cost - $user_last_month_cost), 2);
$data['com_percent'] = ($user_last_month_cost ? round(($user_cost - $user_last_month_cost) / $user_last_month_cost * 100, 2) : 0) . '%';
$data['com_percent'] = ($user_last_month_cost ? ($user_cost - $user_last_month_cost) .'/'. $user_last_month_cost.'='.round(($user_cost - $user_last_month_cost) / $user_last_month_cost * 100, 2) : 0) . '%';
$data['today_new_user'] = ($user_today_cost_data ? $user_today_cost_data['num'] : 0) . "/" . count($today_register_id_list);
$data['refund'] = ($refund_cost_data ? $refund_cost_data['money'] : 0);