phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.bocommon.inc.php, 1.93, 1.94 class


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] property/inc class.bocommon.inc.php, 1.93, 1.94 class.uientity.inc.php, 1.11, 1.12 class.boadmin_entity.inc.php, 1.9, 1.10 class.soentity.inc.php, 1.12, 1.13 class.socommon.inc.php, 1.39, 1.40 class.uiadmin_entity.inc.php, 1.10, 1.11 class.soadmin_entity.inc.php, 1.12, 1.13 class.bometer.inc.php, 1.7, 1.8 class.someter.inc.php, 1.10, 1.11 class.uimeter.inc.php, 1.18, 1.19 class.sotts.inc.php, 1.31, 1.32 class.uitts.inc.php, 1.41, 1.42 class.botts.inc.php, 1.22, 1.23 class.uidrawing.inc.php, 1.25, 1.26 class.uidocument.inc.php, 1.19, 1.20 class.bodocument.inc.php, 1.10, 1.11 class.sodocument.inc.php, 1.14, 1.15 class.sodrawing.inc.php, 1.11, 1.12 class.bodrawing.inc.php, 1.7, 1.8
Date: Sun, 09 Nov 2003 20:25:13 +0000

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv30363/inc

Modified Files:
        class.bocommon.inc.php class.uientity.inc.php 
        class.boadmin_entity.inc.php class.soentity.inc.php 
        class.socommon.inc.php class.uiadmin_entity.inc.php 
        class.soadmin_entity.inc.php class.bometer.inc.php 
        class.someter.inc.php class.uimeter.inc.php 
        class.sotts.inc.php class.uitts.inc.php class.botts.inc.php 
        class.uidrawing.inc.php class.uidocument.inc.php 
        class.bodocument.inc.php class.sodocument.inc.php 
        class.sodrawing.inc.php class.bodrawing.inc.php 
Log Message:
no message

Index: class.sodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodocument.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** class.sodocument.inc.php    3 Oct 2003 16:01:26 -0000       1.14
--- class.sodocument.inc.php    9 Nov 2003 20:25:11 -0000       1.15
***************
*** 303,324 ****
                        if ($this->db->next_record())
                        {
!                               $document['document_id']                        
= $this->db->f('id');
                                $document['title']                              
= $this->db->f('title');
                                $document['document_name']              = 
$this->db->f('document_name');
                                $document['link']                               
= $this->db->f('link');
-                               $document['equipment_id']               = 
$this->db->f('equipment_id');
                                $document['location_code']              = 
$this->db->f('location_code');
                                $document['branch_id']                  = 
$this->db->f('branch_id');
!                               $document['version']                            
= $this->db->f('version');
                                $document['vendor_id']                  = 
$this->db->f('vendor_id');
                                $document['floor_id']                   = 
$this->db->f('floor_id');
                                $document['descr']                              
= $this->db->f('descr');
                                $document['status']                             
= $this->db->f('status');
!                               $document['user_id']                            
= $this->db->f('user_id');
!                               $document['coordinator']                        
= $this->db->f('coordinator');
                                $document['access']                             
= $this->db->f('access');
                                $document['document_date']              = 
$this->db->f('document_date');
                                $document['cat_id']                             
= $this->db->f('category');
! 
                        }
  
--- 303,325 ----
                        if ($this->db->next_record())
                        {
!                               $document['document_id']                = 
$this->db->f('id');
                                $document['title']                              
= $this->db->f('title');
                                $document['document_name']              = 
$this->db->f('document_name');
                                $document['link']                               
= $this->db->f('link');
                                $document['location_code']              = 
$this->db->f('location_code');
                                $document['branch_id']                  = 
$this->db->f('branch_id');
!                               $document['version']                    = 
$this->db->f('version');
                                $document['vendor_id']                  = 
$this->db->f('vendor_id');
                                $document['floor_id']                   = 
$this->db->f('floor_id');
                                $document['descr']                              
= $this->db->f('descr');
                                $document['status']                             
= $this->db->f('status');
!                               $document['user_id']                    = 
$this->db->f('user_id');
!                               $document['coordinator']                = 
$this->db->f('coordinator');
                                $document['access']                             
= $this->db->f('access');
                                $document['document_date']              = 
$this->db->f('document_date');
                                $document['cat_id']                             
= $this->db->f('category');
!                               $document['p_num']                              
= $this->db->f('p_num');
!                               $document['p_entity_id']                = 
$this->db->f('p_entity_id');
!                               $document['p_cat_id']                   = 
$this->db->f('p_cat_id');
                        }
  

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** class.sotts.inc.php 28 Oct 2003 15:14:38 -0000      1.31
--- class.sotts.inc.php 9 Nov 2003 20:25:11 -0000       1.32
***************
*** 193,200 ****
                                $ticket['details']                      = 
