From 63f0b5279d950092d9aa8f451dcb032809132828 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 24 Jul 2024 20:13:01 +0100 Subject: [PATCH] Added check for purchase_date Signed-off-by: snipe --- app/Models/License.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/License.php b/app/Models/License.php index d8bc3f03b1..2680424a84 100755 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -50,7 +50,7 @@ class License extends Depreciable 'category_id' => 'required|exists:categories,id', 'company_id' => 'integer|nullable', 'purchase_cost'=> 'numeric|nullable|gte:0', - 'purchase_date' => 'date_format:Y-m-d|nullable|max:10', + 'purchase_date' => 'date_format:Y-m-d|nullable|max:10|required_with:depreciation_id', 'expiration_date' => 'date_format:Y-m-d|nullable|max:10', 'termination_date' => 'date_format:Y-m-d|nullable|max:10', 'min_amt' => 'numeric|nullable|gte:0',