phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.uiwo_hour.inc.php,1.29,1.30 c


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.uiwo_hour.inc.php,1.29,1.30 class.uireport.inc.php,1.8,1.9 class.uidocument.inc.php,1.10,1.11 class.soreport.inc.php,1.4,1.5 class.soproject.inc.php,1.23,1.24 class.boreport.inc.php,1.5,1.6 class.bodocument.inc.php,1.6,1.7
Date: Thu, 26 Jun 2003 05:02:08 -0400

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

Modified Files:
        class.uiwo_hour.inc.php class.uireport.inc.php 
        class.uidocument.inc.php class.soreport.inc.php 
        class.soproject.inc.php class.boreport.inc.php 
        class.bodocument.inc.php 
Log Message:
no message

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uiwo_hour.inc.php     24 Jun 2003 10:26:40 -0000      1.29
--- class.uiwo_hour.inc.php     26 Jun 2003 09:02:06 -0000      1.30
***************
*** 52,55 ****
--- 52,57 ----
                        $this->config                           = 
CreateObject('phpgwapi.config');
  
+                       $this->config->read_repository();
+ 
                        $this->acl2                             = 
CreateObject($this->currentapp.'.acl2');
                        $this->acl_read                         = 
$this->acl2->check('.project',1);
***************
*** 166,171 ****
  
  
                        $addition_percentage = $sum_hour * 
$workorder['addition_percentage']/100;
!                       $sum_tax        = ($sum_hour + $addition_percentage + 
$workorder['addition_rs'])*0.24;
                        $total_sum      = $sum_hour + $addition_percentage + 
$workorder['addition_rs'] + $sum_tax;
  
--- 168,175 ----
  
  
+                       $tax = $this->config->config_data['fm_tax'];
+ 
                        $addition_percentage = $sum_hour * 
$workorder['addition_percentage']/100;
!                       $sum_tax        = ($sum_hour + $addition_percentage + 
$workorder['addition_rs'])*$tax/100;
                        $total_sum      = $sum_hour + $addition_percentage + 
$workorder['addition_rs'] + $sum_tax;
  
***************
*** 531,535 ****
                                $subject = lang('Workorder').": ".$workorder_id;
  
!                               $this->config->read_repository();
  
                                $mail_method= 
$this->config->config_data['fmwrkorder_mail'];
--- 535,539 ----
                                $subject = lang('Workorder').": ".$workorder_id;
  
! //                            $this->config->read_repository();
  
                                $mail_method= 
$this->config->config_data['fmwrkorder_mail'];

Index: class.uireport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uireport.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uireport.inc.php      25 Jun 2003 18:27:48 -0000      1.8
--- class.uireport.inc.php      26 Jun 2003 09:02:06 -0000      1.9
***************
*** 35,38 ****
--- 35,39 ----
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       $this->config                           = 
CreateObject('phpgwapi.config',$this->currentapp);
  
                        $this->bo                                       = 
CreateObject($this->currentapp.'.boreport',True);
***************
*** 168,172 ****
                                                                                
));
                                        }
!                                       if($uicols['name'][$i]=='num')
                                        {
                                                $table_header[$i]['sort_link']  
=true;
--- 169,173 ----
                                                                                
));
                                        }
!                                       if($uicols['name'][$i]=='report_id')
                                        {
                                                $table_header[$i]['sort_link']  
=true;
***************
*** 174,178 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'num',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uireport.index',
--- 175,179 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'report_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uireport.index',
***************
*** 572,575 ****
--- 573,579 ----
  
  
+                       $this->config->read_repository();
+                       $link_to_files = 
$this->config->config_data['files_url'];
+ 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
***************
*** 579,582 ****
--- 583,587 ----
                                'property_id'                                   
=> $values['location']['loc1'],
                                'link_view_file'                                
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uireport.view_file&loc1='
 . $values['location_data']['loc1'] . '&report_id=' . $id),
+                               'link_to_files'                                 
=> $link_to_files,
                                'files'                                         
        => $values['files'],
                                'lang_files'                                    
=> lang('files'),

Index: class.uidocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uidocument.inc.php    12 Jun 2003 20:51:13 -0000      1.10
--- class.uidocument.inc.php    26 Jun 2003 09:02:06 -0000      1.11
***************
*** 36,43 ****
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
-                       $this->grants                           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
-                       $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
                        $this->bo                                       = 