stripslashes($this->db->f('details'));
                                $ticket['location_code']        = 
$this->db->f('location_code');
-                               $ticket['equipment_id']         = 
$this->db->f('equipment_id');
  //                            $ticket['contact_phone']        = 
$this->db->f('contact_phone');
                                $ticket['address']                      = 
$this->db->f('address');
                                $ticket['tenant_id']            = 
$this->db->f('tenant_id');
  
                                $user_id=(int)$this->db->f('user_id');
--- 193,202 ----
                                $ticket['details']                      = 
stripslashes($this->db->f('details'));
                                $ticket['location_code']        = 
$this->db->f('location_code');
  //                            $ticket['contact_phone']        = 
$this->db->f('contact_phone');
                                $ticket['address']                      = 
$this->db->f('address');
                                $ticket['tenant_id']            = 
$this->db->f('tenant_id');
+                               $ticket['p_num']                        = 
$this->db->f('p_num');
+                               $ticket['p_entity_id']          = 
$this->db->f('p_entity_id');
+                               $ticket['p_cat_id']                     = 
$this->db->f('p_cat_id');
  
                                $user_id=(int)$this->db->f('user_id');

Index: class.someter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.someter.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.someter.inc.php       5 Nov 2003 21:15:49 -0000       1.10
--- class.someter.inc.php       9 Nov 2003 20:25:11 -0000       1.11
***************
*** 178,181 ****
--- 178,184 ----
                                $meter['cat_id']                        = 
$this->db->f('category');
                                $meter['location_code']         = 
$this->db->f('location_code');
+                               $meter['p_num']                         = 
$this->db->f('p_num');
+                               $meter['p_entity_id']           = 
$this->db->f('p_entity_id');
+                               $meter['p_cat_id']                      = 
$this->db->f('p_cat_id');
                        }
                        return $meter;

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** class.bocommon.inc.php      6 Nov 2003 18:51:02 -0000       1.93
--- class.bocommon.inc.php      9 Nov 2003 20:25:11 -0000       1.94
***************
*** 101,104 ****
--- 101,109 ----
                }
  
+               function get_start_entity($location='')
+               {
+                       return $this->socommon->get_start_entity($location);
+               }
+ 
                function msgbox_data($receipt)
                {

Index: class.uidrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidrawing.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** class.uidrawing.inc.php     28 Oct 2003 15:14:41 -0000      1.25
--- class.uidrawing.inc.php     9 Nov 2003 20:25:11 -0000       1.26
***************
*** 406,409 ****
--- 406,415 ----
                        $values                         = 
get_var('values',array('POST'));
                        $insert_record          = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
+                       $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
+ 
+                       for ($j=0;$j<count($insert_record_entity);$j++)
+                       {
+                               
$insert_record['extra'][$insert_record_entity[$j]]      = 
$insert_record_entity[$j];
+                       }
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('drawing'));
***************
*** 428,436 ****
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$key]  = 
$_POST[$key];
                                        }
                                }
--- 434,442 ----
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,$column) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$column]       
= $_POST[$key];
                                        }
                                }
***************
*** 495,498 ****
--- 501,511 ----
                                                $values['location_data'] = 
$this->bolocation->read_single($location_code,$values['extra']);
                                        }
+                                       if($values['extra']['p_num'])
+                                       {
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+                                       }
                                }
                        }
***************
*** 528,533 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'equipment'             => True,
!                                               'lookup_type'   => 'form'
                                                ));
  
--- 541,547 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'lookup_type'   => 'form',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('drawing'),
!                                               'entity_data'   => $values['p']
                                                ));
  
***************
*** 741,746 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'equipment'             => 
$values['location_data']['equipment_id'],
!                                               'lookup_type'   => 'view'
                                                ));
  
--- 755,761 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'lookup_type'   => 'view',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('drawing'),
!                                               'entity_data'   => $values['p']
                                                ));
  

Index: class.soentity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** class.soentity.inc.php      6 Nov 2003 18:51:02 -0000       1.12
--- class.soentity.inc.php      9 Nov 2003 20:25:11 -0000       1.13
***************
*** 378,381 ****
--- 378,392 ----
                        }
  
