Fix sort on wrong field
This commit is contained in:
parent
ec5bd2a8f8
commit
bf7a6380c9
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* 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
|
* 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
|
* 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;
|
$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->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;
|
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);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ BoxMyLastBookmarks=My latest %s bookmarks
|
|||||||
BoxOldestExpiredServices=Oldest active expired services
|
BoxOldestExpiredServices=Oldest active expired services
|
||||||
BoxLastExpiredServices=Latest %s oldest contacts with active expired services
|
BoxLastExpiredServices=Latest %s oldest contacts with active expired services
|
||||||
BoxTitleLastActionsToDo=Latest %s actions to do
|
BoxTitleLastActionsToDo=Latest %s actions to do
|
||||||
BoxTitleLastContracts=Latest %s contracts
|
BoxTitleLastContracts=Latest %s modified contracts
|
||||||
BoxTitleLastModifiedDonations=Latest %s modified donations
|
BoxTitleLastModifiedDonations=Latest %s modified donations
|
||||||
BoxTitleLastModifiedExpenses=Latest %s modified expense reports
|
BoxTitleLastModifiedExpenses=Latest %s modified expense reports
|
||||||
BoxGlobalActivity=Global activity (invoices, proposals, orders)
|
BoxGlobalActivity=Global activity (invoices, proposals, orders)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user