From df07a1b90cc638ca79b4fd939552130557843a92 Mon Sep 17 00:00:00 2001 From: Thetsmr Date: Wed, 8 Nov 2023 19:10:13 +0100 Subject: [PATCH] Fix date end --- front/resource.remove.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/front/resource.remove.php b/front/resource.remove.php index 9595fd4..6eab3a0 100644 --- a/front/resource.remove.php +++ b/front/resource.remove.php @@ -41,12 +41,13 @@ } if (empty($_POST["date_end"])) { - if(isset($_POST["resignation_date"]) && !empty($_POST["resignation_date"]) ) { + if (isset($_POST["resignation_date"]) && !empty($_POST["resignation_date"]) ) { $_POST["date_end"] = $_POST["resignation_date"]; - }else { + } else if (isset($_POST["effective_leaving_date"]) && !empty($_POST["effective_leaving_date"]) ) { + $_POST["date_end"] = $_POST["effective_leaving_date"]; + } else { $_POST["date_end"] = date("Y-m-d"); } - } $resource = new PluginResourcesResource();