+                       $sql = "SELECT * FROM fm_entity_origin WHERE entity_id 
= $entity_id AND cat_id = $cat_id AND id =$id";
+ 
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       $i=0;
+                       while ($this->db->next_record())
+                       {
+                               $entity['origin'][$i]['id']             = 
$this->db->f('origin_id');
+                               $entity['origin'][$i]['type']   = 
$this->db->f('origin');
+                               $i++;
+                       }
+ 
                        return  $entity;
                }
***************
*** 491,494 ****
--- 502,516 ----
                                . time() . ","
                                . $this->account. " $vals)",__LINE__,__FILE__);
+ 
+                       if($values['origin_type'] && $values['origin_id'])
+                       {
+                               $this->db->query("INSERT INTO fm_entity_origin 
(origin,origin_id,entity_id,cat_id,id) "
+                                       . "VALUES ('"
+                                       . $values['origin_type']. "',"
+                                       . $values['origin_id']. ","
+                                       . $entity_id. ","
+                                       . $cat_id. ","
+                                       . $values['id']. ")",__LINE__,__FILE__);
+                       }
  
                        $this->db->transaction_commit();

Index: class.soadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_entity.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** class.soadmin_entity.inc.php        6 Nov 2003 18:51:02 -0000       1.12
--- class.soadmin_entity.inc.php        9 Nov 2003 20:25:11 -0000       1.13
***************
*** 241,245 ****
                        }
  
!                       $sql = "SELECT location FROM fm_entity_lookup  where 
entity_id='$id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 241,245 ----
                        }
  
!                       $sql = "SELECT location FROM fm_entity_lookup where 
entity_id=$id AND type='lookup'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
***************
*** 250,253 ****
--- 250,262 ----
                        }
  
+                       $sql = "SELECT location FROM fm_entity_lookup where 
entity_id=$id AND type='start'";
+ 
+                       $this->db->query($sql,__LINE__,__FILE__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $entity['start_entity_from'][] = 
$this->db->f('location');
+                       }
+ 
                        return $entity;
                }
***************
*** 546,555 ****
                                if (isset($entity['include_entity_for']) AND 
is_array($entity['include_entity_for']))
                                {
!                                       $this->db->query("DELETE FROM 
fm_entity_lookup WHERE entity_id=" . $entity['id'],__LINE__,__FILE__);
  
                                        foreach($entity['include_entity_for'] 
as $location)
                                        {
!                                               $this->db->query("INSERT INTO 
fm_entity_lookup (entity_id,location)"
!                                               . "VALUES (" .$entity['id'] . 
",'$location' )",__LINE__,__FILE__);
                                        }
                                }
--- 555,575 ----
                                if (isset($entity['include_entity_for']) AND 
is_array($entity['include_entity_for']))
                                {
!                                       $this->db->query("DELETE FROM 
fm_entity_lookup WHERE type='lookup' AND entity_id=" . 
$entity['id'],__LINE__,__FILE__);
  
                                        foreach($entity['include_entity_for'] 
as $location)
                                        {
!                                               $this->db->query("INSERT INTO 
fm_entity_lookup (entity_id,location,type)"
!                                               . "VALUES (" .$entity['id'] . 
",'$location','lookup' )",__LINE__,__FILE__);
!                                       }
!                               }
! 
!                               if (isset($entity['start_entity_from']) AND 
is_array($entity['start_entity_from']))
!                               {
!                                       $this->db->query("DELETE FROM 
fm_entity_lookup WHERE type='start' AND entity_id=" . 
$entity['id'],__LINE__,__FILE__);
! 
!                                       foreach($entity['start_entity_from'] as 
$location)
!                                       {
!                                               $this->db->query("INSERT INTO 
fm_entity_lookup (entity_id,location,type)"
!                                               . "VALUES (" .$entity['id'] . 
",'$location','start' )",__LINE__,__FILE__);
                                        }
                                }

Index: class.uiadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.uiadmin_entity.inc.php        6 Nov 2003 18:51:02 -0000       1.10
--- class.uiadmin_entity.inc.php        9 Nov 2003 20:25:11 -0000       1.11
***************
*** 504,507 ****
--- 504,508 ----
                        $include_list   = 
$this->bo->get_entity_list($values['lookup_entity']);
                        $include_list_2 = 
$this->bo->get_entity_list_2($values['include_entity_for']);
+                       $include_list_3 = 
$this->bo->get_entity_list_3($values['start_entity_from']);
  
                        $link_data = array
***************
*** 542,545 ****
--- 543,549 ----
                                'include_list_2'                                
=> $include_list_2,
                                'lang_include_2_statustext'             => 
lang('Let this entity show up in location form'),
+                               'lang_start_this_entity'                => 
lang('start this entity'),
+                               'include_list_3'                                
=> $include_list_3,
+                               'lang_include_3_statustext'             => 
lang('Start this entity from'),
                                'lang_select'                                   
=> lang('select'),
                        );

