shish пре 2 година
родитељ
комит
5127148abd
1 измењених фајлова са 9 додато и 7 уклоњено
  1. 9 7
      app-ghs/controllers/TestController.php

+ 9 - 7
app-ghs/controllers/TestController.php

@@ -55,15 +55,17 @@ class TestController extends BaseController
                 $capitalType = $change['capitalType'] ?? 0;
                 $relateId = $change['relateId'] ?? 0;
                 $amount = $change['amount'] ?? 0;
-                if ($capitalType == 40) {
-                    if (strpos($event, '退款') === false) {
-                        $flag['40-' . $relateId] = $amount;
-                    } else {
-                        $flag['33-' . $relateId] = $amount;
-                    }
-                } else {
+
+                if (strpos($event, '购买花材') !== false) {
+                    $flag['40-' . $relateId] = $amount;
+                }
+                if (strpos($event, '退款') !== false) {
+                    $flag['33-' . $relateId] = $amount;
+                }
+                if (strpos($event, '结账') !== false) {
                     $flag['20-' . $relateId] = $amount;
                 }
+
             }
         }
         print_r($flag);