phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uiworkorder.inc.php, 1.15 class.bo


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.uiworkorder.inc.php, 1.15 class.botts.inc.php, 1.12 class.boworkorder.inc.php, 1.8 class.uientity.inc.php, 1.14 class.uitts.inc.php, 1.23 class.boentity.inc.php, 1.11
Date: Wed, 9 Nov 2005 14:09:00 +0100

Update of property/inc

Modified Files:
     Branch: MAIN
            class.uiworkorder.inc.php lines: +29 -11
            class.botts.inc.php lines: +19 -7
            class.boworkorder.inc.php lines: +28 -15
            class.uientity.inc.php lines: +15 -8
            class.uitts.inc.php lines: +10 -8
            class.boentity.inc.php lines: +14 -2

Log Message:
*** empty log message ***

====================================================
Index: property/inc/class.uiworkorder.inc.php
diff -u property/inc/class.uiworkorder.inc.php:1.14 
property/inc/class.uiworkorder.inc.php:1.15
--- property/inc/class.uiworkorder.inc.php:1.14 Tue Nov  8 22:39:10 2005
+++ property/inc/class.uiworkorder.inc.php      Wed Nov  9 13:09:23 2005
@@ -65,6 +65,8 @@
                        $this->status_id                        = 
$this->bo->status_id;
                        $this->search_vendor            = 
$this->bo->search_vendor;
                        $this->wo_hour_cat_id                   = 
$this->bo->wo_hour_cat_id;
+                       $this->start_date                       = 
$this->bo->start_date;
+                       $this->end_date                         = 
$this->bo->end_date;

                        $this->menu->sub                        ='project';
                }
@@ -79,7 +81,11 @@
                                'order'                         => $this->order,
                                'filter'                        => 
$this->filter,
                                'cat_id'                        => 
$this->cat_id,
-                               'wo_hour_cat_id'                => 
$this->wo_hour_cat_id
+                               'search_vendor'                 => 
$this->search_vendor,
+                               'status_id'                     => 
$this->status_id,
+                               'wo_hour_cat_id'                => 
$this->wo_hour_cat_id,
+                               'start_date'                    => 
$this->start_date,
+                               'end_date'                      => 
$this->end_date
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -93,8 +99,8 @@
                        require('PEAR.php');
                        $xls            = 
CreateObject($this->currentapp.'.excel');

-                       $start_date = 
urldecode(get_var('start_date',array('POST','GET')));
-                       $end_date       = 
urldecode(get_var('end_date',array('POST','GET')));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);
                        $list           = 
$this->bo->read($start_date,$end_date,$allrows=True);

                        $uicols = $this->bo->uicols;
@@ -151,13 +157,12 @@

                        
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder','values','table_header',
                                                                                
'menu',
-                                                                               
'nextmatchs',
-                                                                               
'wo_hour_cat_filter'));
+                                                                               
'nextmatchs'));

                        $links = $this->menu->links('workorder');

-                       $start_date             = 
urldecode(get_var('start_date',array('POST','GET')));
-                       $end_date                       = 
urldecode(get_var('end_date',array('POST','GET')));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);
                        $workorder_list = 
$this->bo->read($start_date,$end_date);

                        $uicols = $this->bo->uicols;
@@ -419,8 +424,21 @@
                                                'wo_hour_cat_id'        
=>$this->wo_hour_cat_id,
                        );

