phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php, 1.74, 1.75


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php, 1.74, 1.75 class.boinvoice.inc.php, 1.25, 1.26 class.boworkorder.inc.php, 1.13, 1.14 class.soinvoice.inc.php, 1.36, 1.37 class.soworkorder.inc.php, 1.23, 1.24 class.uiinvoice.inc.php, 1.33, 1.34 class.uiworkorder.inc.php, 1.37, 1.38
Date: Wed, 10 Sep 2003 10:36:27 -0400

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

Modified Files:
        class.bocommon.inc.php class.boinvoice.inc.php 
        class.boworkorder.inc.php class.soinvoice.inc.php 
        class.soworkorder.inc.php class.uiinvoice.inc.php 
        class.uiworkorder.inc.php 
Log Message:
no message

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** class.bocommon.inc.php      9 Sep 2003 15:24:44 -0000       1.74
--- class.bocommon.inc.php      10 Sep 2003 14:36:23 -0000      1.75
***************
*** 54,58 ****
                        $this->contacts                 = 
CreateObject('phpgwapi.contacts');
  
!                       if 
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
                        {
                                $this->dateformat               = "M d Y";
--- 54,75 ----
                        $this->contacts                 = 
CreateObject('phpgwapi.contacts');
  
! 
!                       switch($GLOBALS['phpgw_info']['server']['db_type'])
!                       {
!                               case 'mssql':
!                                       $this->dateformat               = "M d 
Y";
!                                       $this->datetimeformat   = "M d Y g:iA";
!                                       break;
!                               case 'mysql':
!                                       $this->dateformat               = 
"Y-m-d";
!                                       $this->datetimeformat   = "Y-m-d G:i:s";
!                                       break;
!                               case 'pgsql':
!                                       $this->dateformat               = "F j, 
Y";
!                                       $this->datetimeformat   = "F j, Y g:iA";
!                                       break;
!                       }
! 
!       /*              if 
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
                        {
                                $this->dateformat               = "M d Y";
***************
*** 64,67 ****
--- 81,85 ----
                                $this->datetimeformat   = "Y-m-d G:i:s";
                        }
+       */
  
                }

Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.boinvoice.inc.php     4 Sep 2003 17:27:27 -0000       1.25
--- class.boinvoice.inc.php     10 Sep 2003 14:36:23 -0000      1.26
***************
*** 527,535 ****
  
  
!               function get_invoice_user_list($format='',$selected='')
                {
!                       if (!$selected)
                        {
!                               $selected='none';
                        }
  
--- 527,535 ----
  
  
!               function 
get_invoice_user_list($format='',$selected='',$extra='',$default='')
                {
!                       if(!$selected && $default)
                        {
!                               $selected = $default;
                        }
  
***************
*** 544,548 ****
--- 544,564 ----
                        }
  
+                       if (is_array($extra))
+                       {
+                               foreach($extra as $extra_user)
+                               {
+                                       $users_extra[]=array
+                                       (
+                                               'account_lid' => $extra_user,
+                                               'account_firstname' => 
lang($extra_user)
+                                       );
+                               }
+                       }
+ 
                        $users= $this->so->get_invoice_user_list();
+                       if (is_array($users_extra) && is_array($users))
+                       {
+                               $users = $users_extra + $users;
+                       }
  
                        while (is_array($users) && list(,$user) = each($users))
***************
*** 557,561 ****
                                (
                                        'user_lid'      => $user['account_lid'],
!                                       'name'          => 
$user['account_lastname'].', '.$user['account_firstname'],
                                        'selected'      => $sel_user
                                );
--- 573,577 ----
                                (
                                        'user_lid'      => $user['account_lid'],
!                                       'name'          => 
$user['account_lastname'].' '.$user['account_firstname'],
                                        'selected'      => $sel_user
                                );

Index: class.boworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.boworkorder.inc.php   26 Aug 2003 19:16:30 -0000      1.13
--- class.boworkorder.inc.php   10 Sep 2003 14:36:23 -0000      1.14
***************
*** 48,51 ****
--- 48,52 ----
                        $cat_id = get_var('cat_id',array('POST','GET'));
                        $status_id      = 
get_var('status_id',array('POST','GET'));
+                       $search_vendor  = 
get_var('search_vendor',array('POST','GET'));
  
                        if ($start)
***************
*** 82,85 ****
--- 83,90 ----
                                $this->status_id = $status_id;
                        }
+                       if(isset($search_vendor))
+                       {
+                               $this->search_vendor = $search_vendor;
+                       }
                }
  
***************
*** 294,298 ****
                {
                        $workorder = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'status_id' => 
$this->status_id));
                        $this->total_records = $this->so->total_records;
  
