phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uiproject.inc.php, 1.58, 1.59 clas


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] property/inc class.uiproject.inc.php, 1.58, 1.59 class.sotts.inc.php, 1.38, 1.39 class.uiwo_hour.inc.php, 1.42, 1.43 class.sowo_hour.inc.php, 1.20, 1.21 class.soproject.inc.php, 1.49, 1.50 class.bowo_hour.inc.php, 1.13, 1.14 class.solocation.inc.php, 1.36, 1.37 class.boentity.inc.php, 1.9, 1.10
Date: Wed, 19 Nov 2003 19:08:36 +0000

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

Modified Files:
        class.uiproject.inc.php class.sotts.inc.php 
        class.uiwo_hour.inc.php class.sowo_hour.inc.php 
        class.soproject.inc.php class.bowo_hour.inc.php 
        class.solocation.inc.php class.boentity.inc.php 
Log Message:
no message

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** class.soproject.inc.php     18 Nov 2003 16:25:15 -0000      1.49
--- class.soproject.inc.php     19 Nov 2003 19:08:32 -0000      1.50
***************
*** 341,345 ****
                        }
  
!                       $sql = "SELECT * FROM fm_project_origin WHERE 
project_id='$project_id' and origin ='ticket'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 341,345 ----
                        }
  
!                       $sql = "SELECT * FROM fm_project_origin WHERE 
project_id='$project_id' and origin ='tts'";
  
                        $this->db->query($sql,__LINE__,__FILE__);

Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** class.uiproject.inc.php     18 Nov 2003 16:25:15 -0000      1.58
--- class.uiproject.inc.php     19 Nov 2003 19:08:31 -0000      1.59
***************
*** 824,828 ****
                        if($values['reserve'])
                        {
!                               
$reserve_remainder=$values['reserve']+$values['deviation'];
                                $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
                        }
--- 824,828 ----
                        if($values['reserve'])
                        {
!                               
$reserve_remainder=$values['reserve']-$values['deviation'];
                                $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
                        }
***************
*** 1076,1080 ****
                        if($values['reserve'])
                        {
!                               
$reserve_remainder=$values['reserve']+$values['deviation'];
                                $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
                        }
--- 1076,1080 ----
                        if($values['reserve'])
                        {
!                               
$reserve_remainder=$values['reserve']-$values['deviation'];
                                $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
                        }

Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.sowo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.20
--- class.sowo_hour.inc.php     19 Nov 2003 19:08:32 -0000      1.21
***************
*** 351,356 ****
                        }
  
-                       $this->update_calculation($hour[0]['workorder_id']);
- 
                        $receipt['message'][] = array('msg'=>lang('%1 entries 
is added!',count($hour)));
  
--- 351,354 ----
***************
*** 421,430 ****
                        }
  
-                       $this->update_calculation($workorder_id);
- 
                        $receipt['message'][] = array('msg'=>lang('the number 
of %1 hour is added!',$i));
  
                        return $receipt;
- 
                }
  
--- 419,425 ----
***************
*** 492,497 ****
                                . "VALUES ( $values )",__LINE__,__FILE__);
  
-                       $this->update_calculation($workorder_id);
- 
                        $receipt['hour_id'] = 
$this->db->get_last_insert_id('fm_wo_hours','id');
  
--- 487,490 ----
***************
*** 626,631 ****
                        $this->db->query("UPDATE fm_wo_hours set $value_set 
WHERE id= '" . $hour['hour_id'] ."'",__LINE__,__FILE__);
  
-                       $this->update_calculation($workorder_id);
- 
                        $receipt['hour_id'] = $hour['hour_id'];
                        $receipt['message'][] = array('msg'=>lang('hour %1 has 
been edited',$hour['hour_id']));
--- 619,622 ----
***************
*** 669,674 ****
                        }
  
-                       $this->update_calculation($workorder_id);
- 
                        $this->db->transaction_commit();
  
--- 660,663 ----
***************
*** 685,695 ****
                }
  
!               function update_calculation($workorder_id)
                {
!                       $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__);
                }
        }
--- 674,686 ----
                }
  
!               function update_calculation($data)
                {
!                       if(is_array($data))
!                       {
!                               $id = 
(isset($data['workorder_id'])?$data['workorder_id']:0);
!                               $calculation = 
(isset($data['calculation'])?$data['calculation']:0);
!                       }
!                       $this->db->query("UPDATE fm_workorder set calculation = 
$calculation WHERE id=$id",__LINE__,__FILE__);
!                       return $receipt;
                }
        }

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** class.sotts.inc.php 18 Nov 2003 16:25:16 -0000      1.38
--- class.sotts.inc.php 19 Nov 2003 19:08:32 -0000      1.39
***************
*** 143,147 ****
                                        $query = ereg_replace("'",'',$query);
                                        $query = ereg_replace('"','',$query);
