This commit is contained in:
huangguancheng 2025-02-13 10:25:14 +08:00
parent 0a8ef9a295
commit cb8a07b40f

View File

@ -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', // 格式化总成本