Update with new price management

This commit is contained in:
Ludovic CANDELLIER
2021-03-22 00:47:44 +01:00
parent 083d358fbd
commit 37ffaa938b
64 changed files with 1118 additions and 984 deletions

View File

@@ -17,9 +17,9 @@ class Price extends Model
return $this->belongsTo('App\Models\Shop\Article');
}
public function price_family()
public function article_family()
{
return $this->belongsTo('App\Models\Shop\PriceFamily');
return $this->belongsTo('App\Models\Shop\ArticleFamily');
}
public function generic()
@@ -29,7 +29,7 @@ class Price extends Model
public function generic_prices()
{
}
public function scopeByArticle($query, $id)
@@ -37,9 +37,9 @@ class Price extends Model
return $query->where('article_id', $id);
}
public function scopeByPriceFamily($query, $id)
public function scopeByArticleFamily($query, $id)
{
return $query->where('price_family_id', $id);
return $query->where('article_family_id', $id);
}
public function scopeGeneric($query)