fixed some bugs 2
This commit is contained in:
@@ -610,6 +610,16 @@ class ProductController extends SuperController
|
||||
}
|
||||
|
||||
if (!Product::hasOrderLimitColumns()) {
|
||||
$requestedLimit = filter_var($data['order_limit_enabled'] ?? false, FILTER_VALIDATE_BOOLEAN)
|
||||
|| $this->normalizeOrderLimitCash($data['min_order_cash'] ?? null) !== null
|
||||
|| $this->normalizeOrderLimitCash($data['max_order_cash'] ?? null) !== null;
|
||||
|
||||
if ($requestedLimit) {
|
||||
throw new UnprocessableEntityHttpException(
|
||||
'ستونهای محدودیت مبلغ سفارش در دیتابیس وجود ندارد. مایگریشن را اجرا کنید: php artisan migrate — یا اسکریپت database/sql/add_product_order_limit_columns.sql'
|
||||
);
|
||||
}
|
||||
|
||||
unset($data['order_limit_enabled'], $data['min_order_cash'], $data['max_order_cash']);
|
||||
} else {
|
||||
$min = $this->normalizeOrderLimitCash($data['min_order_cash'] ?? null);
|
||||
|
||||
Reference in New Issue
Block a user