+
+                       
if($GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters'])
+                       {
+                               $group_filters = 'select';
+                               
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour_cat_select'));
+                       }
+                       else
+                       {
+                               $group_filters = 'filter';
+                               
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour_cat_filter'));
+                       }
+
                        $data = array
                        (
+                               'group_filters'                         => 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters'],
                                'lang_excel'                            => 
'excel',
                                'link_excel'                            => 
$GLOBALS['phpgw']->link('/index.php',$link_excel),
                                'lang_excel_help'                       => 
lang('Download table to MS Excel'),
@@ -446,13 +464,13 @@
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the workorder belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
-                               'cat_list'                                      
        => $this->bo->select_category_workorder_list('filter',$this->cat_id),
+                               'cat_list'                                      
        => 
$this->bo->select_category_workorder_list($group_filters,$this->cat_id),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),

                                'lang_status_statustext'                => 
lang('Select the status the agreement belongs to. To do not use a category 
select NO STATUS'),
                                'status_name'                                   
=> 'status_id',
                                'lang_no_status'                                
=> lang('No status'),
-                               'status_list'                                   
=> $this->bo->select_status_list('filter',$this->status_id),
+                               'status_list'                                   
=> $this->bo->select_status_list($group_filters,$this->status_id),

                                'lang_wo_hour_cat_statustext'           => 
lang('Select the workorder hour category'),
                                'lang_no_wo_hour_cat'                   => 
lang('no hour category'),
@@ -461,7 +479,7 @@
                                'lang_user_statustext'                  => 
lang('Select the user the workorder belongs to. To do not use a category select 
NO USER'),
                                '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),
+                               'user_list'                                     
        => 
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),

                                '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'),

====================================================
Index: property/inc/class.botts.inc.php
diff -u property/inc/class.botts.inc.php:1.11 
property/inc/class.botts.inc.php:1.12
--- property/inc/class.botts.inc.php:1.11       Wed Nov  9 08:19:41 2005
+++ property/inc/class.botts.inc.php    Wed Nov  9 13:09:23 2005
@@ -78,6 +78,8 @@
                        $cat_id = get_var('cat_id',array('POST','GET'));
                        $district_id    = 
get_var('district_id',array('POST','GET'));
                        $allrows        = 
get_var('allrows',array('POST','GET'));
+                       $start_date     = 
get_var('start_date',array('POST','GET'));
+                       $end_date       = 
get_var('end_date',array('POST','GET'));

                        if ($start)
                        {
@@ -120,6 +122,14 @@
                        {
                                $this->allrows = $allrows;
                        }
+                       if(array_key_exists('start_date',$_POST))
+                       {
+                               $this->start_date = $start_date;
+                       }
+                       if(array_key_exists('end_date',$_POST))
+                       {
+                               $this->end_date = $end_date;
+                       }
                }


@@ -135,15 +145,17 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','tts');

-                       $this->start    = $data['start'];
-                       $this->query    = $data['query'];
-                       $this->filter   = $data['filter'];
+                       $this->start            = $data['start'];
+                       $this->query            = $data['query'];
+                       $this->filter           = $data['filter'];
                        $this->user_filter      = $data['user_filter'];
                        $this->sort             = $data['sort'];
-                       $this->order    = $data['order'];
-                       $this->cat_id   = $data['cat_id'];
+                       $this->order            = $data['order'];
+                       $this->cat_id           = $data['cat_id'];
                        $this->district_id      = $data['district_id'];
-                       $this->allrows  = $data['allrows'];
+                       $this->allrows          = $data['allrows'];
+                       $this->start_date       = $data['start_date'];
+                       $this->end_date         = $data['end_date'];
                }

                function filter($data=0)

====================================================
Index: property/inc/class.boworkorder.inc.php
diff -u property/inc/class.boworkorder.inc.php:1.7 
property/inc/class.boworkorder.inc.php:1.8
--- property/inc/class.boworkorder.inc.php:1.7  Tue Sep 13 11:38:03 2005
+++ property/inc/class.boworkorder.inc.php      Wed Nov  9 13:09:23 2005
@@ -55,6 +55,8 @@
                        $status_id      = 
get_var('status_id',array('POST','GET'));
                        $search_vendor  = 
get_var('search_vendor',array('POST','GET'));
                        $wo_hour_cat_id = 
get_var('wo_hour_cat_id',array('POST','GET'));
+                       $start_date     = 
get_var('start_date',array('POST','GET'));
+                       $end_date       = 
get_var('end_date',array('POST','GET'));

                        if ($start)
                        {
@@ -65,52 +67,63 @@
                                $this->start=0;
                        }

-                       if(isset($query))
+                       if(array_key_exists('query',$_POST) || 
array_key_exists('query',$_GET) )
                        {
                                $this->query = $query;
                        }
-                       if(isset($filter))
+                       if(array_key_exists('filter',$_POST))
                        {
                                $this->filter = $filter;
                        }
-                       if(isset($sort))
+                       if(array_key_exists('sort',$_POST))
                        {
                                $this->sort = $sort;
                        }
-                       if(isset($order))
+                       if(array_key_exists('order',$_POST))
                        {
                                $this->order = $order;
                        }
