fixed upload file 2
This commit is contained in:
@@ -30,7 +30,22 @@ class ProductDisplayPriceService
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->isMeltedTradeProduct($product);
|
return $this->isMeltedTradeProduct($product)
|
||||||
|
|| $this->usesQuantityAppPrice($product);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** معامله مقداری با قیمت اپ — نه قیمت دستی قدیمی با price پر در DB */
|
||||||
|
private function usesQuantityAppPrice(Product $product): bool
|
||||||
|
{
|
||||||
|
if (! ($product->trade_by_quantity ?? false)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($product->reading_method || (int) ($product->direct_price ?? 0) === 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int) ($product->price ?? 0) <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user