fix bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user