Changeset 21005 for branches/version-2_11-dev/data/class/SC_Product.php
- Timestamp:
- 2011/07/02 01:33:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/SC_Product.php
r20990 r21005 587 587 function reduceStock($productClassId, $quantity) { 588 588 589 $productsClass = $this->getDetailAndProductsClass($productClassId); 590 if (($productsClass['stock_unlimited'] != '1' 591 && $productsClass['stock'] < $quantity) 592 || $quantity == 0) { 589 if ($quantity == 0) { 593 590 return false; 594 591 } … … 599 596 array('stock' => 'stock - ?'), array($quantity)); 600 597 // TODO エラーハンドリング 598 599 $productsClass = $this->getDetailAndProductsClass($productClassId); 600 if ($productsClass['stock_unlimited'] != '1' && $productsClass['stock'] < 0) { 601 return false; 602 } 603 601 604 return true; 602 605 }
Note: See TracChangeset
for help on using the changeset viewer.