Skip to content
Snippets Groups Projects
Commit bf7a6380 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix sort on wrong field

parent ec5bd2a8
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -71,7 +72,8 @@ class box_contracts extends ModeleBoxes
$sql.= " AND c.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " ORDER BY c.date_contrat DESC, c.ref DESC ";
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_contrat DESC, c.ref DESC ";
else $sql.= " ORDER BY c.tms DESC, c.ref DESC ";
$sql.= $db->plimit($max, 0);
$resql = $db->query($sql);
......
......@@ -38,7 +38,7 @@ BoxMyLastBookmarks=My latest %s bookmarks
BoxOldestExpiredServices=Oldest active expired services
BoxLastExpiredServices=Latest %s oldest contacts with active expired services
BoxTitleLastActionsToDo=Latest %s actions to do
BoxTitleLastContracts=Latest %s contracts
BoxTitleLastContracts=Latest %s modified contracts
BoxTitleLastModifiedDonations=Latest %s modified donations
BoxTitleLastModifiedExpenses=Latest %s modified expense reports
BoxGlobalActivity=Global activity (invoices, proposals, orders)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment