From cb8a07b40f4a30e678e3c9f46b495de4aa144d61 Mon Sep 17 00:00:00 2001 From: huangguancheng Date: Thu, 13 Feb 2025 10:25:14 +0800 Subject: [PATCH] format --- app/service/AdsInsightService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', // 格式化总成本