CreateObject($this->currentapp.'.bodocument',True);
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
                        $this->rootdir                          = 
$this->bo->rootdir;
                        $this->fakebase                         = 
$this->bo->fakebase;
--- 36,42 ----
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bo                                       = 
CreateObject($this->currentapp.'.bodocument',True);
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon');
+                       $this->bolocation                       = 
CreateObject($this->currentapp.'.bolocation');
                        $this->rootdir                          = 
$this->bo->rootdir;
                        $this->fakebase                         = 
$this->bo->fakebase;
***************
*** 253,273 ****
                        $equipment_id = 
get_var('equipment_id',array('POST','GET'));
  
!                       
$location=$this->bocommon->read_location_data($location_code);
  
!                       
$location_data=$this->bocommon->initiate_ui_location(array(
!                                               'location_type' => 'view',
                                                'equipment'             => 
$equipment_id,
!                                               'entrance'              => true,
!                                               'address'               => true,
!                                               'apartment'             => 
$location['apartment_id'],
!                                               'equipment_id'  => 
$equipment_id,
!                                               'property_id'   => 
$location['property_id'],
!                                               'property_name' => 
$location['property_name'],
!                                               'building_id'   => 
$location['building_id'],
!                                               'entrance_id'   => 
$location['entrance_id'],
!                                               'floor'                 => 
$location['floor'],
!                                               'street_name'   => 
$location['street_name'],
!                                               'street_number' => 
$location['street_number'],
!                                               'apartment_id'  => 
$location['apartment_id']));
  
  //_debug_array($receipt);
--- 252,265 ----
                        $equipment_id = 
get_var('equipment_id',array('POST','GET'));
  
!                       
$location=$this->bo->read_location_data($location_code,$equipment_id);
  
!                       
$location_data=$this->bolocation->initiate_ui_location(array(
!                                               'values'                => 
$location,
!                                               'type_id'               => 
count(explode('-',$location_code)),
!                                               'no_link'               => 
False, // disable lookup links for location type less than type_id
!                                               'tenant'                => 
False,
                                                'equipment'             => 
$equipment_id,
!                                               'lookup_type'   => 'view'
!                                               ));
  
  //_debug_array($receipt);

Index: class.soreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soreport.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.soreport.inc.php      25 Jun 2003 18:27:48 -0000      1.4
--- class.soreport.inc.php      26 Jun 2003 09:02:06 -0000      1.5
***************
*** 149,153 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where fm_report.property_id 
LIKE '%$query%' or fm_report.title LIKE '%$query%' or fm_report.address LIKE 
'%$query%'";
                        }
  
--- 149,153 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where fm_report.location_code 
LIKE '%$query%' or fm_report.title LIKE '%$query%' or fm_report.address LIKE 
'%$query%'";
                        }
  

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.soproject.inc.php     24 Jun 2003 13:07:40 -0000      1.23
--- class.soproject.inc.php     26 Jun 2003 09:02:06 -0000      1.24
***************
*** 289,293 ****
                function get_power_meter($location_code = '')
                {
!                       $this->db2->query("SELECT name as power_meter FROM 
fm_meter where location_code='$location_code' and 
type='power_meter'",__LINE__,__FILE__);
  
                        $this->db2->next_record();
--- 289,293 ----
                function get_power_meter($location_code = '')
                {
!                       $this->db2->query("SELECT name as power_meter FROM 
fm_meter where location_code='$location_code' and 
category='1'",__LINE__,__FILE__);
  
                        $this->db2->next_record();

Index: class.boreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boreport.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.boreport.inc.php      25 Jun 2003 18:27:49 -0000      1.5
--- class.boreport.inc.php      26 Jun 2003 09:02:06 -0000      1.6
***************
*** 249,252 ****
--- 249,256 ----
                                     'string' => $this->fakebase. SEP . 
'report' .  SEP . $report['location_data']['loc1'] .  SEP . $report_id,
                                     'relatives' => array(RELATIVE_NONE)));
+                       if(!$report['files'][0]['file_id'])
+                       {
+                               unset($report['files']);
+                       }
  
  //_debug_array($report);
***************
*** 387,395 ****
                                                        )))
                                                        {
!                                                               
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'. 
$this->fakebase. SEP . 'report'. SEP . $location[0]. SEP . 
$report['delete_file'][$i]);
                                                        }
                                                        else
                                                        {
!                                                               
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'. 
$this->fakebase. SEP . 'report'. SEP . $location[0]. SEP . 
$report['delete_file'][$i]);
                                                        }
                                                        
