Fix warning for expense report late

This commit is contained in:
Laurent Destailleur 2016-12-22 15:33:43 +01:00
parent d08857d2c6
commit 77c320a092
3 changed files with 22 additions and 1 deletions

View File

@ -112,7 +112,12 @@ $modules=array(
array( array(
'code' => 'MAIN_DELAY_EXPENSEREPORTS', 'code' => 'MAIN_DELAY_EXPENSEREPORTS',
'img' => 'trip' 'img' => 'trip'
) ),
/* TODO Enable this
array(
'code' => 'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',
'img' => 'trip'
)*/
), ),
); );

View File

@ -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; $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)) { 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 = 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; $this->expensereport->payment->warning_delay=(isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY)?$this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY:0)*24*60*60;
} }

View File

@ -86,6 +86,20 @@ class modExpenseReport extends DolibarrModules
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$r++; $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 // Array to add new pages in new tabs
$this->tabs = array(); $this->tabs = array();