fixed upload file 2

This commit is contained in:
2026-06-23 15:55:12 +03:30
parent ea4e8d73a5
commit c7638918ff
+16 -1
View File
@@ -30,7 +30,22 @@ class ProductDisplayPriceService
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;
}
/**