Close #19587 : box_action order by to datep

This commit is contained in:
lmarcouiller 2022-07-11 11:22:19 +02:00
parent e48fa05f9c
commit ce2bf519d5
2 changed files with 4 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class box_actions extends ModeleBoxes
{
public $boxcode = "lastactions";
public $boximg = "object_action";
public $boxlabel = "BoxLastActions";
public $boxlabel = "BoxOldestActions";
public $depends = array("agenda");
/**
@ -82,7 +82,7 @@ class box_actions extends ModeleBoxes
$societestatic = new Societe($this->db);
$actionstatic = new ActionComm($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastActionsToDo", $max));
$this->info_box_head = array('text' => $langs->trans("BoxTitleOldestActionsToDo", $max));
if ($user->rights->agenda->myactions->read) {
$sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage";
@ -108,7 +108,7 @@ class box_actions extends ModeleBoxes
if (empty($user->rights->agenda->allactions->read)) {
$sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id).")";
}
$sql .= " ORDER BY a.datec DESC";
$sql .= " ORDER BY a.datep ASC";
$sql .= $this->db->plimit($max, 0);
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);

View File

@ -46,6 +46,7 @@ BoxMyLastBookmarks=Bookmarks: latest %s
BoxOldestExpiredServices=Oldest active expired services
BoxLastExpiredServices=Latest %s oldest contacts with active expired services
BoxTitleLastActionsToDo=Latest %s actions to do
BoxTitleOldestActionsToDo=Oldest %s event to do not completed
BoxTitleLastContracts=Latest %s contracts which were modified
BoxTitleLastModifiedDonations=Latest %s donations which were modified
BoxTitleLastModifiedExpenses=Latest %s expense reports which were modified