shish há 1 ano atrás
pai
commit
e26bac1612

+ 5 - 0
app-hd/controllers/StatCgGhsController.php

@@ -15,6 +15,11 @@ class StatCgGhsController extends BaseController
     //采购列表 ssh 20211017
     public function actionProfile()
     {
+
+        util::success(['list' => []]);
+
+        //数据不准确,重新开发
+
         $get = Yii::$app->request->get();
         $where = [];
         $where['mainId'] = $this->mainId;

+ 4 - 0
app-hd/controllers/StatItemController.php

@@ -16,6 +16,10 @@ class StatItemController extends BaseController
     public function actionProfile()
     {
 
+        util::success(['list' => []]);
+
+        //数据不准确,重新开发
+
         //查看财务的权限
         $lookMoney = \bizGhs\shop\classes\ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
         if ($lookMoney == 0) {

+ 9 - 5
biz-ghs/stat/classes/StatKdClass.php

@@ -291,14 +291,18 @@ class StatKdClass extends BaseClass
             $staffId = $hdOrder['shopAdminId'] ?? 0;
             $staffName = $hdOrder['shopAdminName'] ?? '';
             $repeat = $hdOrder['repeat'] ?? 0;
+            $forward = $hdOrder['forward'] ?? 0;
+            $tkPrice = $hdOrder['tkPrice'] ?? 0;
+            $mainPay = bcsub($mainPay, $tkPrice, 2);
+
+            if ($forward == 1) {
+                //售后付款不属于收入
+                continue;
+            }
 
             $currentAmount = 0;
             if ($onlinePay == dict::getDict('onlinePay', 'yes')) {
 
-                //现金 和 微信支付宝付款,微信支付宝还存在退款情况
-                $tkPrice = $hdOrder['tkPrice'] ?? 0;
-                $mainPay = bcsub($mainPay, $tkPrice, 2);
-
                 $incomeList['system']['amount'] = bcadd($incomeList['system']['amount'], $mainPay, 2);
                 $incomeList['system']['num'] = bcadd($incomeList['system']['num'], 1);
                 $incomeList['system']['category']['ls']['amount'] = bcadd($incomeList['system']['category']['ls']['amount'], $mainPay, 2);
@@ -336,7 +340,7 @@ class StatKdClass extends BaseClass
                             $incomeList['debtClear']['category']['ls']['amount'] = bcadd($incomeList['debtClear']['category']['ls']['amount'], $clearDebt, 2);
                             $incomeList['debtClear']['category']['ls']['num'] = bcadd($incomeList['debtClear']['category']['ls']['num'], 1);
                         }
-                        $currentAmount = bcsub($mainPay, $debtPrice, 2);
+                        $currentAmount = bcadd($remainDebtPrice, $clearDebt, 2);
                     } else {
                         $currentAmount = $mainPay;
                     }

+ 6 - 1
biz-ghs/stat/classes/StatSaleClass.php

@@ -311,6 +311,11 @@ class StatSaleClass extends BaseClass
             $actPrice = $hdOrder['mainPay'] ?? 0;
             $onlinePay = $hdOrder['onlinePay'] ?? 1;
             $repeat = $hdOrder['repeat'] ?? 0;
+            $forward = $hdOrder['forward'] ?? 0;
+            if ($forward == 1) {
+                //售后付款不属于收入
+                continue;
+            }
 
             if ($hdOrder['tkPrice'] && $hdOrder['tkPrice'] > 0) {
                 $actPrice = bcsub($actPrice, $hdOrder['tkPrice'], 2);
@@ -320,7 +325,7 @@ class StatSaleClass extends BaseClass
             $sendCost = $hdOrder['sendCost'] ?? 0;
             $lsIncome = bcadd($actPrice, $lsIncome, 2);
             $lsIncome = bcadd($lsIncome, $cash, 2);
-            //退款取消先不计算成本
+            //退款取消先不计算成本
             if ($actPrice > 0) {
                 $lsSendCost = bcadd($lsSendCost, $sendCost, 2);
                 $lsServiceFee = bcadd($lsServiceFee, $serviceFee, 2);

+ 1 - 1
biz-hd/order/classes/OrderClass.php

@@ -246,7 +246,7 @@ class OrderClass extends BaseClass
 
     public static function valid($order, $mainId)
     {
-        if (isset($order->mainId) == false || $order->mainId != $mainId) {
+        if (!isset($order->mainId) || $order->mainId != $mainId) {
             Yii::info(json_encode($order));
             Yii::info('mainId: ' . $mainId);
             util::fail('无法访问的订单');