-                       if(isset($cat_id))
+                       if(array_key_exists('cat_id',$_POST))
                        {
                                $this->cat_id = $cat_id;
                        }
-                       if(isset($status_id))
+                       if(array_key_exists('status_id',$_POST))
                        {
                                $this->status_id = $status_id;
                        }
-                       if(isset($search_vendor))
+                       if(array_key_exists('search_vendor',$_POST))
                        {
                                $this->search_vendor = $search_vendor;
                        }
-                       if(isset($wo_hour_cat_id))
+                       if(array_key_exists('wo_hour_cat_id',$_POST))
                        {
                                $this->wo_hour_cat_id = $wo_hour_cat_id;
                        }
+                       if(array_key_exists('start_date',$_POST))
+                       {
+                               $this->start_date = $start_date;
+                       }
+                       if(array_key_exists('end_date',$_POST))
+                       {
+                               $this->end_date = $end_date;
+                       }
                }

                function read_sessiondata()
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','workorder');

-                       $this->start    = $data['start'];
-                       $this->query    = $data['query'];
-                       $this->filter   = $data['filter'];
+                       $this->start            = $data['start'];
+                       $this->query            = $data['query'];
+                       $this->filter           = $data['filter'];
                        $this->sort             = $data['sort'];
-                       $this->order    = $data['order'];
-                       $this->cat_id   = $data['cat_id'];
-                       $this->order    = $data['order'];
+                       $this->order            = $data['order'];
+                       $this->cat_id           = $data['cat_id'];
+                       $this->search_vendor    = $data['search_vendor'];
+                       $this->status_id        = $data['status_id'];
                        $this->wo_hour_cat_id   = $data['wo_hour_cat_id'];
+                       $this->start_date       = $data['start_date'];
+                       $this->end_date         = $data['end_date'];
                }

                function save_sessiondata($data)

====================================================
Index: property/inc/class.uientity.inc.php
diff -u property/inc/class.uientity.inc.php:1.13 
property/inc/class.uientity.inc.php:1.14
--- property/inc/class.uientity.inc.php:1.13    Tue Nov  8 22:39:10 2005
+++ property/inc/class.uientity.inc.php Wed Nov  9 13:09:23 2005
@@ -81,6 +81,8 @@
                        $this->category_name            = 
$this->bo->category_name;
                        $this->menu->sub                        
='entity_'.$this->entity_id;
                        
$GLOBALS['phpgw']->session->appsession('entity_id',$this->currentapp,$this->entity_id);
+                       $this->start_date                       = 
$this->bo->start_date;
+                       $this->end_date                         = 
$this->bo->end_date;
                }

                function save_sessiondata()
@@ -96,7 +98,9 @@
                                'part_of_town_id'       => 
$this->part_of_town_id,
                                'district_id'   => $this->district_id,
                                'entity_id'     => $this->entity_id,
-                               'status'        => $this->status
+                               'status'        => $this->status,
+                               'start_date'    => $this->start_date,
+                               'end_date'      => $this->end_date
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -110,7 +114,10 @@
                        require('PEAR.php');
                        $xls            = 
CreateObject($this->currentapp.'.excel');

-                       $list = 
$this->bo->read(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'allrows'=>true));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);
+
+                       $list = 
$this->bo->read(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'allrows'=>true,'start_date'=>$start_date,'end_date'=>$end_date));
                        $uicols = $this->bo->uicols;
                        $count_uicols_name=count($uicols['name']);
                        $j=0;
@@ -257,13 +264,13 @@
                        }

                        $GLOBALS['phpgw']->xslttpl->add_file(array('entity',
-                                                                               
'menu',
-                                                                               
'nextmatchs'));
+                                                                       'menu',
+                                                                       
'nextmatchs'));

                        $links = $this->menu->links();

-                       $start_date             = 
urldecode(get_var('start_date',array('POST','GET')));
-                       $end_date                       = 
urldecode(get_var('end_date',array('POST','GET')));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);

                        $entity_list = 
$this->bo->read(array('start_date'=>$start_date,'end_date'=>$end_date));

@@ -417,7 +424,6 @@

                        $link_date_search                                       
= 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.date_search');

-                       $group_filters  = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters']?
 'select':'filter';
                        
