function uc_stock_adjust in Ubercart 5
Same name and namespace in other branches
- 8.4 uc_stock/uc_stock.module \uc_stock_adjust()
- 6.2 uc_stock/uc_stock.module \uc_stock_adjust()
- 7.3 uc_stock/uc_stock.module \uc_stock_adjust()
Adjust the product stock level by a set amount.
Parameters
$sku: The product SKU of the stock level to adjust.
$qty: The amount to add to or subtract from the stock level.
1 call to uc_stock_adjust()
- uc_stock_action_decrement_stock in uc_stock/
uc_stock_workflow.inc
File
- uc_stock/
uc_stock.module, line 349
Code
function uc_stock_adjust($sku, $qty) {
db_query("UPDATE {uc_product_stock} SET stock = stock + %d WHERE sku = '%s'", $qty, $sku);
}