Forráskód Böngészése

分期商品增bugfix

kevin_zhangl 2 éve
szülő
commit
0ceb40d2f6
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      common/models/DeclarationLevel.php

+ 3 - 2
common/models/DeclarationLevel.php

@@ -163,9 +163,10 @@ class DeclarationLevel extends \common\components\ActiveRecord
     {
         $result = [];
         $decLv = static::find()->where('1=1')->indexBy('ID')->orderBy('SORT ASC')->asArray()->all();
+        $current = $decLv[$decLvID]['SORT'] ?? '';
         foreach ($decLv as $id => $item) {
-            if ($decLvID == $id) {
-                $result = next($decLv);
+            if ($item['SORT'] == $current + 1) {
+                $result = $item;
                 break;
             }
         }