From 6c195d7bdf1481f28c96184dd21dc232514972b8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 May 2019 16:54:40 +0200 Subject: [PATCH] Add warning delay for holidays --- htdocs/admin/delais.php | 6 ++++++ htdocs/core/class/conf.class.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index a48be10b4e0..8632b199d39 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -120,6 +120,12 @@ $modules=array( 'img' => 'trip' )*/ ), + 'holiday' => array( + array( + 'code' => 'MAIN_DELAY_HOLIDAYS', + 'img' => 'holiday' + ), + ), ); $labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly")); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 35705b661d9..f8345f3aaf4 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -615,6 +615,10 @@ class Conf $this->expensereport->payment = new stdClass(); $this->expensereport->payment->warning_delay=(isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY)?$this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY:0)*24*60*60; } + if (isset($this->holiday)) { + $this->holiday->approve = new stdClass(); + $this->holiday->approve->warning_delay=(isset($this->global->MAIN_DELAY_HOLIDAYS)?$this->global->MAIN_DELAY_HOLIDAYS:0)*24*60*60; + } if (! empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) {