$this->vfs->override_acl = 0;
--- 391,399 ----
                                                        )))
                                                        {
!                                                               
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'. 
$this->fakebase. SEP . 'report'. SEP . $location[0]. SEP . $report['report_id'] 
. SEP .$report['delete_file'][$i]);
                                                        }
                                                        else
                                                        {
!                                                               
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'. 
$this->fakebase. SEP . 'report'. SEP . $location[0]. SEP . $report['report_id'] 
. SEP . $report['delete_file'][$i]);
                                                        }
                                                        
$this->vfs->override_acl = 0;

Index: class.bodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodocument.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.bodocument.inc.php    23 May 2003 08:40:19 -0000      1.6
--- class.bodocument.inc.php    26 Jun 2003 09:02:06 -0000      1.7
***************
*** 29,36 ****
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so                       = 
CreateObject($this->currentapp.'.sodocument');
-                       $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
                        $this->historylog       = 
CreateObject($this->currentapp.'.historylog','document');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
                        $this->vfs                      = 
CreateObject('phpgwapi.vfs');
                        $this->rootdir          = $this->vfs->basedir;
--- 29,37 ----
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so                       = 
CreateObject($this->currentapp.'.sodocument');
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
+                       $this->solocation       = 
CreateObject($this->currentapp.'.solocation');
                        $this->historylog       = 
CreateObject($this->currentapp.'.historylog','document');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+ 
                        $this->vfs                      = 
CreateObject('phpgwapi.vfs');
                        $this->rootdir          = $this->vfs->basedir;
***************
*** 287,291 ****
                                if($document[$i]['equipment_id'])
                                {
!                                       $document[$i]['equipment_type'] = 
$this->socommon->get_equipment_type($document[$i]['equipment_id']);
                                }
                                $document[$i]['coordinator'] = 
$GLOBALS['phpgw']->accounts->id2name($document[$i]['coordinator']);
--- 288,292 ----
                                if($document[$i]['equipment_id'])
                                {
!                                       $document[$i]['equipment_type'] = 
$this->bocommon->get_equipment_type($document[$i]['equipment_id']);
                                }
                                $document[$i]['coordinator'] = 
$GLOBALS['phpgw']->accounts->id2name($document[$i]['coordinator']);
***************
*** 309,313 ****
                                if($document[$i]['equipment_id'])
                                {
!                                       $document[$i]['equipment_type'] = 
$this->socommon->get_equipment_type($document[$i]['equipment_id']);
                                }
                                $document[$i]['owner'] = 
$GLOBALS['phpgw']->accounts->id2name($document[$i]['owner']);
--- 310,314 ----
                                if($document[$i]['equipment_id'])
                                {
!                                       $document[$i]['equipment_type'] = 
$this->bocommon->get_equipment_type($document[$i]['equipment_id']);
                                }
                                $document[$i]['owner'] = 
$GLOBALS['phpgw']->accounts->id2name($document[$i]['owner']);
***************
*** 328,332 ****
                        $document['vendor_email']               = 
$vendor[0]['email'];
  
!                       
$location_data=$this->socommon->read_location_data($document['location_code']);
  
                        $document=$document + $location_data;
--- 329,333 ----
                        $document['vendor_email']               = 
$vendor[0]['email'];
  
!       //              
$location_data=$this->socommon->read_location_data($document['location_code']);
  
                        $document=$document + $location_data;
***************
*** 335,338 ****
--- 336,352 ----
                }
  
+               function read_location_data($location_code,$equipment_id)
+               {
+                       $location_data=         
$this->solocation->read_single($location_code);
+ 
+                       if($equipment_id)
+                       {
+                               $location_data['equipment_id'] = $equipment_id;
+                               $location_data['equipment_type'] = 
$this->bocommon->get_equipment_type($equipment_id);
+                       }
+ 
+                       return $location_data;
+ 
+               }
  
                function read_record_history($id)





reply via email to

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