fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7835] bkbooking: updated completed reservation list


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [7835] bkbooking: updated completed reservation list with new fields
Date: Thu, 06 Oct 2011 09:44:12 +0000

Revision: 7835
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7835
Author:   kjell
Date:     2011-10-06 09:44:12 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
bkbooking: updated completed reservation list with new fields

Modified Paths:
--------------
    trunk/booking/inc/class.uicompleted_reservation.inc.php
    trunk/booking/setup/phpgw_no.lang

Modified: trunk/booking/inc/class.uicompleted_reservation.inc.php
===================================================================
--- trunk/booking/inc/class.uicompleted_reservation.inc.php     2011-10-06 
08:41:33 UTC (rev 7834)
+++ trunk/booking/inc/class.uicompleted_reservation.inc.php     2011-10-06 
09:44:12 UTC (rev 7835)
@@ -165,6 +165,14 @@
                                                        'formatter' => 
'YAHOO.booking.formatGenericLink()',
                                                ),
                                                array(
+                                                       'key' => 'event_id',
+                                                       'label' => lang('Event 
id'),
+                                               ),
+                                               array(
+                                                       'key' => 
'event_description',
+                                                       'label' => 
lang('Description'),
+                                               ),
+                                               array(
                                                        'key' => 
'building_name',
                                                        'label' => 
lang('Building'),
                                                ),
@@ -173,6 +181,10 @@
                                                        'label' => 
lang('Organization'),
                                                ),
                                                array(
+                                                       'key' => 'contact_name',
+                                                       'label' => 
lang('Contact'),
+                                               ),
+                                               array(
                                                        'key' => 
'customer_type',
                                                        'label' => lang('Cust. 
Type'),
                                                ),
@@ -308,7 +320,46 @@
                                if 
(empty($reservation['invoice_file_order_id'])) {
                                        $reservation['invoice_file_order_id'] = 
lang("Not Generated");
                                }
-                               
+
+                               $this->db = & $GLOBALS['phpgw']->db;
+
+                               if ($reservation['reservation_type']['label'] 
== 'Arrangement') {
+                                       $sql = "select description,contact_name 
from bb_event where id=".$reservation['reservation_id'];
+                                       $this->db->limit_query($sql, 0, 
__LINE__, __FILE__, 1);
+                                       $this->db->next_record();
+                                       $reservation['event_id'] = 
$reservation['reservation_id'];
+                                       $reservation['event_description'] = 
$this->db->f('description', false);
+                                       $reservation['contact_name'] = 
$this->db->f('contact_name', false);
+
+                               } elseif 
($reservation['reservation_type']['label'] == 'Booking') {
+                                       $sql = "select  application_id from 
bb_booking where id=".$reservation['reservation_id'];
+                                       $this->db->limit_query($sql, 0, 
__LINE__, __FILE__, 1);
+                                       $this->db->next_record();
+                                       if (!$this->db->f('application_id', 
false)) {
+                                               $reservation['contact_name'] = 
'';
+                                        } else {
+                                               $sql = "select  contact_name 
from bb_application where id=".$this->db->f('application_id', false);
+                                               $this->db->limit_query($sql, 0, 
__LINE__, __FILE__, 1);
+                                               $this->db->next_record();
+                                               $reservation['contact_name'] = 
$this->db->f('contact_name', false);
+                                       }
+                                       $reservation['event_id'] = '';
+                                       $reservation['event_description'] = '';
+                               } else {
+                                       $sql = "select  application_id from 
bb_allocation where id=".$reservation['reservation_id'];
+                                       $this->db->limit_query($sql, 0, 
__LINE__, __FILE__, 1);
+                                       $this->db->next_record();
+                                       if (!$this->db->f('application_id', 
false)) {
+                                               $reservation['contact_name'] = 
'';
+                                        } else {
+                                               $sql = "select  contact_name 
from bb_application where id=".$this->db->f('application_id', false);
+                                               $this->db->limit_query($sql, 0, 
__LINE__, __FILE__, 1);
+                                               $this->db->next_record();
+                                               $reservation['contact_name'] = 
$this->db->f('contact_name', false);
+                                       }
+                                       $reservation['event_id'] = '';
+                                       $reservation['event_description'] = '';
+                               }
                                $reservation['from_'] = 
substr($reservation['from_'], 0, -3);
                                $reservation['to_'] = 
substr($reservation['to_'], 0, -3);
                                $reservation['from_'] = 
pretty_timestamp($reservation['from_']);

Modified: trunk/booking/setup/phpgw_no.lang
===================================================================
--- trunk/booking/setup/phpgw_no.lang   2011-10-06 08:41:33 UTC (rev 7834)
+++ trunk/booking/setup/phpgw_no.lang   2011-10-06 09:44:12 UTC (rev 7835)
@@ -519,3 +519,4 @@
 Documentation  booking no      Dokumentasjon
 Upload manual  booking no      Last opp dokumentasjon
 Are you sure you want to delete?       booking no      Er du sikker på at 
søknad skal avvises?
+Event id       booking no      Arrangement id




reply via email to

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