phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php, 1.40, 1


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php, 1.40, 1.41 class.bocommon.inc.php, 1.75, 1.76 class.soproject.inc.php, 1.38, 1.39 class.soworkorder.inc.php, 1.26, 1.27 class.soXport.inc.php, 1.34, 1.35 class.uiwo_hour.inc.php, 1.36, 1.37 class.uiproject.inc.php, 1.44, 1.45 class.sowo_hour.inc.php, 1.14, 1.15 class.bolocation.inc.php, 1.27, 1.28 class.uiinvoice.inc.php, 1.34, 1.35 hook_settings.inc.php, 1.11, 1.12 class.socommon.inc.php, 1.36, 1.37 class.uilocation.inc.php, 1.28, 1.29 class.uigab.inc.php, 1.14, 1.15
Date: Thu, 18 Sep 2003 10:00:51 -0400

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

Modified Files:
        class.uiworkorder.inc.php class.bocommon.inc.php 
        class.soproject.inc.php class.soworkorder.inc.php 
        class.soXport.inc.php class.uiwo_hour.inc.php 
        class.uiproject.inc.php class.sowo_hour.inc.php 
        class.bolocation.inc.php class.uiinvoice.inc.php 
        hook_settings.inc.php class.socommon.inc.php 
        class.uilocation.inc.php class.uigab.inc.php 
Log Message:
no message

Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** class.uiworkorder.inc.php   15 Sep 2003 18:28:43 -0000      1.40
--- class.uiworkorder.inc.php   18 Sep 2003 14:00:49 -0000      1.41
***************
*** 340,344 ****
                                'select_user_name'                              
=> 'filter',
                                'lang_no_user'                                  
=> lang('No user'),
!                               'user_list'                                     
        => 
$this->bocommon->get_user_list('filter',$this->filter,array('all'),$default=''),
  
                                'lang_searchvendor_statustext'  => lang('Enter 
the vendor name to search for'),
--- 340,344 ----
                                'select_user_name'                              
=> 'filter',
                                'lang_no_user'                                  
=> lang('No user'),
!                               'user_list'                                     
        => 
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
  
                                'lang_searchvendor_statustext'  => lang('Enter 
the vendor name to search for'),
***************
*** 566,569 ****
--- 566,575 ----
                                $prefs = 
$this->bocommon->create_preferences($this->currentapp,$supervisor_id);
                                $supervisor_email = $prefs['email'];
+                       }
+ 
+                       
$project_status=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['project_status'];
+                       if(!$values['status'])
+                       {
+                               $values['status']=$project_status;
                        }
  

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -r1.75 -r1.76
*** class.bocommon.inc.php      10 Sep 2003 14:36:23 -0000      1.75
--- class.bocommon.inc.php      18 Sep 2003 14:00:49 -0000      1.76
***************
*** 301,304 ****
--- 301,367 ----
                }
  
+               function 
get_user_list_right2($format='',$right='',$selected='',$acl_location='',$extra='',$default='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_select'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_filter'));
+                                       break;
+                       }
+ 
+                       if(!$selected && $default)
+                       {
+                               $selected = $default;
+                       }
+ 
+                       if (isset($extra) AND is_array($extra))
+                       {
+                               foreach($extra as $extra_user)
+                               {
+                                       $users_extra[]=array
+                                       (
+                                               'account_id' => $extra_user,
+                                               'account_firstname' => 
lang($extra_user)
+                                       );
+                               }
+                       }
+ 
+                       
$users=$this->socommon->get_user_list_right($right,$acl_location);
+ 
+                       if (is_array($users_extra) && is_array($users))
+                       {
+                               $users = $users_extra + $users;
+                       }
+ 
+                       while (is_array($users) && list(,$user) = each($users))
+                       {
+                               $sel_user = '';
+                               if ($user['account_id']==$selected)
+                               {
+                                       $sel_user = 'selected';
+                               }
+ 
+                               $user_list[] = array
+                               (
+                                       'user_id'               => 
$user['account_id'],
+                                       'name'          => 
$user['account_lastname'].' '.$user['account_firstname'],
+                                       'selected'      => $sel_user
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($user_list);$i++)
+                       {
+                               if ($user_list[$i]['selected'] != 'selected')
+                               {
+                                       unset($user_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $user_list;
+               }
+ 
  
                function initiate_ui_vendorlookup($data)

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** class.soproject.inc.php     15 Sep 2003 18:28:43 -0000      1.38
--- class.soproject.inc.php     18 Sep 2003 14:00:49 -0000      1.39
***************
*** 109,113 ****
                                        $start=0;
                                }
!                               $filter = 
(isset($data['filter'])?$data['filter']:'');
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
--- 109,113 ----
                                        $start=0;
                                }
!                               $filter = 
$data['filter']?$data['filter']:$this->account;
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');

Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** class.soworkorder.inc.php   15 Sep 2003 18:28:43 -0000      1.26
--- class.soworkorder.inc.php   18 Sep 2003 14:00:49 -0000      1.27
***************
*** 124,128 ****
                                        $start=0;
                                }
