6
0
Fork 0
panliang 2022-07-15 12:21:18 +08:00
parent 665e2b11cf
commit 4cc1ab4629
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ class ProductSku extends Model
public function getSaleableStockAttribute(): int
{
if ($this->isOnline()) {
if ($this->is_pre_sale || $this->spu->is_pre_sale) {
if ($this->is_pre_sale || $this->spu?->is_pre_sale) {
return 99999;
}
return $this->attributes['stock'];