Index: class.bodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodocument.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.bodocument.inc.php    3 Oct 2003 16:01:26 -0000       1.10
--- class.bodocument.inc.php    9 Nov 2003 20:25:11 -0000       1.11
***************
*** 290,299 ****
                        }
  
!                       if($document['equipment_id'])
                        {
!                               $document['location_data']['equipment_id']      
        = $document['equipment_id'];
!                               $document['location_data']['equipment_type']    
= $this->bocommon->get_equipment_type($document['equipment_id']);
!                       }
  
  
                        return $document;
--- 290,303 ----
                        }
  
!                       if($document['p_num'])
                        {
!                               $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
!                               $category = 
$soadmin_entity->read_single_category($document['p_entity_id'],$document['p_cat_id']);
  
+                               
$document['p'][$document['p_entity_id']]['p_num']=$document['p_num'];
+                               
$document['p'][$document['p_entity_id']]['p_entity_id']=$document['p_entity_id'];
+                               
$document['p'][$document['p_entity_id']]['p_cat_id']=$document['p_cat_id'];
+                               
$document['p'][$document['p_entity_id']]['p_cat_name'] = $category['name'];
+                       }
  
                        return $document;

Index: class.uidocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** class.uidocument.inc.php    28 Oct 2003 15:14:40 -0000      1.19
--- class.uidocument.inc.php    9 Nov 2003 20:25:11 -0000       1.20
***************
*** 584,588 ****
                        $values                         = 
get_var('values',array('POST'));
                        $insert_record          = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
! //_debug_array($insert_record);
  
                        if(!$from)
--- 584,593 ----
                        $values                         = 
get_var('values',array('POST'));
                        $insert_record          = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
!                       $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
! 
!                       for ($j=0;$j<count($insert_record_entity);$j++)
!                       {
!                               
$insert_record['extra'][$insert_record_entity[$j]]      = 
$insert_record_entity[$j];
!                       }
  
                        if(!$from)
***************
*** 617,625 ****
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$key]  = 
$_POST[$key];
                                        }
                                }
--- 622,630 ----
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,$column) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$column]       
= $_POST[$key];
                                        }
                                }
***************
*** 705,708 ****
--- 710,720 ----
                                                $values['location_data'] = 
$this->bolocation->read_single($location_code,$values['extra']);
                                        }
+                                       if($values['extra']['p_num'])
+                                       {
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+                                       }
                                }
                        }
***************
*** 745,750 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'equipment'             => True,
!                                               'lookup_type'   => 'form'
                                                ));
  
--- 757,763 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'lookup_type'   => 'form',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('document'),
!                                               'entity_data'   => $values['p']
                                                ));
  
***************
*** 976,980 ****
                                                'tenant'                => 
False,
                                                'equipment'             => 
$values['location_data']['equipment_id'],
!                                               'lookup_type'   => 'view'
                                                ));
  
--- 989,995 ----
                                                'tenant'                => 
False,
                                                'equipment'             => 
$values['location_data']['equipment_id'],
!                                               'lookup_type'   => 'view',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('document'),
!                                               'entity_data'   => $values['p']
                                                ));
  

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** class.uitts.inc.php 28 Oct 2003 15:14:37 -0000      1.41
--- class.uitts.inc.php 9 Nov 2003 20:25:11 -0000       1.42
***************
*** 240,243 ****
--- 240,249 ----
                        $values         = get_var('values',array('POST'));
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
+                       $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
+ 
+                       for ($j=0;$j<count($insert_record_entity);$j++)
+                       {
+                               
$insert_record['extra'][$insert_record_entity[$j]]      = 
$insert_record_entity[$j];
+                       }
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('tts'));
***************
*** 254,262 ****
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$key]  = 
$_POST[$key];
                                        }
                                }
--- 260,268 ----
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,$column) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$column]       
= $_POST[$key];
                                        }
                                }
***************
*** 304,307 ****
--- 310,320 ----
                                                $values['location_data'] = 
$bolocation->read_single($location_code,$values['extra']);
                                        }
+                                       if($values['extra']['p_num'])
+                                       {
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+                                       }
                                }
                        }
***************
*** 312,317 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => True,
!                                               'equipment'             => True,
!                                               'lookup_type'   => 'form'
                                                ));
  
--- 325,331 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => True,
!                                               'lookup_type'   => 'form',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('ticket'),
!                                               'entity_data'   => $values['p']
                                                ));
  
***************
*** 430,434 ****
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'equipment_id'          => 
$ticket['equipment_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
--- 444,450 ----
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'p_num'                         => 
$ticket['p_num'],
!                               'p_entity_id'           => 
$ticket['p_entity_id'],
!                               'p_cat_id'                      => 
$ticket['p_cat_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
***************
*** 440,444 ****
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'equipment_id'          => 
$ticket['equipment_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
--- 456,462 ----
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'p_num'                         => 
$ticket['p_num'],
!                               'p_entity_id'           => 
$ticket['p_entity_id'],
!                               'p_cat_id'                      => 
$ticket['p_cat_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
***************
*** 450,454 ****
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'equipment_id'          => 
$ticket['equipment_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
--- 468,474 ----
                                'bypass'                        => true,
                                'location_code'         => 
$ticket['location_code'],
!                               'p_num'                         => 
$ticket['p_num'],
!                               'p_entity_id'           => 
$ticket['p_entity_id'],
!                               'p_cat_id'                      => 
$ticket['p_cat_id'],
                                'tenant_id'                     => 
$ticket['tenant_id'],
                                'ticket_id'                     => $id
***************
*** 484,489 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
$ticket['location_data']['tenant_id'],
!                                               'equipment'             => 
$ticket['location_data']['equipment_id'],
!                                               'lookup_type'   => 'view'
                                                ));
  
--- 504,510 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
$ticket['location_data']['tenant_id'],
!                                               'lookup_type'   => 'view',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('ticket'),
!                                               'entity_data'   => $ticket['p']
                                                ));
  
***************
*** 516,520 ****
                        }
  
! //_debug_array($ticket);
  
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
--- 537,567 ----
                        }
  
! 
!                       $start_entity   = 
$this->bocommon->get_start_entity('ticket');
! //_debug_array($start_entity);
! 
!                       if (isset($start_entity) AND is_array($start_entity))
!                       {
!                               $i=0;
!                               foreach($start_entity as $entry)
!                               {
!                                       $link_entity[$i]['link'] = 
$GLOBALS['phpgw']->link('/index.php',array
!                                       (
!                                               'menuaction'            => 
$this->currentapp.'.uientity.edit',
!                                               'bypass'                        
=> true,
!                                               'location_code'         => 
$ticket['location_code'],
!                                               'entity_id'                     
=> $entry['id'],
!                                               'p_num'                         
=> $ticket['p_num'],
!                                               'p_entity_id'           => 
$ticket['p_entity_id'],
!                                               'p_cat_id'                      
=> $ticket['p_cat_id'],
!                                               'tenant_id'                     
=> $ticket['tenant_id'],
!                                               'ticket_id'                     
=> $id
!                                       ));
!                                       $link_entity[$i]['name']        = 
$entry['name'];
!                               $i++;
!                               }
!                       }
! 
! //_debug_array($link_entity);
  
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
***************
*** 522,525 ****
--- 569,573 ----
                        $data = array
                        (
+                               'link_entity'                                   
=> $link_entity,
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'lang_report'                                   
=> lang('Report'),

Index: class.uimeter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uimeter.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** class.uimeter.inc.php       5 Nov 2003 21:15:49 -0000       1.18
--- class.uimeter.inc.php       9 Nov 2003 20:25:11 -0000       1.19
***************
*** 307,310 ****
--- 307,316 ----
  
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
+                       $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
+ 
+                       for ($j=0;$j<count($insert_record_entity);$j++)
+                       {
+                               
$insert_record['extra'][$insert_record_entity[$j]]      = 
$insert_record_entity[$j];
+                       }
  
                        if ($values['save'])
***************
*** 318,326 ****
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$key]  = 
$_POST[$key];
                                        }
                                }
--- 324,332 ----
                                }
  
!                               while (is_array($insert_record['extra']) && 
list($key,$column) = each($insert_record['extra']))
                                {
                                        if($_POST[$key])
                                        {
!                                               $values['extra'][$column]       
= $_POST[$key];
                                        }
                                }
***************
*** 376,379 ****
--- 382,392 ----
                                                $values['location_data'] = 
$bolocation->read_single($location_code,$values['extra']);
                                        }