!                               $filter = 
(isset($data['filter'])?$data['filter']:'');
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
--- 124,128 ----
                                        $start=0;
                                }
!                               $filter = 
$data['filter']?$data['filter']:$this->account;
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');

Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** class.soXport.inc.php       11 Sep 2003 13:59:47 -0000      1.34
--- class.soXport.inc.php       18 Sep 2003 14:00:49 -0000      1.35
***************
*** 214,224 ****
                        $sql= "SELECT DISTINCT periode from fm_ecobilag where 
budsjettsigndato is not null and (saksigndato is not null or oppsynsigndato is 
not null) and utbetalingsigndato is not null ";
                        $this->db->query($sql,__LINE__,__FILE__);
-                       $i = 0;
                        while ($this->db->next_record())
                        {
!                               $periode[$i]    = $this->db->f('periode');
!                               $i++;
                        }
- //_debug_array($periode);
                        return $periode;
                }
--- 214,221 ----
                        $sql= "SELECT DISTINCT periode from fm_ecobilag where 
budsjettsigndato is not null and (saksigndato is not null or oppsynsigndato is 
not null) and utbetalingsigndato is not null ";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while ($this->db->next_record())
                        {
!                               $periode[]      = $this->db->f('periode');
                        }
                        return $periode;
                }
***************
*** 530,534 ****
                function delete_from_fm_ecobilag($id)
                {
!                       $sql="delete from fm_ecobilag where id='$id'";
                        $this->db->query($sql,__LINE__,__FILE__);
                }
--- 527,531 ----
                function delete_from_fm_ecobilag($id)
                {
!                       $sql="delete from fm_ecobilag where id=$id";
                        $this->db->query($sql,__LINE__,__FILE__);
                }

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** class.uiwo_hour.inc.php     11 Sep 2003 13:59:47 -0000      1.36
--- class.uiwo_hour.inc.php     18 Sep 2003 14:00:49 -0000      1.37
***************
*** 332,335 ****
--- 332,338 ----
                                'lang_show_cost_statustext'                     
=> lang('Show calculated cost on the printview'),
  
+                               'lang_show_details'                             
        => lang('Show details'),
+                               'lang_show_details_statustext'          => 
lang('Show details'),
+ 
                                'lang_mark_draft'                               
        => lang('Mark as DRAFT'),
                                'lang_mark_draft_statustext'            => 
lang('Mark the tender as DRAFT')
***************
*** 379,382 ****
--- 382,386 ----
  
                        $show_cost                              = 
get_var('show_cost',array('POST','GET'));
+                       $show_details                   = 
get_var('show_details',array('POST','GET'));
                        $workorder_id                   = 
get_var('workorder_id',array('POST','GET'));
                        $to_email                               = 
get_var('to_email',array('POST','GET'));
***************
*** 385,389 ****
                        $no_email                               = 
get_var('no_email',array('POST','GET'));
  
- 
                        if($update_email)
                        {
--- 389,392 ----
***************
*** 391,395 ****
                        }
                        $workorder = 
$this->boworkorder->read_single($workorder_id);
-                       $workorder_history = 
$this->boworkorder->read_record_history($workorder_id);
  
                        $table_header_history[] = array
--- 394,397 ----
***************
*** 403,407 ****
  
                        $common_data            = 
$this->common_data($workorder_id);
!                       $values_hour            = $common_data['content'];
                        $project                        = 
$this->boproject->read_single($common_data['workorder']['project_id']);
  
--- 405,412 ----
  
                        $common_data            = 
$this->common_data($workorder_id);
!                       if($show_details)
!                       {
!                               $values_hour            = 
$common_data['content'];
!                       }
                        $project                        = 
$this->boproject->read_single($common_data['workorder']['project_id']);
  
***************
*** 576,579 ****
--- 581,586 ----
                        }
  
+                       $workorder_history = 
$this->boworkorder->read_record_history($workorder_id);
+ 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
***************
*** 589,593 ****
                                'lang_select_email'                             
=> lang('Select email'),
  
!                               'send_order_action'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
 . $workorder_id),
  
                                'lang_no_history'                               
=>      lang('No history'),
--- 596,600 ----
                                'lang_select_email'                             
=> lang('Select email'),
  
!                               'send_order_action'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
 . $workorder_id . '&show_details=' . $show_details),
  
                                'lang_no_history'                               
