shish 4 éve
szülő
commit
1e3590ad1e
1 módosított fájl, 16 hozzáadás és 16 törlés
  1. 16 16
      biz-ghs/stat/classes/StatKdClass.php

+ 16 - 16
biz-ghs/stat/classes/StatKdClass.php

@@ -125,7 +125,7 @@ class StatKdClass extends BaseClass
             foreach ($ghsOrderList as $ghsKey => $ghsOrder) {
                 $payWay = $ghsOrder['payWay'] ?? 0;
                 $actPrice = $ghsOrder['actPrice'] ?? 0;
-                $shopAdminId = $ghsOrder['getStaffId'] ?? 0;
+                $getStaffId = $ghsOrder['getStaffId'] ?? 0;
                 $debtPrice = $ghsOrder['debtPrice'] ?? 0;
                 $onlinePay = $ghsOrder['onlinePay'] ?? dict::getDict('onlinePay', 'not');
                 if ($debtPrice > 0) {
@@ -152,9 +152,9 @@ class StatKdClass extends BaseClass
                                 $incomeList['kfWx']['category']['pf']['amount'] = bcadd($incomeList['kfWx']['category']['pf']['amount'], $actPrice, 2);
                                 $incomeList['kfWx']['category']['pf']['num'] = bcadd($incomeList['kfWx']['category']['pf']['num'], 1);
                                 //客1 客2 客3各收了多少钱
-                                if (isset($incomeList['kfWx']['num']['class'][$shopAdminId])) {
-                                    $incomeList['kfWx']['class'][$shopAdminId]['amount'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['amount'], $actPrice, 2);
-                                    $incomeList['kfWx']['class'][$shopAdminId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['num'], 1);
+                                if (isset($incomeList['kfWx']['num']['class'][$getStaffId])) {
+                                    $incomeList['kfWx']['class'][$getStaffId]['amount'] = floatval(bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['amount'], $actPrice, 2));
+                                    $incomeList['kfWx']['class'][$getStaffId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['num'], 1);
                                 }
                                 break;
                             case dict::getDict('payWay', 'alipay'):
@@ -197,7 +197,7 @@ class StatKdClass extends BaseClass
             $mainPay = $hdOrder['mainPay'] ?? 0;
             $cash = $hdOrder['cash'] ?? 0;
             $actPrice = $hdOrder['actPrice'] ?? 0;
-            $shopAdminId = $hdOrder['getStaffId'] ?? 0;
+            $getStaffId = $hdOrder['getStaffId'] ?? 0;
             $debtPrice = $hdOrder['debtPrice'] ?? 0;
             $onlinePay = $hdOrder['onlinePay'] ?? 0;
             if ($debtPrice > 0) {
@@ -230,9 +230,9 @@ class StatKdClass extends BaseClass
                             $incomeList['kfWx']['category']['ls']['amount'] = bcadd($incomeList['kfWx']['category']['ls']['amount'], $actPrice, 2);
                             $incomeList['kfWx']['category']['ls']['num'] = bcadd($incomeList['kfWx']['category']['ls']['num'], 1);
                             //客1 客2 客3各收了多少钱
-                            if (isset($incomeList['kfWx']['class'][$shopAdminId])) {
-                                $incomeList['kfWx']['class'][$shopAdminId]['amount'] = bcadd($incomeList['kfWx']['class'][$shopAdminId]['amount'], $actPrice, 2);
-                                $incomeList['kfWx']['class'][$shopAdminId]['num'] = bcadd($incomeList['kfWx']['class'][$shopAdminId]['num'], 1);
+                            if (isset($incomeList['kfWx']['class'][$getStaffId])) {
+                                $incomeList['kfWx']['class'][$getStaffId]['amount'] = bcadd($incomeList['kfWx']['class'][$getStaffId]['amount'], $actPrice, 2);
+                                $incomeList['kfWx']['class'][$getStaffId]['num'] = bcadd($incomeList['kfWx']['class'][$getStaffId]['num'], 1);
                             }
                             break;
                         case dict::getDict('payWay', 'alipay'):
@@ -274,7 +274,7 @@ class StatKdClass extends BaseClass
                 $payWay = $clear['payWay'] ?? 0;
                 $actPrice = $clear['actPrice'] ?? 0;
                 $onlinePay = $clear['onlinePay'] ?? 0;
-                $shopAdminId = $clear['ghsShopAdminId'] ?? 0;
+                $getStaffId = $clear['ghsShopAdminId'] ?? 0;
                 if ($onlinePay == dict::getDict('onlinePay', 'yes')) {
                     $incomeList['system']['amount'] = bcadd($incomeList['system']['amount'], $actPrice, 2);
                     $incomeList['system']['num'] = bcadd($incomeList['system']['num'], 1);
@@ -291,9 +291,9 @@ class StatKdClass extends BaseClass
                             $incomeList['kfWx']['category']['pfJz']['amount'] = bcadd($incomeList['kfWx']['category']['pfJz']['amount'], $actPrice, 2);
                             $incomeList['kfWx']['category']['pfJz']['num'] = bcadd($incomeList['kfWx']['category']['pfJz']['num'], 1);
                             //客1 客2 客3各收了多少钱
-                            if (isset($incomeList['kfWx']['num']['class'][$shopAdminId])) {
-                                $incomeList['kfWx']['class'][$shopAdminId]['amount'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['amount'], $actPrice, 2);
-                                $incomeList['kfWx']['class'][$shopAdminId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['num'], 1);
+                            if (isset($incomeList['kfWx']['num']['class'][$getStaffId])) {
+                                $incomeList['kfWx']['class'][$getStaffId]['amount'] = bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['amount'], $actPrice, 2);
+                                $incomeList['kfWx']['class'][$getStaffId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['num'], 1);
                             }
                             break;
                         case dict::getDict('payWay', 'alipay'):
@@ -334,7 +334,7 @@ class StatKdClass extends BaseClass
             foreach ($settleList as $sKey => $settle) {
                 $payWay = $settle['payWay'] ?? 0;
                 $actPrice = $settle['actPrice'] ?? 0;
-                $shopAdminId = $settle['hdShopAdminId'] ?? 0;
+                $getStaffId = $settle['hdShopAdminId'] ?? 0;
                 $onlinePay = $settle['onlinePay'] ?? 0;
                 if ($onlinePay == dict::getDict('onlinePay', 'yes')) {
 
@@ -349,9 +349,9 @@ class StatKdClass extends BaseClass
                             $incomeList['kfWx']['category']['lsWk']['amount'] = bcadd($incomeList['kfWx']['category']['lsWk']['amount'], $actPrice, 2);
                             $incomeList['kfWx']['category']['lsWk']['num'] = bcadd($incomeList['kfWx']['category']['lsWk']['num'], 1);
                             //客1 客2 客3各收了多少钱
-                            if (isset($incomeList['kfWx']['num']['class'][$shopAdminId])) {
-                                $incomeList['kfWx']['class'][$shopAdminId]['amount'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['amount'], $actPrice, 2);
-                                $incomeList['kfWx']['class'][$shopAdminId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$shopAdminId]['num'], 1);
+                            if (isset($incomeList['kfWx']['num']['class'][$getStaffId])) {
+                                $incomeList['kfWx']['class'][$getStaffId]['amount'] = bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['amount'], $actPrice, 2);
+                                $incomeList['kfWx']['class'][$getStaffId]['num'] = bcadd($incomeList['kfWx']['num']['category'][$getStaffId]['num'], 1);
                             }
                             break;
                         case dict::getDict('payWay', 'alipay'):