--- 299,303 ----
                {
                        $workorder = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'status_id' => 
$this->status_id,'search_vendor' => $this->search_vendor));
                        $this->total_records = $this->so->total_records;
  

Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** class.soinvoice.inc.php     4 Sep 2003 17:27:27 -0000       1.36
--- class.soinvoice.inc.php     10 Sep 2003 14:36:23 -0000      1.37
***************
*** 500,504 ****
                                $consume[$i]['period']                          
        = $this->db->f('periode');
                                $consume[$i]['district_id']                     
        = $this->db->f('district_id');
!                               $consume[$i]['account_class']                   
= $this->db->f('b_account_class');
  
                                $i++;
--- 500,511 ----
                                $consume[$i]['period']                          
        = $this->db->f('periode');
                                $consume[$i]['district_id']                     
        = $this->db->f('district_id');
!                               if(!$b_account_class)
!                               {
!                                       $consume[$i]['account_class']           
        = $this->db->f('b_account_class');
!                               }
!                               else
!                               {
!                                       $consume[$i]['account_class']           
        = $b_account_class;
!                               }
  
                                $i++;

Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.soworkorder.inc.php   9 Sep 2003 15:24:49 -0000       1.23
--- class.soworkorder.inc.php   10 Sep 2003 14:36:23 -0000      1.24
***************
*** 130,136 ****
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:0);
                                $status_id = 
(isset($data['status_id'])?$data['status_id']:0);
                        }
  
!                       $sql = $this->bocommon->fm_cache('sql_workorder');
  
                        if(!$sql)
--- 130,138 ----
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:0);
                                $status_id = 
(isset($data['status_id'])?$data['status_id']:0);
+                               $search_vendor = 
(isset($data['search_vendor'])?$data['search_vendor']:'');
                        }
  
! //_debug_array($data);
!                       $sql = 
$this->bocommon->fm_cache('sql_workorder'.!!$search_vendor);
  
                        if(!$sql)
***************
*** 183,186 ****
--- 185,195 ----
                                $uicols['statustext'][]         = 
lang('Workorder User');
  
+                               $cols .= ',vendor_id';
+                               $cols_return[] = 'vendor_id';
+                               $uicols['input_type'][]         = 'text';
+                               $uicols['name'][]                       = 
'vendor_id';
+                               $uicols['descr'][]                      = 
lang('Vendor ID');
+ 
+ 
                                $cols .= ",fm_project.user_id as project_owner";
  
***************
*** 189,197 ****
                                $paranthesis .='(';
  
                                $sql    = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
                                                                        
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
  
  
!                               $this->bocommon->fm_cache('sql_workorder',$sql);
  
                                $this->uicols           = 
$this->bocommon->uicols;
--- 198,218 ----
                                $paranthesis .='(';
  
+ //                            if($search_vendor)
+                               {
+                                       $cols .= ',phpgw_addressbook.org_name';
+                                       $cols_return[] = 'org_name';
+                                       $uicols['input_type'][]         = 
'hidden';
+                                       $uicols['name'][]                       
= 'vendor_id';
+                                       $uicols['descr'][]                      
= lang('Vendor name');
+ 
+                                       $joinmethod .= " $this->left_join  
phpgw_addressbook ON (fm_workorder.vendor_id = phpgw_addressbook.id))";
+                                       $paranthesis .='(';
+                               }
+ 
                                $sql    = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
                                                                        
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
  
  
!                               
$this->bocommon->fm_cache('sql_workorder'.!!$search_vendor,$sql);
  
                                $this->uicols           = 
$this->bocommon->uicols;
***************
*** 200,215 ****
                                $this->cols_extra       = 
$this->bocommon->cols_extra;
  
!                               
$this->bocommon->fm_cache('uicols_workorder',$this->uicols);
!                               
$this->bocommon->fm_cache('cols_return_workorder',$cols_return);
!                               
$this->bocommon->fm_cache('type_id_workorder',$type_id);
!                               
$this->bocommon->fm_cache('cols_extra_workorder',$this->cols_extra);
  
                        }
                        else
                        {
!                               $this->uicols           = 
$this->bocommon->fm_cache('uicols_workorder');
!                               $cols_return            = 
$this->bocommon->fm_cache('cols_return_workorder');
!                               $type_id                        = 
$this->bocommon->fm_cache('type_id_workorder');
!                               $this->cols_extra       = 
$this->bocommon->fm_cache('cols_extra_workorder');
                        }
  
--- 221,236 ----
                                $this->cols_extra       = 
$this->bocommon->cols_extra;
  