+                                       if($values['extra']['p_num'])
+                                       {
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+                                               
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+                                       }
                                }
                        }
***************
*** 408,413 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'equipment'             => 
False,
!                                               'lookup_type'   => 'form'
                                                ));
  
--- 421,427 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'lookup_type'   => 'form',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('meter'),
!                                               'entity_data'   => $values['p']
                                                ));
  
***************
*** 521,526 ****
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'equipment'             => 
False,
!                                               'lookup_type'   => 'view'
                                                ));
  
--- 535,541 ----
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
                                                'tenant'                => 
False,
!                                               'lookup_type'   => 'view',
!                                               'lookup_entity' => 
$this->bocommon->get_lookup_entity('meter'),
!                                               'entity_data'   => $values['p']
                                                ));
  

Index: class.bodrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodrawing.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** class.bodrawing.inc.php     27 Jun 2003 12:43:19 -0000      1.7
--- class.bodrawing.inc.php     9 Nov 2003 20:25:11 -0000       1.8
***************
*** 291,298 ****
                        }
  
!                       if($drawing['equipment_id'])
                        {
!                               $drawing['location_data']['equipment_id']       
        = $drawing['equipment_id'];
!                               $drawing['location_data']['equipment_type']     
= $this->bocommon->get_equipment_type($drawing['equipment_id']);
                        }
  
--- 291,303 ----
                        }
  
!                       if($drawing['p_num'])
                        {
!                               $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
!                               $category = 
$soadmin_entity->read_single_category($drawing['p_entity_id'],$drawing['p_cat_id']);
! 
!                               
$drawing['p'][$drawing['p_entity_id']]['p_num']=$drawing['p_num'];
!                               
$drawing['p'][$drawing['p_entity_id']]['p_entity_id']=$drawing['p_entity_id'];
!                               
$drawing['p'][$drawing['p_entity_id']]['p_cat_id']=$drawing['p_cat_id'];
!                               
$drawing['p'][$drawing['p_entity_id']]['p_cat_name'] = $category['name'];
                        }
  

Index: class.bometer.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bometer.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** class.bometer.inc.php       5 Nov 2003 21:15:49 -0000       1.7
--- class.bometer.inc.php       9 Nov 2003 20:25:11 -0000       1.8
***************
*** 193,196 ****
--- 193,207 ----
                        }
  
