|
|
@@ -71,10 +71,11 @@ class Order extends Model
|
|
|
return $this->hasMany('App\OrderCommodity','order_id','id');
|
|
|
}
|
|
|
public function bin(){
|
|
|
- $bin= $this->hasOne('App\OrderBin','order_id','id');
|
|
|
- if($bin->count()>0)return $bin;
|
|
|
- $this->batch()->first()->assignBins();
|
|
|
return $this->hasOne('App\OrderBin','order_id','id');
|
|
|
+// $bin= $this->hasOne('App\OrderBin','order_id','id');
|
|
|
+// if($bin->count()>0)return $bin;
|
|
|
+// $this->batch()->first()->assignBins();
|
|
|
+// return $this->hasOne('App\OrderBin','order_id','id');
|
|
|
}
|
|
|
public function batch(){
|
|
|
return $this->belongsTo('App\Batch', 'batch_id','id');
|