!                               
$this->bocommon->fm_cache('uicols_workorder'.!!$search_vendor,$this->uicols);
!                               
$this->bocommon->fm_cache('cols_return_workorder'.!!$search_vendor,$cols_return);
!                               
$this->bocommon->fm_cache('type_id_workorder'.!!$search_vendor,$type_id);
!                               
$this->bocommon->fm_cache('cols_extra_workorder'.!!$search_vendor,$this->cols_extra);
  
                        }
                        else
                        {
!                               $this->uicols           = 
$this->bocommon->fm_cache('uicols_workorder'.!!$search_vendor);
!                               $cols_return            = 
$this->bocommon->fm_cache('cols_return_workorder'.!!$search_vendor);
!                               $type_id                        = 
$this->bocommon->fm_cache('type_id_workorder'.!!$search_vendor);
!                               $this->cols_extra       = 
$this->bocommon->fm_cache('cols_extra_workorder'.!!$search_vendor);
                        }
  
***************
*** 268,279 ****
  
                                $querymethod = " $where (fm_workorder.title 
LIKE '%$query%' or fm_workorder.descr LIKE '%$query%' or fm_project.address 
LIKE '%$query%' or fm_project.location_code LIKE '%$query%')";
                        }
  
!                       $sql .= " $filtermethod $querymethod";
  //echo $sql;
                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
                        $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
- 
  
                        $count_cols_return=count($cols_return);
--- 289,313 ----
  
                                $querymethod = " $where (fm_workorder.title 
LIKE '%$query%' or fm_workorder.descr LIKE '%$query%' or fm_project.address 
LIKE '%$query%' or fm_project.location_code LIKE '%$query%')";
+                               $where= 'AND';
+ 
                        }
  
!                       if($search_vendor)
!                       {
!                               if((int)$search_vendor>0)
!                               {
!                                       $querymethod_vendor = " $where 
fm_workorder.vendor_id=" .(int)$search_vendor ;
!                               }
!                               else
!                               {
!                                       $querymethod_vendor = " $where  
phpgw_addressbook.org_name LIKE '%$search_vendor%'";
!                               }
!                       }
! 
!                       $sql .= " $filtermethod $querymethod 
$querymethod_vendor";
  //echo $sql;
                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
                        $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
  
                        $count_cols_return=count($cols_return);

Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** class.uiinvoice.inc.php     4 Sep 2003 17:27:27 -0000       1.33
--- class.uiinvoice.inc.php     10 Sep 2003 14:36:23 -0000      1.34
***************
*** 100,103 ****
--- 100,111 ----
                        $loc1   = get_var('loc1',array('POST','GET'));
  
+                       $start_date=urldecode($start_date);
+                       $end_date=urldecode($end_date);
+ 
+                       if(!$end_date)
+                       {
+                               $end_date = 
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+                               $start_date = $end_date;
+                       }
  
                        $links = $this->bocommon->menu($sub);
***************
*** 111,124 ****
                        }
  
- //_debug_array($values);
-                       if(!$submit_search && $paid)
-                       {
-                               $start_date = 
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
-                               $end_date       = $start_date;
-                       }
- 
- 
                        $content = 
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$loc1,$workorder_id);
- //_debug_array($content);
  
                        $i=0;
--- 119,123 ----
***************
*** 160,163 ****
--- 159,163 ----
                                                                                
                                                                'sub'           
        =>$this->sub,
                                                                                
                                                                'paid'          
        => $paid,
+                                                                               
                                                                'vendor_id'     
        => $vendor_id,
                                                                                
                                                                'user_lid'      
        => $this->user_lid)
                                                                                
                )),
***************
*** 172,175 ****
--- 172,176 ----
                                                                                
                                                                'sub'           
        =>$this->sub,
                                                                                
                                                                'paid'          
        => $paid,
+                                                                               
                                                                'vendor_id'     
        => $vendor_id,
                                                                                
                                                                'user_lid'      
        => $this->user_lid)
                                                                                
                )),
***************
*** 186,189 ****
--- 187,191 ----
                                                                                
                                                                'sub'           
        =>$this->sub,
                                                                                
                                                                'paid'          
        => $paid,
+                                                                               
                                                                'vendor_id'     
        => $vendor_id,
                                                                                
                                                                'user_lid'      
        => $this->user_lid)
                                                                                
                )),
***************
*** 218,221 ****
--- 220,227 ----
                                'start'                         => $this->start,
                                'paid'                          => $paid,
+                               'vendor_id'                     => $vendor_id,
+                               'workorder_id'          => $workorder_id,
+                               'start_date'            => $start_date,
+                               'end_date'                      => $end_date,
                                'filter'                        => $this->filter
                        );
