Browse Source

Bin的逻辑冲突

LD 5 years ago
parent
commit
c15d00e827
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app/Order.php

+ 4 - 3
app/Order.php

@@ -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');