=>      lang('No history'),

Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** class.uiproject.inc.php     11 Sep 2003 13:59:47 -0000      1.44
--- class.uiproject.inc.php     18 Sep 2003 14:00:49 -0000      1.45
***************
*** 311,315 ****
                                'select_user_name'                              
=> 'filter',
                                'lang_no_user'                                  
=> lang('No user'),
!                               'user_list'                                     
        => 
$this->bocommon->get_user_list('filter',$this->filter,array('all'),$default=''),
  
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
--- 311,315 ----
                                'select_user_name'                              
=> 'filter',
                                'lang_no_user'                                  
=> lang('No user'),
!                               'user_list'                                     
        => 
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
  
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
***************
*** 602,608 ****
  
                        
$supervisor_id=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'];
- 
                        $need_approval = 
$this->config->config_data['workorder_approval'];
  
                        if(!$values['coordinator'])
                        {
--- 602,613 ----
  
                        
$supervisor_id=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'];
                        $need_approval = 
$this->config->config_data['workorder_approval'];
  
+                       
$project_status=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['project_status'];
+                       if(!$values['status'])
+                       {
+                               $values['status']=$project_status;
+                       }
+ 
                        if(!$values['coordinator'])
                        {
***************
*** 726,730 ****
                                'select_user_name'                              
=> 'values[coordinator]',
                                'lang_no_user'                                  
=> lang('Select coordinator'),
!                               'user_list'                                     
        => $this->bocommon->get_user_list('select',$values['coordinator']),
  
                                'status_list'                                   
=> $this->bo->select_status_list('select',$values['status']),
--- 731,735 ----
                                'select_user_name'                              
=> 'values[coordinator]',
                                'lang_no_user'                                  
=> lang('Select coordinator'),
!                               'user_list'                                     
        => 
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl2_location),
  
                                'status_list'                                   
=> $this->bo->select_status_list('select',$values['status']),

Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.sowo_hour.inc.php     11 Sep 2003 13:59:47 -0000      1.14
--- class.sowo_hour.inc.php     18 Sep 2003 14:00:49 -0000      1.15
***************
*** 17,23 ****
                        $this->account                  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soworkorder              = 
CreateObject($this->currentapp.'.soworkorder');
!                       $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
  
!                       $this->join                     = $this->socommon->join;
                }
  
--- 17,23 ----
                        $this->account                  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soworkorder              = 
CreateObject($this->currentapp.'.soworkorder');
!                       $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
  
!                       $this->join                     = $this->bocommon->join;
                }
  
***************
*** 302,307 ****
                        $hour['record'] = $this->next_record($workorder_id);
  
!                       $this->db->query("UPDATE fm_workorder set
                                chapter_id      ='" . $hour['chapter_id'] . "' 
WHERE id= '$workorder_id'",__LINE__,__FILE__);
  
                        if($hour['grouping_id'])
--- 302,310 ----
                        $hour['record'] = $this->next_record($workorder_id);
  
!                       if($hour['chapter_id'])
!                       {
!                               $this->db->query("UPDATE fm_workorder set
                                chapter_id      ='" . $hour['chapter_id'] . "' 
WHERE id= '$workorder_id'",__LINE__,__FILE__);
+                       }
  
                        if($hour['grouping_id'])
***************
*** 332,360 ****
                        }
  
!                       if(!$hour['grouping_id'])
!                       {
!                               $hour['grouping_id']='NULL';
!                       }
  
                        $this->db->query("insert into fm_wo_hours 
(owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
                                . " 
grouping_id,grouping_descr,record,building_part,tolerance,remark,entry_date,workorder_id)
 "
!                               . " values ('" .
!                                       $this->account . "','" .
!                                       $hour['descr'] . "','" .
!                                       $hour['unit'] . "','" .
!                                       $hour['cost'] . "','" .
!                                       $hour['quantity'] . "','" .
!                                       $hour['billperae'] . "','" .
!                                       $hour['ns3420_id'] . "','" .
!                                       $hour['dim_d'] . "'," .
!                                       $hour['grouping_id'] . ",'" .
!                                       $hour['grouping_descr'] . "','" .
!                                       $hour['record'] . "','" .
!                                       $hour['building_part_id'] . "','" .
!                                       $hour['tolerance_id'] . "','" .
!                                       $hour['remark'] . "','" .
!                                       time() . "','" .
!                                       $workorder_id . "')",__LINE__,__FILE__);
! 
  
                        $this->update_calculation($workorder_id);
--- 335,362 ----
                        }
  
