|
@@ -1170,11 +1170,10 @@ class CronCollectDataView(View):
|
|
|
if CONFIG_INFO == CONFIG_CN: # 国内要换算汇率
|
|
|
storage_cost = round(storage_cost * 7, 2)
|
|
|
api_cost = round(api_cost * 7, 2)
|
|
|
+ profit = round(monthly_income - storage_cost - api_cost, 2) # 利润=月结算金额-月成本
|
|
|
if monthly_income == 0.0:
|
|
|
- profit = 0
|
|
|
profit_margin = 0
|
|
|
else:
|
|
|
- profit = round(monthly_income - storage_cost - api_cost, 2) # 利润=月结算金额-月成本
|
|
|
profit_margin = round(profit / month_average_price, 2) # 利润率=利润/每月收入分摊
|
|
|
OperatingCosts.objects.filter(time=start_time_stamp, order_id=item['order_id'],
|
|
|
uid=item['uid']).update(day_average_price=day_average_price,
|