Fix on tarif with sale_channel
This commit is contained in:
@@ -53,7 +53,14 @@ class Tariff extends Model
|
||||
->orWhere($this->table . '.code', 'LIKE', "${str}%");
|
||||
}
|
||||
|
||||
public function scopeBySaleChanelDefault($query, $id)
|
||||
public function scopeBySaleChannel($query, $id)
|
||||
{
|
||||
return $query->active()->whereHas('price_lists', function ($query) use ($id) {
|
||||
$query->bySaleChannel($id);
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeBySaleChannelDefault($query, $id)
|
||||
{
|
||||
return $query->where($this->table . '.sale_channel_id', $id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user