!                       $values= array(
!                                       $this->account,
!                                       $hour['descr'],
!                                       $hour['unit'],
!                                       $hour['cost'],
!                                       $hour['quantity'],
!                                       $hour['billperae'],
!                                       $hour['ns3420_id'],
!                                       $hour['dim_d'],
!                                       $hour['grouping_id'],
!                                       $hour['grouping_descr'],
!                                       $hour['record'],
!                                       $hour['building_part_id'],
!                                       $hour['tolerance_id'],
!                                       $hour['remark'],
!                                       time(),
!                                       $workorder_id
!                                       );
! 
!                       $values = $this->bocommon->validate_db_insert($values);
  
                        $this->db->query("insert into fm_wo_hours 
(owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
                                . " 
grouping_id,grouping_descr,record,building_part,tolerance,remark,entry_date,workorder_id)
 "
!                               . "VALUES ( $values )",__LINE__,__FILE__);
  
                        $this->update_calculation($workorder_id);
***************
*** 393,401 ****
                        }
  
! //_debug_array($hour);
!                               return $hour;
                }
  
- 
                function edit($hour,$workorder_id)
                {
--- 395,401 ----
                        }
  
!                       return $hour;
                }
  
                function edit($hour,$workorder_id)
                {
***************
*** 406,411 ****
  
  
!                       $this->db->query("UPDATE fm_workorder set
                                chapter_id      ='" . $hour['chapter_id'] . "' 
WHERE id= '$workorder_id'",__LINE__,__FILE__);
  
                        if($hour['new_grouping'])
--- 406,414 ----
  
  
!                       if($hour['chapter_id'])
!                       {
!                               $this->db->query("UPDATE fm_workorder set
                                chapter_id      ='" . $hour['chapter_id'] . "' 
WHERE id= '$workorder_id'",__LINE__,__FILE__);
+                       }
  
                        if($hour['new_grouping'])
***************
*** 472,495 ****
                        }
  
!                       if(!$hour['grouping_id'])
!                       {
!                               $hour['grouping_id']='NULL';
!                       }
  
  
!                       $this->db->query("UPDATE fm_wo_hours set
!                               hours_descr                     ='" . 
$hour['descr'] . "',
!                               remark                          ='" . 
$hour['remark'] . "',
!                               billperae                       ='" . 
$hour['billperae'] . "',
!                               unit                            ='" . 
$hour['unit'] . "',
!                               quantity                        ='" . 
$hour['quantity'] . "',
!                               cost                            ='" . 
$hour['cost'] . "',
!                               ns3420_id                       ='" . 
$hour['ns3420_id'] . "',
!                               tolerance                       ='" . 
$hour['tolerance_id'] . "',
!                               building_part           ='" . 
$hour['building_part_id'] . "',
!                               dim_d                           ='" . 
$hour['dim_d'] . "',
!                               grouping_id                     =" . 
$hour['grouping_id'] . ",
!                               grouping_descr          ='" . 
$hour['grouping_descr']
!                               . "' WHERE id= '" . $hour['hour_id'] 
."'",__LINE__,__FILE__);
  
                        $this->update_calculation($workorder_id);
--- 475,496 ----
                        }
  
!                       $value_set=array(
!                               'hours_descr'           => $hour['descr'],
!                               'remark'                        => 
$hour['remark'],
!                               'billperae'                     => 
$hour['billperae'],
!                               'unit'                          => 
$hour['unit'],
!                               'quantity'                      => 
$hour['quantity'],
!                               'cost'                          => 
$hour['cost'],
!                               'ns3420_id'                     => 
$hour['ns3420_id'],
!                               'tolerance'                     => 
$hour['tolerance_id'],
!                               'building_part'         => 
$hour['building_part_id'],
!                               'dim_d'                         => 
$hour['dim_d'],
!                               'grouping_id'           => $hour['grouping_id'],
!                               'grouping_descr'        => 
$hour['grouping_descr']
!                               );
  
+                       $value_set      = 
$this->bocommon->validate_db_update($value_set);
  
!                       $this->db->query("UPDATE fm_wo_hours set $value_set 
WHERE id= '" . $hour['hour_id'] ."'",__LINE__,__FILE__);
  
                        $this->update_calculation($workorder_id);
***************
*** 512,515 ****
--- 513,517 ----
                function get_extra_email($vendor_id)
                {
+                       $vendor_id=(int)$vendor_id;
                        $this->db->query("select contact_value from 
phpgw_addressbook_extra where contact_id='$vendor_id' and contact_value like 
'address@hidden'",__LINE__,__FILE__);
                        while ($this->db->next_record())
***************
*** 543,549 ****
                        $this->db->query("SELECT sum(cost) as calculation FROM 
fm_wo_hours where workorder_id =$workorder_id",__LINE__,__FILE__);
                        $this->db->next_record();
!                       $calculation    = $this->db->f('calculation');
  
!                       $this->db->query("UPDATE fm_workorder set calculation 
='$calculation' where  id= '$workorder_id'",__LINE__,__FILE__);
                }
        }
--- 545,551 ----
                        $this->db->query("SELECT sum(cost) as calculation FROM 
fm_wo_hours where workorder_id =$workorder_id",__LINE__,__FILE__);
                        $this->db->next_record();
!                       $calculation    = (int)$this->db->f('calculation');
  
!                       $this->db->query("UPDATE fm_workorder set calculation 
=$calculation where  id= $workorder_id",__LINE__,__FILE__);
                }
        }

Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** class.bolocation.inc.php    11 Sep 2003 13:59:47 -0000      1.27
--- class.bolocation.inc.php    18 Sep 2003 14:00:49 -0000      1.28
***************
*** 537,554 ****
                        }
  
!                       if($extra['tenant_id']>0)
                        {
!                               
$tenant_data=$this->bocommon->read_single_tenant($extra['tenant_id']);
!                               $location_data['tenant_id']     = 
$extra['tenant_id'];
!                               $location_data['contact_phone']= 
$extra['contact_phone'];
!                               $location_data['last_name']     = 
$tenant_data['last_name'];
!                               $location_data['first_name']    = 
$tenant_data['first_name'];
!                       }
!                       else
!                       {
!                               unset($location_data['tenant_id']);
!                               unset($location_data['contact_phone']);
!                               unset($location_data['last_name']);
!                               unset($location_data['first_name']);
                        }
  
--- 537,557 ----
                        }
  
!                       if(!$extra['tenant_id']=='lookup')
                        {
!                               if($extra['tenant_id']>0)
!                               {
!                                       
$tenant_data=$this->bocommon->read_single_tenant($extra['tenant_id']);
!                                       $location_data['tenant_id']     = 
$extra['tenant_id'];
!                                       $location_data['contact_phone']= 
$extra['contact_phone'];
!                                       $location_data['last_name']     = 
$tenant_data['last_name'];
!                                       $location_data['first_name']    = 
$tenant_data['first_name'];
!                               }
!                               else
!                               {
!                                       unset($location_data['tenant_id']);
!                                       unset($location_data['contact_phone']);
!                                       unset($location_data['last_name']);
!                                       unset($location_data['first_name']);
!                               }
                        }
  

Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** class.uiinvoice.inc.php     10 Sep 2003 14:36:23 -0000      1.34
--- class.uiinvoice.inc.php     18 Sep 2003 14:00:49 -0000      1.35
***************
*** 130,134 ****
                                        $content[$i]['amount']                  
        = number_format($extra['amount'], 2, ',', ' ');
                                        $content[$i]['lang_payment_date']       
= lang('Payment Date');
!                                       $content[$i]['link_sub']                
        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.list_sub&sub='.$sub);
                                        $content[$i]['lang_sub']                
        = lang('Voucher ID');
                                        $content[$i]['lang_sub_help']           
= lang('Klick this link to enter the list of sub-invoices');
--- 130,134 ----
                                        $content[$i]['amount']                  
        = number_format($extra['amount'], 2, ',', ' ');
                                        $content[$i]['lang_payment_date']       
= lang('Payment Date');
!                                       $content[$i]['link_sub']                
        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.list_sub&user_lid='.$this->user_lid);
                                        $content[$i]['lang_sub']                
        = lang('Voucher ID');
                                        $content[$i]['lang_sub_help']           
= lang('Klick this link to enter the list of sub-invoices');
***************
*** 360,364 ****
                        {
                                $receipt=$this->bo->update_invoice_sub($values);
- 
                        }
  
--- 360,363 ----
***************
*** 471,475 ****
                                'start'                         => $this->start,
                                'paid'                          => $paid,
!                               'voucher_id'            => $voucher_id
                        );
  
--- 470,475 ----
                                'start'                         => $this->start,
                                'paid'                          => $paid,
!                               'voucher_id'            => $voucher_id,
!                               'user_lid'                      => 
$this->user_lid
                        );
  
