This commit is contained in:
Ludovic CANDELLIER
2022-01-23 21:48:37 +01:00
parent 6db343c6b2
commit 090dcd6f24
2 changed files with 2 additions and 2 deletions

View File

@@ -41,6 +41,6 @@ class PriceListValue extends Model
public function scopeByQuantity($query, $quantity)
{
return $query->orderBy('quantity', 'desc')->where($this->table . '.quantity', '<', $quantity)->first();
return $query->orderBy('quantity', 'desc')->where($this->table . '.quantity', '<=', $quantity)->first();
}
}

View File

@@ -10,7 +10,7 @@ class Shelve extends Model
use HasRelationships;
protected $guarded = ['id'];
protected $table = 'shop_categories';
protected $table = 'categories';
public function articles()
{