|
@@ -14,7 +14,7 @@ class GoodCombind extends Model
|
|
protected $updateTime="updatetime";
|
|
protected $updateTime="updatetime";
|
|
protected $append=["usable_stock"];
|
|
protected $append=["usable_stock"];
|
|
|
|
|
|
- public function getUsabelStockAttr($v,$row){
|
|
|
|
|
|
+ public function getUsableStockAttr($v,$row){
|
|
return (new GoodStock())->withJoin(['wsminfo'] , 'left')
|
|
return (new GoodStock())->withJoin(['wsminfo'] , 'left')
|
|
->where(['spuCode'=>$row['childCode'] , 'wsm_type'=>[2 , 5]])
|
|
->where(['spuCode'=>$row['childCode'] , 'wsm_type'=>[2 , 5]])
|
|
->sum('usable_stock');
|
|
->sum('usable_stock');
|