dever 3 лет назад
Родитель
Сommit
8651898910
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      app/goods/lib/Set.php

+ 6 - 1
app/goods/lib/Set.php

@@ -55,7 +55,12 @@ class Set
                                 $result[$i]['min'] = $other['min'];
                             }
                             if (isset($other['total_num'])) {
-                                $result[$i]['total'] = $other['total_num'] - $other['sell_num'];
+                                if ($col == 'type_id') {
+                                    $result[$i]['total'] = $other['total_num'];
+                                } else {
+                                    $result[$i]['total'] = $other['total_num'] - $other['sell_num'];
+                                }
+                                
                             } else {
                                 $result[$i]['total'] = $other['num'];
                             }