Skip to content

A free open source IT asset/license management system

prep for val

akemidxcf1bccfd6527
diff --git a/app/Http/Requests/CustomAssetReportRequest.php b/app/Http/Requests/CustomAssetReportRequest.php
index 16bbe1006f..074db091a5 100644
--- a/app/Http/Requests/CustomAssetReportRequest.php
+++ b/app/Http/Requests/CustomAssetReportRequest.php
@@ -14,6 +14,15 @@ class CustomAssetReportRequest extends Request
return true;
}
+
+ public function prepareForValidation()
+ {
+ if($this->filled('purchase_cost_end') && !$this->filled('purchase_cost_start')){
+ $this->merge(['purchase_cost_start' => 0 ]);
+ }
+ }
+
+
/**
* Get the validation rules that apply to the request.
*