dever 3 years ago
parent
commit
fe4deb0694
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/goods/lib/Set.php

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

@@ -123,7 +123,13 @@ class Set
                                         $children['min'] = $other_sku['min'];
                                     }
                                     if (isset($other_sku['total_num'])) {
-                                        $children['total'] = $other_sku['total_num'] - $other_sku['sell_num'];
+                                        if ($col == 'type_id') {
+                                            $children['total'] = $other_sku['total_num'];
+                                        } else {
+                                            $children['total'] = $other_sku['total_num'] - $other_sku['sell_num'];
+                                        }
+                                        
+                                        
                                     } else {
                                         $children['total'] = $other_sku['num'];
                                     }