fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15209] rental: fix sql


From: sigurdne
Subject: [Fmsystem-commits] [15209] rental: fix sql
Date: Thu, 26 May 2016 18:27:18 +0000 (UTC)

Revision: 15209
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15209
Author:   sigurdne
Date:     2016-05-26 18:27:17 +0000 (Thu, 26 May 2016)
Log Message:
-----------
rental: fix sql

Modified Paths:
--------------
    trunk/rental/inc/class.socomposite.inc.php

Modified: trunk/rental/inc/class.socomposite.inc.php
===================================================================
--- trunk/rental/inc/class.socomposite.inc.php  2016-05-26 18:26:46 UTC (rev 
15208)
+++ trunk/rental/inc/class.socomposite.inc.php  2016-05-26 18:27:17 UTC (rev 
15209)
@@ -209,6 +209,15 @@
                        THEN 'Ikke ledig' ELSE 'Ledig' END as status";
                        }
                        $dir = $ascending ? 'ASC' : 'DESC';
+                       if ($sort_field == 'name')
+                       {
+                               $sort_field = 'rental_composite.name';
+                       }
+                       else if ($sort_field == 'location_code')
+                       {
+                               $sort_field = 'rental_unit.location_code';
+                       }
+
                        $order = $sort_field ? "ORDER BY 
{$this->marshal($sort_field, 'field')} $dir " : '';
                        $this->sort_field = $sort_field;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]