ソースを参照

日账单月账单详情页总价计算加上VR和复购金

sunxbiao 1 年間 前
コミット
b10c28e050
共有1 個のファイルを変更した11 個の追加2 個の削除を含む
  1. 11 2
      app/controller/merchant/finance/PlatformIncomeDetail.php

+ 11 - 2
app/controller/merchant/finance/PlatformIncomeDetail.php

@@ -122,12 +122,21 @@ class PlatformIncomeDetail extends BaseController
122 122
             $yongjin_out_all = $query5
123 123
                 ->where('deal_type', 2)
124 124
                 ->where('pm', 1)
125
-                ->sum('money');
125
+                ->sum('income_detail.money');
126 126
             // 订单入账总额
127 127
             $order_in_money = $query6
128 128
                 ->where('deal_type', 1)
129 129
                 ->where('pm', 1)
130
-                ->sum('money');
130
+                ->sum('income_detail.money');
131
+            $order_in_vr = $query6
132
+                ->where('deal_type', 1)
133
+                ->where('pm', 1)
134
+                ->sum('income_detail.vr');
135
+            $order_in_fg = $query6
136
+                ->where('deal_type', 1)
137
+                ->where('pm', 1)
138
+                ->sum('income_detail.fg');
139
+            $order_in_money += (double)bcadd($order_in_vr, $order_in_fg, 2);
131 140
             $platform_enter_all = $yongjin_out_all+$order_in_money;
132 141
 
133 142
             $return_data = compact( 'platform_enter_all', 'yongjin_out_all', 'list', 'count', 'order_in_money');