***************
*** 493,497 ****
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'lang_save'                                     
        => lang('save'),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index'),
                                'lang_done_statustext'                  => 
lang('Back to the list'),
                                'lang_save_statustext'                  => 
lang('Save the voucher'),
--- 493,498 ----
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'lang_save'                                     
        => lang('save'),
!                               'lang_done'                                     
        => lang('Done'),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.index&user_lid='.$this->user_lid),
                                'lang_done_statustext'                  => 
lang('Back to the list'),
                                'lang_save_statustext'                  => 
lang('Save the voucher'),

Index: hook_settings.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_settings.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** hook_settings.inc.php       8 Sep 2003 17:36:37 -0000       1.11
--- hook_settings.inc.php       18 Sep 2003 14:00:49 -0000      1.12
***************
*** 8,11 ****
--- 8,12 ----
  
        /* $Id$ */
+       $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
  
        $yes_and_no = array(
***************
*** 69,72 ****
--- 70,84 ----
                );
        create_select_box('Default start 
page','default_start_page',$default_start_page,'Select your start-submodule');
+ 
+       $soworkorder= CreateObject($this->currentapp.'.soworkorder');
+ 
+       $status_list= $soworkorder->select_status_list();
+       while (list($key,$entry) = each($status_list))
+       {
+               $_status[$entry['id']] = $entry['name'];
+       }
+ 
+       unset($soworkorder);
+       create_select_box('Default project 
status','project_status',$_status,'The default status for your projects and 
workorders');
  
        create_input_box('Yout Cellphone','cellphone');

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** class.socommon.inc.php      8 Sep 2003 17:36:37 -0000       1.36
--- class.socommon.inc.php      18 Sep 2003 14:00:49 -0000      1.37
***************
*** 62,82 ****
                function get_user_list_right($right='',$acl_location='')
                {
  
!                       $sql = "SELECT * FROM phpgw_accounts $this->join 
fm_acl2 on phpgw_accounts.account_id=fm_acl2.acl_account where acl_location 
LIKE '%$acl_location%'";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while ($this->db->next_record())
                        {
!                               
if($this->acl2->check($acl_location,$right,$this->db->f('account_id')))
                                {
!                                       $employees[] = Array(
!                                               'account_id'        => 
$this->db->f('account_id'),
!                                               'account_lid'       => 
$this->db->f('account_lid'),
!                                               'account_type'      => 
$this->db->f('account_type'),
!                                               'account_firstname' => 
$this->db->f('account_firstname'),
!                                               'account_lastname'  => 
$this->db->f('account_lastname'),
!                                               'account_status'    => 
$this->db->f('account_status'),
!                                               'account_expires'   => 
$this->db->f('account_expires')
!                                       );
                                }
                        }
                        return $employees;
--- 62,125 ----
                function get_user_list_right($right='',$acl_location='')
                {
+                       $myaccounts = CreateObject('phpgwapi.accounts');
  
!                       while($my_memberships && list($key,$group) = 
each($my_memberships))
!                       {
!                               $security .= "," . $group['account_id'];
!                       }
! 
!                       $sql = "SELECT * FROM phpgw_accounts $this->join 
fm_acl2 on phpgw_accounts.account_id=fm_acl2.acl_account where acl_location 
LIKE '%$acl_location%' order by account_lastname ASC";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while ($this->db->next_record())
                        {
!                               
if($this->acl2->check($acl_location,$right,$this->db->f('acl_account')))
                                {
!                                       if($this->db->f('account_type')=='g')
!                                       {
!                                               $members = 
$myaccounts->member($this->db->f('account_id'));
!                                               if (isset($members) AND 
is_array($members))
!                                               {
!                                                       foreach($members as 
$user)
!                                                       {
!                                                               
$accounts[$user['account_id']] = array($user['account_id']);
!                                                       }
!                                                       unset($members);
!                                               }
!                                       }
!                                       else
!                                       {
!                                               
$accounts[$this->db->f('acl_account')] = array($this->db->f('acl_account'));
!                                       }
!                               }
!                       }
!                       unset($myaccounts);
!                       if (isset($accounts) AND is_array($accounts))
!                       {
!                               foreach($accounts as $account_id)
!                               {
!                                       $i=0;
!                                       
if(!$this->acl2->check($acl_location,$right,$account_id[0]))
!                                       {
!                                               
unset($accounts[$account_id[0]]);
!                                       }
!                                       $i++;
                                }
+                       }
+                       address@hidden($accounts);
+                       $k=count($accounts);
+                       for ($i=0;$i<$k;$i++)
+                       {
+                               $sql = 'SELECT * FROM phpgw_accounts where 
account_id=' . (int)$accounts[$i];
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $employees[] = Array(
+                                       'account_id'        => 
$this->db->f('account_id'),
+                                       'account_lid'       => 
$this->db->f('account_lid'),
+                                       'account_type'      => 
$this->db->f('account_type'),
+                                       'account_firstname' => 
$this->db->f('account_firstname'),
+                                       'account_lastname'  => 
$this->db->f('account_lastname'),
+                                       'account_status'    => 
$this->db->f('account_status'),
+                                       'account_expires'   => 
$this->db->f('account_expires')
+                                       );
                        }
                        return $employees;

Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uilocation.inc.php    2 Sep 2003 17:44:38 -0000       1.28
--- class.uilocation.inc.php    18 Sep 2003 14:00:49 -0000      1.29
***************
*** 75,81 ****
                function index()
                {
!                       $start_time = explode(' ',microtime());
                        $start_time = $start_time[1]+$start_time[0];
! 
                        if(!$this->acl_read)
                        {
--- 75,81 ----
                function index()
                {
! /*                    $start_time = explode(' ',microtime());
                        $start_time = $start_time[1]+$start_time[0];
! */
                        if(!$this->acl_read)
                        {
***************
*** 146,150 ****
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('view the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = lang('view');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
 . $location['location_code']);
                                                        $i++;
                                                }
--- 146,150 ----
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('view the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = lang('view');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
 . $location['location_code'] . '&lookup_tenant=' . $lookup_tenant);
                                                        $i++;
                                                }
***************
*** 154,158 ****
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('edit the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = lang('edit');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location['location_code']);
                                                        $i++;
                                                }
--- 154,158 ----
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('edit the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = lang('edit');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location['location_code'] . '&lookup_tenant=' . $lookup_tenant);
                                                        $i++;
                                                }
***************
*** 162,166 ****
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('delete the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = 
lang('delete');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
 . $location['location_code'] . '&type_id=' . $type_id);
                                                }
                                        }
--- 162,166 ----
                                                        
$content[$j]['row'][$i]['statustext']                   = lang('delete the 
location');
                                                        
$content[$j]['row'][$i]['text']                                 = 
lang('delete');
!                                                       
$content[$j]['row'][$i]['link']                         = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
 . $location['location_code'] . '&type_id=' . $type_id . '&lookup_tenant=' . 
$lookup_tenant);
                                                }
                                        }
***************
*** 250,256 ****
                        }
  
- //_debug_array($table_header);
- //_debug_array($uicols);
- 
                        if($this->acl_add)
                        {
--- 250,253 ----
***************
*** 357,363 ****
                        $this->save_sessiondata();
  
!                       $end_time = $end_time[1]+$end_time[0];
                        $process = ($end_time-$start_time);
                        echo "tidsforbruk: $process";
                }
  
--- 354,361 ----
                        $this->save_sessiondata();
  
! /*                    $end_time = $end_time[1]+$end_time[0];
                        $process = ($end_time-$start_time);
                        echo "tidsforbruk: $process";
+ */
                }
  
***************
*** 369,372 ****
--- 367,371 ----
                        }
  
+                       $lookup_tenant  = 
get_var('lookup_tenant',array('POST','GET'));
                        $location_code                  = 
get_var('location_code',array('POST','GET'));
                        $location = split('-',$location_code);
***************
*** 458,462 ****
                        if(!$error_id && $location_code)
                        {
!                               $values = 
$this->bo->read_single($location_code,array('tenant_id'=>True));
                        }
                        else
--- 457,461 ----
                        if(!$error_id && $location_code)
                        {
!                               $values = 
$this->bo->read_single($location_code,array('tenant_id'=>'lookup'));
                        }
                        else
***************
*** 475,479 ****
                                'menuaction'    => 
$this->currentapp.'.uilocation.edit',
                                'location_code' => $location_code,
!                               'type_id'       => $type_id
                        );
  
--- 474,479 ----
                                'menuaction'    => 
$this->currentapp.'.uilocation.edit',
                                'location_code' => $location_code,
!                               'type_id'               => $type_id,
!                               'lookup_tenant' => $lookup_tenant
                        );
  
***************
*** 689,693 ****
                                'location_data'                                 
=> $location_data,
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&type_id='
 . $type_id),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
--- 689,693 ----
                                'location_data'                                 
=> $location_data,
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&type_id='
 . $type_id . '&lookup_tenant=' . $lookup_tenant),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
