Update with new price management
This commit is contained in:
@@ -17,9 +17,9 @@ class ArticlePrice extends Model
|
||||
return $this->hasOne('App\Models\Price');
|
||||
}
|
||||
|
||||
public function priceFamilyValue()
|
||||
public function article_family()
|
||||
{
|
||||
return $this->belongsTo('App\Models\PriceFamilyValue');
|
||||
return $this->belongsTo('App\Models\ArticleFamily');
|
||||
}
|
||||
|
||||
public function scopeByQuantity($query, $quantity)
|
||||
@@ -27,8 +27,8 @@ class ArticlePrice extends Model
|
||||
return $query->orderBy('quantity', 'desc')->where('quantity', '<', $quantity)->first();
|
||||
}
|
||||
|
||||
public function scopeByPriceFamilyValue($query, $id)
|
||||
public function scopeByFamily($query, $id)
|
||||
{
|
||||
return $query->where('price_family_value_id', $id);
|
||||
return $query->where('article_family_value_id', $id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user