+                       if($meter['p_num'])
+                       {
+                               $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
+                               $category = 
$soadmin_entity->read_single_category($meter['p_entity_id'],$meter['p_cat_id']);
+ 
+                               
$meter['p'][$meter['p_entity_id']]['p_num']=$meter['p_num'];
+                               
$meter['p'][$meter['p_entity_id']]['p_entity_id']=$meter['p_entity_id'];
+                               
$meter['p'][$meter['p_entity_id']]['p_cat_id']=$meter['p_cat_id'];
+                               
$meter['p'][$meter['p_entity_id']]['p_cat_name'] = $category['name'];
+                       }
+ 
                        return $meter;
                }

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** class.socommon.inc.php      6 Nov 2003 18:51:02 -0000       1.39
--- class.socommon.inc.php      9 Nov 2003 20:25:11 -0000       1.40
***************
*** 290,294 ****
                function get_lookup_entity($location)
                {
!                       $this->db->query("SELECT entity_id,name FROM 
fm_entity_lookup $this->join fm_entity on 
fm_entity_lookup.entity_id=fm_entity.id where location='$location'  ");
  
                        $i = 0;
--- 290,308 ----
                function get_lookup_entity($location)
                {
!                       $this->db->query("SELECT entity_id,name FROM 
fm_entity_lookup $this->join fm_entity on 
fm_entity_lookup.entity_id=fm_entity.id WHERE type='lookup' AND 
location='$location'  ");
! 
!                       $i = 0;
!                       while ($this->db->next_record())
!                       {
!                               $entity[$i]['id']                               
= $this->db->f('entity_id');
!                               $entity[$i]['name']                             
= $this->db->f('name');
!                               $i++;
!                       }
!                       return $entity;
!               }
! 
!               function get_start_entity($location)
!               {
!                       $this->db->query("SELECT entity_id,name FROM 
fm_entity_lookup $this->join fm_entity on 
fm_entity_lookup.entity_id=fm_entity.id WHERE type='start' AND 
location='$location'  ");
  
                        $i = 0;

Index: class.sodrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodrawing.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** class.sodrawing.inc.php     9 Jul 2003 11:12:16 -0000       1.11
--- class.sodrawing.inc.php     9 Nov 2003 20:25:11 -0000       1.12
***************
*** 205,209 ****
                                $drawing['title']                               
= $this->db->f('title');
                                $drawing['drawing_name']                = 
$this->db->f('drawing_name');
-                               $drawing['equipment_id']                = 
$this->db->f('equipment_id');
                                $drawing['location_code']               = 
$this->db->f('location_code');
                                $drawing['branch_id']                   = 
$this->db->f('branch_id');
--- 205,208 ----
***************
*** 220,224 ****
                                $drawing['drawing_date']                = 
$this->db->f('drawing_date');
                                $drawing['cat_id']                              
= $this->db->f('category');
! 
                        }
  
--- 219,225 ----
                                $drawing['drawing_date']                = 
$this->db->f('drawing_date');
                                $drawing['cat_id']                              
= $this->db->f('category');
!                               $drawing['p_num']                               
= $this->db->f('p_num');
!                               $drawing['p_entity_id']                 = 
$this->db->f('p_entity_id');
!                               $drawing['p_cat_id']                    = 
$this->db->f('p_cat_id');
                        }
  

Index: class.boadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin_entity.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.boadmin_entity.inc.php        6 Nov 2003 18:51:02 -0000       1.9
--- class.boadmin_entity.inc.php        9 Nov 2003 20:25:11 -0000       1.10
***************
*** 175,178 ****
--- 175,187 ----
                }
  
+               function get_entity_list_3($selected='')
+               {
+                       $list[0]['id']='ticket';
+                       $list[0]['name']='ticket';
+                       $list[1]['id']='request';
+                       $list[1]['name']='request';
+                       return 
$this->bocommon->select_multi_list($selected,$list);
+               }
+ 
                function read()
                {

Index: class.uientity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** class.uientity.inc.php      6 Nov 2003 18:51:01 -0000       1.11
--- class.uientity.inc.php      9 Nov 2003 20:25:11 -0000       1.12
***************
*** 46,50 ****
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->acl2                             = 
CreateObject($this->currentapp.'.acl2');
!                       $this->acl2_location            = '.entity.' . 
$this->entity_id . '.' . $this->cat_id;
                        $this->acl_read                         = 
$this->acl2->check($this->acl2_location,1);
                        $this->acl_add                          = 
$this->acl2->check($this->acl2_location,2);
--- 46,57 ----
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->acl2                             = 
CreateObject($this->currentapp.'.acl2');
!                       if(!$this->cat_id)
!                       {
!                               $this->acl2_location            = '.entity.' . 
$this->entity_id;
!                       }
!                       else
!                       {
!                               $this->acl2_location            = '.entity.' . 
$this->entity_id . '.' . $this->cat_id;
!                       }
                        $this->acl_read                         = 
$this->acl2->check($this->acl2_location,1);
                        $this->acl_add                          = 
$this->acl2->check($this->acl2_location,2);
***************
*** 370,374 ****
  
                                'lang_no_cat'                                   
=> lang('no category'),
!                               'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
--- 377,381 ----
  
                                'lang_no_cat'                                   
=> lang('no category'),
!                               'lang_cat_statustext'                   => 
lang('Select the category. To do not use a category select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
***************
*** 448,453 ****
                        $values['vendor_name']          = 
get_var('vendor_name',array('POST'));
                        $values['date']                         = 
get_var('date',array('POST'));
  
- //                    if ($values['save'])
                        if($_POST && !$bypass)
                        {
--- 455,461 ----
                        $values['vendor_name']          = 
get_var('vendor_name',array('POST'));
                        $values['date']                         = 
get_var('date',array('POST'));
+                       $ticket_id                      = 
get_var('ticket_id',array('POST','GET'));
+                       $request_id             = 
get_var('request_id',array('POST','GET'));
  
                        if($_POST && !$bypass)
                        {
***************
*** 479,484 ****
                                $tenant_id                      = 
get_var('tenant_id',array('POST','GET'));
                                $values['descr']        = 
get_var('descr',array('POST','GET'));
-                               $ticket_id                      = 
get_var('ticket_id',array('POST','GET'));
-                               $request_id             = 
get_var('request_id',array('POST','GET'));
                                $p_entity_id            = 
get_var('p_entity_id',array('POST','GET'));
                                $p_cat_id                       = 
get_var('p_cat_id',array('POST','GET'));
--- 487,490 ----
***************
*** 493,509 ****
                                }
  
-                               if($ticket_id)
-                               {
-                                       $values['ticket_id'][0]['id']= 
$ticket_id;
-                                       $values['origin']= 'ticket';
-                                       $values['origin_id']= $ticket_id;
-                               }
- 
-                               if($request_id)
-                               {
-                                       $values['request_id'][0]['id']= 
$request_id;
-                                       $values['origin']= 'request';
-                                       $values['origin_id']= $request_id;
-                               }
  
                                if($location_code)
--- 499,502 ----
***************
*** 514,517 ****
--- 507,523 ----
                        }
  
+                       if($ticket_id)
+                       {
+                               $values['origin'][0]['type']= 'tts';
+                               $values['origin'][0]['id']= $ticket_id;
+                       }
+ 
+                       if($request_id)
+                       {
+                               $values['origin'][0]['type']= 'request';
+                               $values['origin'][0]['id']= $request_id;
+                       }
+ 
+ //_debug_array($values);
                        if ($values['save'])
                        {
***************
*** 575,579 ****
                        else
                        {
!                               $values = 
$this->bo->read_single(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
                        }
  
--- 581,597 ----
                        else
                        {
!                               if($this->cat_id)
!                               {
!                                       $values = 
$this->bo->read_single(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
!                               }
!                       }
! 
!                       if($this->cat_id)
!                       {
!                               $category = 
$this->boadmin_entity->read_single_category($this->entity_id,$this->cat_id);
!                       }
!                       else
!                       {
!                               $cat_list = 
$this->bo->select_category_list('select',$this->cat_id);
                        }
  
***************
*** 581,585 ****
  
                        $entity = 
$this->boadmin_entity->read_single($this->entity_id,false);
-                       $category = 
$this->boadmin_entity->read_single_category($this->entity_id,$this->cat_id);
  
                        if ($id)
--- 599,602 ----
***************
*** 606,609 ****
--- 623,630 ----
                        }
  
+                       if(!$category)
+                       {
+                               
$category['location_level']=count(explode("-",$location_code));
+                       }
                        if($entity['location_form'])
                        {
***************
*** 675,683 ****
                        }
  
! 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
                                'lang_entity'                                   
=> lang('entity'),
                                'entity_name'                                   
=> $entity['name'],
--- 696,722 ----
                        }
  
!                       if(is_array($values['origin']))
!                       {
!                               for ($i=0;$i<count($values['origin']);$i++)
!                               {
!                                       
$values['origin'][$i]['link']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.ui'.$values['origin'][$i]['type'].'.view');
!                                       
$values['origin'][$i]['name']=lang($values['origin'][$i]['type']);
!                               }
!                       }
! //_debug_array($values['origin']);
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
+                               'origin_list'                                   
=> $values['origin'],
+                               'value_origin_type'                             
=> $values['origin'][0]['type'],
+                               'value_origin_id'                               
=> $values['origin'][0]['id'],
+ 
+                               'lang_no_cat'                                   
=> lang('no category'),
+                               'lang_cat_statustext'                   => 
lang('Select the category. To do not use a category select NO CATEGORY'),
+                               'select_name'                                   
=> 'cat_id',
+                               'cat_list'                                      
        => $cat_list,
+                               'location_code'                                 
=> $location_code,
+ 
                                'lang_entity'                                   
=> lang('entity'),
                                'entity_name'                                   
=> $entity['name'],

Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** class.botts.inc.php 28 Oct 2003 15:14:38 -0000      1.22
--- class.botts.inc.php 9 Nov 2003 20:25:11 -0000       1.23
***************
*** 341,348 ****
                        }
  
!                       if($ticket['equipment_id'])
                        {
!                               $ticket['location_data']['equipment_id'] = 
$ticket['equipment_id'];
!                               $ticket['location_data']['equipment_type'] = 
$this->bocommon->get_equipment_type($ticket['equipment_id']);
                        }
  
--- 341,353 ----
                        }
  
!                       if($ticket['p_num'])
                        {
!                               $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
!                               $category = 
$soadmin_entity->read_single_category($ticket['p_entity_id'],$ticket['p_cat_id']);
! 
!                               
$ticket['p'][$ticket['p_entity_id']]['p_num']=$ticket['p_num'];
!                               
$ticket['p'][$ticket['p_entity_id']]['p_entity_id']=$ticket['p_entity_id'];
!                               
$ticket['p'][$ticket['p_entity_id']]['p_cat_id']=$ticket['p_cat_id'];
!                               
$ticket['p'][$ticket['p_entity_id']]['p_cat_name'] = $category['name'];
                        }
  





reply via email to

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