diff --git a/app/service/AdsInsightService.php b/app/service/AdsInsightService.php index 5b04ca5..9f6c824 100644 --- a/app/service/AdsInsightService.php +++ b/app/service/AdsInsightService.php @@ -1259,7 +1259,7 @@ class AdsInsightService 'adds_to_cart' => number_format($adds_to_cart), 'cost_per_atc' => $adds_to_cart == 0 ? '-' : '$' . number_format(($total_spend / $adds_to_cart), 2), 'purchases' => number_format($total_purchases), - 'purchases_value' => array_sum(array_column($allAccounts, 'purchases_value')), + 'purchases_value' => '$' . number_format($total_purchases_value, 2) ?: '$0.00', // 格式化销售额$total_purchases_value,, 'cost_per_purchase' => '$' . number_format($cost_per_purchase, 2) ?: '$0.00', 'revenue' => '$' . number_format(array_sum(array_column($allAccounts, 'revenue')), 2) ?: '$0.00', // 格式化收入 'total_cost' => '$' . number_format($total_cost, 2) ?: '$0.00', // 格式化总成本