RoomX - Sorting Display

Status
Not open for further replies.

mikehan23

Joined
Feb 5, 2014
Messages
4
Reaction score
0
How can I change the sorting for Room List and Add room by extension or best to be able to sort by clicking on the title of each header?

Could someone show me where and how to modify the files to be able to do this?

Thanks!
 
Hi

About Room List, go to this folder: /var/www/html/modules/rx_room_list/libs
Edit this file: paloSantoRoomList.class.php
Goto this function:

Code:
    function getRoomList($limit, $offset, $filter_field, $filter_value)
    {
        $where = "";
        if(isset($filter_field) & $filter_field !="")
            $where = "where $filter_field like '$filter_value%'";

        $query   = "SELECT * FROM rooms $where ORDER BY extension ASC LIMIT $limit OFFSET $offset ";

        $result=$this->_DB->fetchTable($query, true);

        if($result==FALSE){
            $this->errMsg = $this->_DB->errMsg;
            return array();
        }
        return $result;
    }
Change the SQL request:
Code:
$query   = "SELECT * FROM rooms $where ORDER BY extension ASC LIMIT $limit OFFSET $offset ";
ORDER BY extension ASC is the way to sorting by extensions

About Add Room.
Goto this folder: /var/www/html/modules/rx_add_room/libs
Edit this file: paloSantoAddRoom.class.php
Code:
    function getAddRoom($limit, $offset, $filter_field, $filter_value)
    {
        $where = "";
        if(isset($filter_field) & $filter_field !="")
            $where = "where $filter_field like '$filter_value%'";

        $query   = "SELECT * FROM users $where ORDER BY extension ASC";
        $result=$this->_DB->fetchTable($query, true);

        if($result==FALSE){
            $this->errMsg = $this->_DB->errMsg;
            return array();
        }
        return $result;
    }
Replace the SQL request:
Code:
$query   = "SELECT * FROM users $where ORDER BY extension ASC";

These SQL request will be changed with the next version. (Comming soon i hope).

Regards
 
Since you mention about version. What's the latest version of RoomX with all of the bug fixes? Should I look at SourceForge or just use the version from Elastix Module Addon (1.0.0-91).

Thanks!

By the way, RoomX is awesome!!!!
 
Hmmm the next version is not finished.
There's still some demands to be coded, some test, the rpm... So many works.
For the moment i'm working on the wakeup module for improve it. It may be able to survey the validation when the guest is not awake (wake up setting up by the receptionist). But this function is not enable when the guest setting up the wakeup by the phone. So, i would like to do it.
Next, if i could make a function "Room Change" when a guest needing change the room without launching a checkout and making a checkin into the other room.
There's a bug about the billing. The default rate (the name) is not displayed.
The contextual menu are not done today. (about the new function)

It's some functions that i want include in the next version.

Today the change log:
Fixed - Bad line into checkout screen. "echo $url" was here to debug this module.
Fixed - All buttons into every list are in the good place.
Fixed - Issue when no data is displayed with Booking module.
Fixed - Issue about CID(name) of the guest was not displayed. It was only the room name.
Added - Adding NIF and official document fields into roomx database, in guest table.
Added - Adding NIF information into the billing.
Added - Adding "Payment Mode" into checkout module. This information is stored into the database.
Change- Checkin presentation.
Change- RoomX dial plan has been improved.
Change- The room list and add room are sorted by extension.
Change- A dialog box appears using JQuery code instead of a simple alert box into the menu : Room List.
Added - About Room List, a row "Wakeup" appears with a clock for each scheduled wakeup.
Added - Addind Spanish language (thanks at César A. Hernández Arcas)
Added - Adding a WakeUp Module. Checking all wake up validations for each room and dialing a message to the receptionist for every missing wake up.
 
Status
Not open for further replies.