if($GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters'])
                        {
                                $group_filters = 'select';
@@ -504,6 +510,7 @@

                        if(!$this->entity_id || !$this->cat_id)
                        {
+                               
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
                                $receipt['error'][]=array('msg'=>lang('Please 
select type'));
                                $msgbox_data = 
$this->bocommon->msgbox_data($receipt);


====================================================
Index: property/inc/class.uitts.inc.php
diff -u property/inc/class.uitts.inc.php:1.22 
property/inc/class.uitts.inc.php:1.23
--- property/inc/class.uitts.inc.php:1.22       Wed Nov  9 08:19:41 2005
+++ property/inc/class.uitts.inc.php    Wed Nov  9 13:09:23 2005
@@ -55,6 +55,8 @@
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->district_id                      = 
$this->bo->district_id;
                        $this->allrows                          = 
$this->bo->allrows;
+                       $this->start_date                       = 
$this->bo->start_date;
+                       $this->end_date                         = 
$this->bo->end_date;

                        $this->menu->sub                        ='ticket';
                }
@@ -71,7 +73,9 @@
                                'user_filter'=> $this->user_filter,
                                'cat_id'        => $this->cat_id,
                                'district_id'   => $this->district_id,
-                               'allrows'       => $this->allrows
+                               'allrows'       => $this->allrows,
+                               'start_date'    => $this->start_date,
+                               'end_date'      => $this->end_date
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -79,9 +83,8 @@

                function excel()
                {
-
-                       $start_date     = 
urldecode(get_var('start_date',array('POST','GET')));
-                       $end_date       = 
urldecode(get_var('end_date',array('POST','GET')));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);

                        $list = $this->bo->read($start_date,$end_date);

@@ -179,8 +182,8 @@

                        $default_category = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['default_district'];
                        $default_status = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['tts_status'];
-                       $start_date     = 
urldecode(get_var('start_date',array('POST','GET')));
-                       $end_date       = 
urldecode(get_var('end_date',array('POST','GET')));
+                       $start_date     = urldecode($this->start_date);
+                       $end_date       = urldecode($this->end_date);

                        if ($default_category && !$second_display && 
!$this->district_id)
                        {
@@ -477,7 +480,6 @@
                                                'start' =>$this->start
                        );

-                       $group_filters  = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters']?
 'select':'filter';
                        
if($GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['group_filters'])
                        {
                                $group_filters = 'select';

====================================================
Index: property/inc/class.boentity.inc.php
diff -u property/inc/class.boentity.inc.php:1.10 
property/inc/class.boentity.inc.php:1.11
--- property/inc/class.boentity.inc.php:1.10    Wed Nov  9 10:34:11 2005
+++ property/inc/class.boentity.inc.php Wed Nov  9 13:09:22 2005
@@ -79,6 +79,8 @@
                        $district_id    = 
get_var('district_id',array('POST','GET'));
                        $entity_id      = 
get_var('entity_id',array('POST','GET'));
                        $status = get_var('status',array('POST','GET'));
+                       $start_date     = 
get_var('start_date',array('POST','GET'));
+                       $end_date       = 
get_var('end_date',array('POST','GET'));

                        $this->soadmin_entity           = 
CreateObject($this->currentapp.'.soadmin_entity',$entity_id,$cat_id);
                        $this->category_name    = 
$this->soadmin_entity->category_name;
@@ -92,7 +94,7 @@
                                $this->start=0;
                        }

-                       if(array_key_exists('query',$_POST))
+                       if(array_key_exists('query',$_POST) || 
array_key_exists('query',$_GET) )
                        {
                                $this->query = $query;
                        }
@@ -124,6 +126,14 @@
                        {
                                $this->status = $status;
                        }
+                       if(array_key_exists('start_date',$_POST))
+                       {
+                               $this->start_date = $start_date;
+                       }
+                       if(array_key_exists('end_date',$_POST))
+                       {
+                               $this->end_date = $end_date;
+                       }
                }

                function save_sessiondata($data)
@@ -149,6 +159,8 @@
                        $this->district_id      = $data['district_id'];
                        $this->entity_id        = $data['entity_id'];
                        $this->status           = $data['status'];
+                       $this->start_date       = $data['start_date'];
+                       $this->end_date         = $data['end_date'];
                }

                function 
column_list($selected='',$entity_id='',$cat_id,$allrows='')






reply via email to

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