***************
*** 760,763 ****
--- 760,764 ----
                        }
  
+                       $lookup_tenant  = 
get_var('lookup_tenant',array('POST','GET'));
                        $location_code                  = 
get_var('location_code',array('POST','GET'));
                        $location = split('-',$location_code);
***************
*** 772,776 ****
                        $GLOBALS['phpgw']->xslttpl->add_file(array('location'));
  
!                       $values = 
$this->bo->read_single($location_code,array('tenant_id'=>True));
  
                        $lookup_type='view';
--- 773,777 ----
                        $GLOBALS['phpgw']->xslttpl->add_file(array('location'));
  
!                       $values = 
$this->bo->read_single($location_code,array('tenant_id'=>'lookup'));
  
                        $lookup_type='view';
***************
*** 790,794 ****
                        $function_msg .= ' ' 
.$location_types[($type_id-1)]['name'];
  
- //    _debug_array($config);
                        $custom_fields  = 
$this->soadmin_location->read_attrib(array(type_id=>$type_id));
  
--- 791,794 ----
***************
*** 907,911 ****
                                'lookup_type'                                   
=> $lookup_type,
                                'location_data'                                 
=> $location_data,
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&type_id='
 . $type_id),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
--- 907,911 ----
                                'lookup_type'                                   
=> $lookup_type,
                                'location_data'                                 
