diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 41b2f489904..597327c04ba 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -112,7 +112,12 @@ $modules=array( array( 'code' => 'MAIN_DELAY_EXPENSEREPORTS', 'img' => 'trip' - ) + ), + /* TODO Enable this + array( + 'code' => 'MAIN_DELAY_EXPENSEREPORTS_TO_PAY', + 'img' => 'trip' + )*/ ), ); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index abe672dee68..189d5327666 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -553,6 +553,8 @@ class Conf $this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60; } if (isset($this->expensereport)) { + $this->expensereport->approve = new stdClass(); + $this->expensereport->approve->warning_delay=(isset($this->global->MAIN_DELAY_EXPENSEREPORTS)?$this->global->MAIN_DELAY_EXPENSEREPORTS:0)*24*60*60; $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; } diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index ad82cb21a89..1507d236698 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -86,6 +86,20 @@ class modExpenseReport extends DolibarrModules $this->const[$r][4] = 0; $r++; + $this->const[$r][0] = "MAIN_DELAY_EXPENSEREPORTS"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "15"; + $this->const[$r][3] = 'Tolerance delay (in days) before alert for expense reports to approve'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "MAIN_DELAY_EXPENSEREPORTS_TO_PAY"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "15"; + $this->const[$r][3] = 'Tolerance delay (in days) before alert for expense reports to pay'; + $this->const[$r][4] = 0; + $r++; + // Array to add new pages in new tabs $this->tabs = array();