Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/expensereport/list.php
This commit is contained in:
commit
d66bc10d05
@ -559,6 +559,7 @@ class Conf
|
|||||||
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// For modules that want to disable top or left menu
|
// For modules that want to disable top or left menu
|
||||||
if (! empty($this->global->MAIN_HIDE_TOP_MENU)) $this->dol_hide_topmenu=$this->global->MAIN_HIDE_TOP_MENU;
|
if (! empty($this->global->MAIN_HIDE_TOP_MENU)) $this->dol_hide_topmenu=$this->global->MAIN_HIDE_TOP_MENU;
|
||||||
if (! empty($this->global->MAIN_HIDE_LEFT_MENU)) $this->dol_hide_leftmenu=$this->global->MAIN_HIDE_LEFT_MENU;
|
if (! empty($this->global->MAIN_HIDE_LEFT_MENU)) $this->dol_hide_leftmenu=$this->global->MAIN_HIDE_LEFT_MENU;
|
||||||
|
|||||||
@ -1617,17 +1617,17 @@ else
|
|||||||
// Validation date
|
// Validation date
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
|
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
|
||||||
print '<td>'.dol_print_date($object->date_create,'dayhour');
|
print '<td>'.dol_print_date($object->date_valid,'dayhour');
|
||||||
if ($object->status == 2 && $object->hasDelay('toapprove')) print ' '.img_warning($langs->trans("Late"));
|
if ($object->status == 2 && $object->hasDelay('toapprove')) print ' '.img_warning($langs->trans("Late"));
|
||||||
if ($object->status == 5 && $object->hasDelay('topay')) print ' '.img_warning($langs->trans("Late"));
|
if ($object->status == 5 && $object->hasDelay('topay')) print ' '.img_warning($langs->trans("Late"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// User to inform
|
// User to inform for approval
|
||||||
if ($object->fk_statut < 3) // informed
|
if ($object->fk_statut < 3) // informed
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("VALIDATOR").'</td>';
|
print '<td>'.$langs->trans("VALIDATOR").'</td>'; // approver
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($object->fk_user_validator > 0)
|
if ($object->fk_user_validator > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -984,7 +984,6 @@ class ExpenseReport extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->fk_statut != 2)
|
if ($this->fk_statut != 2)
|
||||||
{
|
{
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
@ -1743,11 +1742,12 @@ class ExpenseReport extends CommonObject
|
|||||||
if ($option == 'topay' && $this->status != 5) return false;
|
if ($option == 'topay' && $this->status != 5) return false;
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
if ($option == 'toapprove')
|
if ($option == 'toapprove')
|
||||||
return $this->datevalid < ($now - $conf->expensereport->approve->warning_delay);
|
{
|
||||||
|
return ($this->datevalid?$this->datevalid:$this->date_valid) < ($now - $conf->expensereport->approve->warning_delay);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return $this->datevalid < ($now - $conf->expensereport->payment->warning_delay);
|
return ($this->datevalid?$this->datevalid:$this->date_valid) < ($now - $conf->expensereport->payment->warning_delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -192,7 +192,7 @@ $pageprev = $page - 1;
|
|||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.total_ttc, d.fk_statut as status,";
|
$sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.total_ttc, d.fk_statut as status,";
|
||||||
$sql.= " d.date_debut, d.date_fin, d.date_valid, d.date_create, d.tms as date_modif,";
|
$sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve,";
|
||||||
$sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.statut, u.photo";
|
$sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.statut, u.photo";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||||
@ -510,10 +510,12 @@ if ($resql)
|
|||||||
$expensereportstatic->ref=$obj->ref;
|
$expensereportstatic->ref=$obj->ref;
|
||||||
$expensereportstatic->status=$obj->status;
|
$expensereportstatic->status=$obj->status;
|
||||||
$expensereportstatic->valid=$obj->date_valid;
|
$expensereportstatic->valid=$obj->date_valid;
|
||||||
$expensereportstatic->date_debut=$obj->date_debut;
|
$expensereportstatic->date_debut=$db->jdate($obj->date_debut);
|
||||||
$expensereportstatic->date_fin=$obj->date_fin;
|
$expensereportstatic->date_fin=$db->jdate($obj->date_fin);
|
||||||
$expensereportstatic->date_create=$obj->date_create;
|
$expensereportstatic->date_create=$db->jdate($obj->date_create);
|
||||||
$expensereportstatic->date_modif=$obj->date_modif;
|
$expensereportstatic->date_modif=$db->jdate($obj->date_modif);
|
||||||
|
$expensereportstatic->date_valid=$db->jdate($objp->date_valid);
|
||||||
|
$expensereportstatic->date_approve=$db->jdate($objp->date_approve);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user