!                                       $querymethod = " $where (subject LIKE 
'%$query%' or address LIKE '%$query%' or location_code LIKE '%$query%')";
                                }
                        }
--- 143,147 ----
                                        $query = ereg_replace("'",'',$query);
                                        $query = ereg_replace('"','',$query);
!                                       $querymethod = " $where (subject LIKE 
'%$query%' or address LIKE '%$query%' or fm_tts_tickets.location_code LIKE 
'%$query%')";
                                }
                        }

Index: class.bowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bowo_hour.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** class.bowo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.13
--- class.bowo_hour.inc.php     19 Nov 2003 19:08:32 -0000      1.14
***************
*** 273,276 ****
--- 273,281 ----
                }
  
+               function update_calculation($data)
+               {
+                       $this->so->update_calculation($data);
+               }
+ 
                function save_deviation($values,$action='')
                {

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** class.uiwo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.42
--- class.uiwo_hour.inc.php     19 Nov 2003 19:08:32 -0000      1.43
***************
*** 371,374 ****
--- 371,376 ----
                        $total_sum      = $sum_result + $addition_percentage + 
$workorder['addition_rs'] + $sum_tax;
  
+                       
$this->bo->update_calculation(array('workorder_id'=>$workorder_id,'calculation'=>($sum_result+$addition_percentage
 + $workorder['addition_rs'])));
+ 
                        $table_sum[] = array
                        (

Index: class.boentity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boentity.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.boentity.inc.php      12 Nov 2003 18:00:52 -0000      1.9
--- class.boentity.inc.php      19 Nov 2003 19:08:33 -0000      1.10
***************
*** 248,252 ****
                                                                                
        
'lookup'=>$data['lookup'],'allrows'=>$data['allrows'],'entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'status'=>$this->status,
                                                                                
        
'start_date'=>$this->bocommon->date_to_timestamp($data['start_date']),'end_date'=>$this->bocommon->date_to_timestamp($data['end_date']),
!                                                                               
        'allrows'=>$allrows));
  
                        $this->total_records = $this->so->total_records;
--- 248,252 ----
                                                                                
        
'lookup'=>$data['lookup'],'allrows'=>$data['allrows'],'entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'status'=>$this->status,
                                                                                
        
'start_date'=>$this->bocommon->date_to_timestamp($data['start_date']),'end_date'=>$this->bocommon->date_to_timestamp($data['end_date']),
!                                                                               
        'allrows'=>$data['allrows']));
  
                        $this->total_records = $this->so->total_records;

Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** class.solocation.inc.php    14 Nov 2003 19:00:38 -0000      1.36
--- class.solocation.inc.php    19 Nov 2003 19:08:32 -0000      1.37
***************
*** 383,400 ****
                        if($query)
                        {
!                               $query = ereg_replace("'",'',$query);
!                               $query = ereg_replace('"','',$query);
! 
!                               if($sub_query_tenant)
                                {
!                                       $sub_query = "OR fm_tenant.last_name 
LIKE '%$query%' OR fm_tenant.first_name LIKE '%$query%' OR 
fm_tenant.contact_phone LIKE '%$query%'";
                                }
! 
!                               if($sub_query_street)
                                {
!                                       $sub_query .= "OR 
fm_streetaddress.descr LIKE '%$query%'";
!                               }
  
!                               $querymethod = " AND (fm_location" . 
($type_id).".loc1 LIKE '%$query%' $sub_query OR fm_location" . 
($type_id).".location_code LIKE '%$query%' OR loc" . ($type_id)."_name LIKE 
'%$query%')";
                        }
  
--- 383,408 ----
                        if($query)
                        {
!                               if(stristr($query, '.'))
                                {
!                                       $query=explode(".",$query);
!                                       $querymethod = " AND (fm_location" . 
($type_id).".loc1='" . $query[0] . "' AND fm_location" . $type_id .".loc" . 
($type_id)."='" . $query[1] . "')";
                                }
!                               else
                                {
!                                       $query = ereg_replace("'",'',$query);
!                                       $query = ereg_replace('"','',$query);
  
!                                       if($sub_query_tenant)
!                                       {
!                                               $sub_query = "OR 
fm_tenant.last_name LIKE '%$query%' OR fm_tenant.first_name LIKE '%$query%' OR 
fm_tenant.contact_phone LIKE '%$query%'";
!                                       }
! 
!                                       if($sub_query_street)
!                                       {
!                                               $sub_query .= "OR 
fm_streetaddress.descr LIKE '%$query%'";
!                                       }
! 
!                                       $querymethod = " AND (fm_location" . 
($type_id).".loc1 LIKE '%$query%' $sub_query OR fm_location" . 
($type_id).".location_code LIKE '%$query%' OR loc" . ($type_id)."_name LIKE 
'%$query%')";
!                               }
                        }
  





reply via email to

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