|
|
@@ -58,8 +58,8 @@ class StoreProductAttrValue extends BaseModel
|
|
|
{
|
|
|
self::beginTrans();
|
|
|
try {
|
|
|
- StoreProduct::where('id', $info['product_id'])->inc('stock', $info['in_stock'])->update();
|
|
|
- self::where('product_id', $info['product_id'])->where('bar_code', $info['bar_code'])->inc('stock', $info['in_stock'])->update();
|
|
|
+ StoreProduct::where('id', $info['product_id'])->inc('stock', (float)$info['in_stock'])->update();
|
|
|
+ self::where('product_id', $info['product_id'])->where('bar_code', $info['bar_code'])->inc('stock', (float)$info['in_stock'])->update();
|
|
|
self::commitTrans();
|
|
|
} catch (Exception $e) {
|
|
|
self::setErrorInfo($e->getMessage(), true);
|