This commit is contained in:
2026-06-11 16:41:28 +03:30
parent 76563be5cd
commit f329419c3a
4 changed files with 170 additions and 4 deletions
@@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Http;
use \App\Http\Controllers\Customer\FundController;
use App\Http\Controllers\Site\ReportController;
use App\Services\ConfigService;
use App\Services\ProductDisplayPriceService;
use App\Services\ProductPriceService;
use Illuminate\Support\Facades\Schema;
@@ -161,6 +162,10 @@ class ProductController extends SuperController
$products = Product::with(['file'])->where('active', 1)->get();
if (str_contains(request()->path(), '/customer/')) {
app(ProductDisplayPriceService::class)->enrichForApi($products);
}
if (Product::hasPriceOffsetColumn() && str_contains(request()->path(), '/customer/')) {
$products->each(function (Product $product) {
if ($product->reading_method) {