=> $location_data,
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&type_id='
 . $type_id . '&lookup_tenant=' . $lookup_tenant),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
***************
*** 913,917 ****
                                'lang_save_statustext'                  => 
lang('Save the location'),
                                'lang_edit'                                     
=> lang('Edit'),
!                               'edit_action'                           => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location_code),
                                'lang_edit_statustext'          => lang('Edit 
this entry equipment'),
                                'lang_category'                                 
=> lang('category'),
--- 913,917 ----
                                'lang_save_statustext'                  => 
lang('Save the location'),
                                'lang_edit'                                     
=> lang('Edit'),
!                               'edit_action'                           => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location_code . '&lookup_tenant=' . $lookup_tenant),
                                'lang_edit_statustext'          => lang('Edit 
this entry equipment'),
                                'lang_category'                                 
=> lang('category'),

Index: class.uigab.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uigab.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uigab.inc.php 18 Jul 2003 09:34:54 -0000      1.14
--- class.uigab.inc.php 18 Sep 2003 14:00:49 -0000      1.15
***************
*** 109,112 ****
--- 109,123 ----
                        {
                                $text_view      = lang('view');
+                               $lang_view_statustext   = lang('view gab 
detail');
+                       }
+ 
+                       $config         = 
CreateObject('phpgwapi.config',$this->currentapp);
+ 
+                       $config->read_repository();
+                       $link_to_map = $config->config_data['map_url'];
+                       if($link_to_map)
+                       {
+                               $text_map=lang('Map');
+                               $lang_map_statustext    = lang('View map');
                        }
  
***************
*** 114,128 ****
                        while (is_array($gab_list) && list(,$gab) = 
each($gab_list))
                        {
                                $content[] = array
                                (
                                        'hits'                                  
        => $gab['hits'],
                                        'address'                               
        => $gab['address'],
!                                       'gaards_nr'                             
        => substr($gab['gab_id'],4,5),
!                                       'bruks_nr'                              
        => substr($gab['gab_id'],9,4),
!                                       'feste_nr'                              
        => substr($gab['gab_id'],13,4),
!                                       'seksjons_nr'                           
=> substr($gab['gab_id'],17,3),
                                        'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uigab.list_detail&gab_id='
 . $gab['gab_id']),
!                                       'lang_view_statustext'          => 
lang('view gab detail'),
!                                       'text_view'                             
        => $text_view
                                );
                        }
--- 125,148 ----
                        while (is_array($gab_list) && list(,$gab) = 
each($gab_list))
                        {
+ 
+                               $value_gaards_nr                = 
substr($gab['gab_id'],4,5);
+                               $value_bruks_nr         = 
substr($gab['gab_id'],9,4);
+                               $value_feste_nr         = 
substr($gab['gab_id'],13,4);
+                               $value_seksjons_nr      = 
substr($gab['gab_id'],17,3);
+ 
                                $content[] = array
                                (
                                        'hits'                                  
        => $gab['hits'],
                                        'address'                               
        => $gab['address'],
!                                       'gaards_nr'                             
        => $value_gaards_nr,
!                                       'bruks_nr'                              
        => $value_bruks_nr,
!                                       'feste_nr'                              
        => $value_feste_nr,
!                                       'seksjons_nr'                           
=> $value_seksjons_nr,
                                        'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uigab.list_detail&gab_id='
 . $gab['gab_id']),
!                                       'lang_view_statustext'          => 
$lang_view_statustext,
!                                       'text_view'                             
        => $text_view,
!                                       'link_map'                              
        => $link_to_map . '?maptype=Eiendomskart&gnr=' . (int)$value_gaards_nr 
. '&bnr=' . (int)$value_bruks_nr . '&fnr=' . (int)$value_feste_nr,
!                                       'lang_map_statustext'           => 
$lang_map_statustext,
!                                       'text_map'                              
        => $text_map
                                );
                        }
***************
*** 163,168 ****
                                'lang_seksjons_nr'      => lang('Seksjons nr'),
                                'lang_view'                     => lang('view'),
!                               'lang_edit'                     => lang('edit'),
!                               'lang_delete'           => lang('delete'),
                                );
  
--- 183,187 ----
                                'lang_seksjons_nr'      => lang('Seksjons nr'),
                                'lang_view'                     => lang('view'),
!                               'lang_map'                      => $text_map
                                );
  





reply via email to

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