***************
*** 266,273 ****
                        if ($paid)
                        {
                                
$location_data=$this->bolocation->initiate_ui_location(array('type_id'=> 1));
  
-                               $data['allow_allrows']                          
        = false;
-                               $data['user_list']                              
                = $this->bo->get_invoice_user_list('select',$this->user_lid);
                                $data['cat_list']                               
                = $this->bo->select_category('select',$this->cat_id);
                                $data['start_date']     = $start_date;
--- 272,278 ----
                        if ($paid)
                        {
+                               $data['user_list']                              
                = 
$this->bo->get_invoice_user_list('select',$this->user_lid,array('all'),$default='all');
                                
$location_data=$this->bolocation->initiate_ui_location(array('type_id'=> 1));
  
                                $data['cat_list']                               
                = $this->bo->select_category('select',$this->cat_id);
                                $data['start_date']     = $start_date;
***************
*** 311,315 ****
                        else
                        {
!                               $data['user_list']                              
                = $this->bo->get_invoice_user_list('filter',$this->user_lid);
                                $data['cat_list']                               
                = $this->bo->select_category('filter',$this->cat_id);
                                $data['table_done']                             
                = $table_done;
--- 316,320 ----
                        else
                        {
!                               $data['user_list']                              
                = 
$this->bo->get_invoice_user_list('filter',$this->user_lid,array('all'),$default='none');
                                $data['cat_list']                               
                = $this->bo->select_category('filter',$this->cat_id);
                                $data['table_done']                             
                = $table_done;

Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** class.uiworkorder.inc.php   9 Sep 2003 15:24:50 -0000       1.37
--- class.uiworkorder.inc.php   10 Sep 2003 14:36:23 -0000      1.38
***************
*** 56,59 ****
--- 56,61 ----
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->status_id                        = 
$this->bo->status_id;
+                       $this->search_vendor            = 
$this->bo->search_vendor;
+ 
  
                        
$GLOBALS['phpgw']->session->appsession('sub',$this->currentapp,'project');
***************
*** 83,88 ****
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder','values','table_header',
                                                                                
'menu',
!                                                                               
'nextmatchs',
!                                                                               
'search_field'));
  
                        $sub = get_var('sub',array('POST','GET'));
--- 85,89 ----
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder','values','table_header',
                                                                                
'menu',
!                                                                               
'nextmatchs'));
  
                        $sub = get_var('sub',array('POST','GET'));
***************
*** 113,116 ****
--- 114,123 ----
                                                                
$content[$j]['row'][$k]['value']                        = 
$workorder_entry[$uicols['name'][$k]];
                                                                
$content[$j]['row'][$k]['name']                         = $uicols['name'][$k];
+                                                               
if($uicols['name'][$k]=='vendor_id')
+                                                               {
+                                                                       
$content[$j]['row'][$k]['statustext']           = $workorder_entry['org_name'];
+                                                                       
$content[$j]['row'][$k]['overlib']                      = True;
+                                                                       
$content[$j]['row'][$k]['text']                         = 
$workorder_entry[$uicols['name'][$k]];
+                                                               }
                                                        }
                                                }
***************
*** 188,191 ****
--- 195,199 ----
                                                                                
                                                        'lookup'        
=>$lookup,
                                                                                
                                                        'district_id'   => 
$this->district_id,
+                                                                               
                                                        'search_vendor' 
=>$this->search_vendor,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
));
***************
*** 204,207 ****
--- 212,216 ----
                                                                                
                                                        'lookup'        
=>$lookup,
                                                                                
                                                        'district_id'   => 
$this->district_id,
+                                                                               
                                                        'search_vendor' 
=>$this->search_vendor,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
));
***************
*** 219,222 ****
--- 228,232 ----
                                                                                
                                                        'lookup'        
=>$lookup,
                                                                                
                                                        'district_id'   => 
$this->district_id,
+                                                                               
                                                        'search_vendor' 
=>$this->search_vendor,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
));
***************
*** 235,238 ****
--- 245,249 ----
                                                                                
                                                        'lookup'        
=>$lookup,
                                                                                
                                                        'district_id'   => 
$this->district_id,
+                                                                               
                                                        'search_vendor' 
=>$this->search_vendor,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
));
***************
*** 298,306 ****
                                                'status_id'             
=>$this->status_id,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query
                        );
  
                        $data = array
                        (
                                'link_history'                                  
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.index'),
                                'lang_history_statustext'               => 
lang('search for history at this location'),
--- 309,319 ----
                                                'status_id'             
=>$this->status_id,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query,
!                                               'search_vendor' 
=>$this->search_vendor
                        );
  
                        $data = array
                        (
+                               'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
                                'link_history'                                  
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.index'),
                                'lang_history_statustext'               => 
lang('search for history at this location'),
***************
*** 329,335 ****
--- 342,350 ----
                                'user_list'                                     
        => 
$this->bocommon->get_user_list('filter',$this->filter,array('all'),$default=''),
  
+                               'lang_searchvendor_statustext'  => lang('Enter 
the vendor name to search for'),
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
                                'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
                                'query'                                         
        => $this->query,
+                               'search_vendor'                                 
=> $this->search_vendor,
                                'lang_search'                                   
=> lang('search'),
                                'table_header'                                  
=> $table_header,





reply via email to

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