A free open source IT asset/license management system
Add additional condition
Marcus Moore2a71877becb9
diff --git a/app/Http/Requests/StoreAssetRequest.php b/app/Http/Requests/StoreAssetRequest.phpindex bbf3a98442..007dd26843 100644--- a/app/Http/Requests/StoreAssetRequest.php+++ b/app/Http/Requests/StoreAssetRequest.php@@ -4,6 +4,7 @@ namespace App\Http\Requests;use App\Models\Asset;use App\Models\Company;+use App\Models\Setting;use Carbon\Carbon;use Carbon\Exceptions\InvalidFormatException;use Illuminate\Support\Facades\Gate;@@ -47,7 +48,7 @@ class StoreAssetRequest extends ImageUploadRequest{$modelRules = (new Asset)->getRules();- if (is_string($this->input('purchase_cost'))) {+ if (Setting::getSettings()->digit_separator === '1.234,56' && is_string($this->input('purchase_cost'))) {// If purchase_cost was submitted as a string with a comma separator// then we need to ignore the normal numeric rules.// Since the original rules still live on the model they will be run