Try to fix price_lists by sale_channel
This commit is contained in:
@@ -39,4 +39,12 @@ class PriceListValue extends Model
|
||||
{
|
||||
return $query->orderBy('quantity', 'desc')->where($this->table . '.quantity', '<=', $quantity)->first();
|
||||
}
|
||||
|
||||
public function scopeBySaleChannel($query, $sale_channel_id) {
|
||||
return $query->with([
|
||||
'price_list' => function ($query) use ($sale_channel_id) {
|
||||
return $query->bySaleChannel($sale_channel_id);
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user