phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.uiwo_hour.inc.php,1.6,1.7 hoo


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.uiwo_hour.inc.php,1.6,1.7 hook_settings.inc.php,1.6,1.7
Date: Wed, 02 Apr 2003 06:13:49 -0500

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

Modified Files:
        class.uiwo_hour.inc.php hook_settings.inc.php 
Log Message:
no message

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uiwo_hour.inc.php     1 Apr 2003 16:37:37 -0000       1.6
--- class.uiwo_hour.inc.php     2 Apr 2003 11:13:46 -0000       1.7
***************
*** 23,27 ****
                (
                        'index'                 => True,
!                       'tender'                        => True,
                        'template'              => True,
                        'list_template' => True,
--- 23,28 ----
                (
                        'index'                 => True,
!                       'tender'                => True,
!                       'view'                  => True,
                        'template'              => True,
                        'list_template' => True,
***************
*** 262,272 ****
                }
  
  
  
!               function tender_()
                {
- echo 'hei';
-                       define('PHPGW_FOOTER_RAN',True);
  
                }
  
--- 263,472 ----
                }
  
+               function index()
+               {
+ 
+                       $GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
+                                                                               
'menu',
+                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));
+ 
+ 
+                       $delete = get_var('delete',array('POST','GET'));
+                       $hour_id = get_var('hour_id',array('POST','GET'));
+                       $workorder_id = 
get_var('workorder_id',array('POST','GET'));
+                       $links = $this->bocommon->menu();
+ 
+                       if($delete && $hour_id)
+                       {
+                               $receipt = 
$this->bo->delete($hour_id,$workorder_id);
+                       }
+ 
+                       $common_data=$this->common_data($workorder_id);
+ 
+                       $table_add[] = array
+                       (
+                               'lang_add_prizebook'                            
=> lang('Add from prizebook'),
+                               'lang_add_prizebook_statustext'         => 
lang('add items from this vendors prizebook'),
+                               'add_prizebook_action'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.prizebook&workorder_id='
 . $workorder_id),
+ 
+                               'lang_add_template'                             
        => lang('Add from template'),
+                               'lang_add_template_statustext'          => 
lang('add items from a predefined template'),
+                               'add_template_action'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.list_template&workorder_id='
 . $workorder_id),
+ 
+                               'lang_add_custom'                               
        => lang('Add custom'),
+                               'lang_add_custom_statustext'            => 
lang('Add single custom line'),
+                               'add_custom_action'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.edit&from=index&workorder_id='
 . $workorder_id),
+ 
+                               'lang_save_template'                            
=> lang('Save as template'),
+                               'lang_save_template_statustext'         => 
lang('Save this workorder as a template for later use'),
+                               'save_template_action'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.save_template&from=index&workorder_id='
 . $workorder_id),
+ 
+                               'lang_print_view'                               
        => lang('Print view'),
+                               'lang_print_view_statustext'            => 
lang('View the complete workorder'),
+                               'print_view_action'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&from=index&workorder_id='
 . $workorder_id),
+ 
+                               'lang_view_tender'                              
        => lang('View tender'),
+                               'lang_view_tender_statustext'           => 
lang('View the complete workorder as a tender for bidding'),
+                               'view_tender_action'                            
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.tender&from=index&workorder_id='
 . $workorder_id),
+ 
+                               'lang_show_cost'                                
        => lang('Show calculated cost'),
+                               'lang_show_cost_statustext'                     
=> lang('Show calculated cost on the printview'),
+ 
+                               'lang_mark_draft'                               
        => lang('Mark as DRAFT'),
+                               'lang_mark_draft_statustext'            => 
lang('Mark the tender as DRAFT')
+ 
+                       );
+ 
+                       $data = array
+                       (
+                               'error'                                         
        => $receipt['error'],
+                               'message'                                       
        => $receipt['message'],
+                               'link_delete'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.index&delete=true&workorder_id='
 . $workorder_id),
+                               'function'                                      
        => 'index',
+                               'links'                                         
        => $links,
+                               'num_records'                                   
=> count($hours_list),
+                               'total_hours_records'                   => 
$common_data['total_hours_records'],
+                               'lang_total_records'                    => 
lang('Total records'),
+ 
+                               'appname'                                       
        => lang($this->currentapp),
+                               'function_msg'                                  
=> lang('list hours'),
+                               'total_hours_records'                   => 
$common_data['total_hours_records'],
+                               'lang_total_records'                    => 
lang('Total records'),
+                               'table_header_hour'                             
=> $common_data['table_header'],
+                               'values_hour'                                   
=> $common_data['content'],
+                               'workorder_data'                                
=> $common_data['workorder_data'],
+                               'table_add'                                     
        => $table_add,
+                               'table_sum'                                     
        => $common_data['table_sum']
+                       );
  
+ //_debug_array($data);
+ 
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_hour' => $data));
+                       $this->save_sessiondata();
+               }
  
!               function view()
                {
  
+                       $GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
+                                                                               
'menu',
+                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));
+ 
+                       $show_cost = get_var('show_cost',array('POST','GET'));
+                       $workorder_id = 
get_var('workorder_id',array('POST','GET'));
+                       $links = $this->bocommon->menu();
+ 
+ 
+                       $common_data            = 
$this->common_data($workorder_id);
+                       $values_hour            = $common_data['content'];
+                       $project                        = 
$this->boproject->read_single($common_data['workorder']['project_id']);
+ 
+ //_debug_array($project);
+ 
+                       $content        = 
$this->view_hour_data($values_hour,$show_cost);
+ 
+ 
+ 
+                       $table_header[] = array
+                       (
+                               'lang_post'                     => lang('Post'),
+                               'lang_code'                     => lang('Code'),
+                               'lang_descr'            => lang('descr'),
+                               'lang_unit'                     => lang('Unit'),
+                               'lang_billperae'        => lang('Bill per 
unit'),
+                               'lang_quantity'         => lang('Quantity'),
+                               'lang_cost'                     => lang('cost')
+                               );
+ 
+ 
+                       $table_send[] = array
+                       (
+                               'lang_send_order'                               
=> lang('Send Order'),
+                               'lang_send_order_statustext'    => lang('Send 
this order by email'),
+                               'send_order_action'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
 . $workorder_id)
+                       );
+ 
+                       $table_done[] = array
+                       (
+                               'lang_done'                                     
        => lang('Done'),
+                               'lang_done_statustext'                  => 
lang('Back to calculation'),
+                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.index&workorder_id='
 . $workorder_id)
+                       );
+ 
+                       $data = array
+                       (
+                               'error'                                         
        => $receipt['error'],
+                               'message'                                       
        => $receipt['message'],
+                               'link_delete'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.index&delete=true&workorder_id='
 . $workorder_id),
+                               'function'                                      
        => 'view',
+                               'links'                                         
        => $links,
+                               'num_records'                                   
=> count($hours_list),
+                               'total_hours_records'                   => 
$common_data['total_hours_records'],
+                               'lang_total_records'                    => 
lang('Total records'),
+ 
+                               'appname'                                       
        => lang($this->currentapp),
+                               'function_msg'                                  
=> lang('Send order'),
+                               'total_hours_records'                   => 
$common_data['total_hours_records'],
+                               'lang_total_records'                    => 
lang('Total records'),
+                               'table_header_view_order'               => 
$table_header,
+                               'values_view_order'                             
=> $content,
+                               'workorder_data'                                
=> $common_data['workorder_data'],
+                               'table_send'                                    
=> $table_send,
+                               'table_done'                                    
=> $table_done,
+                               'table_sum'                                     
        => $common_data['table_sum']
+                       );
+ 
+ //_debug_array($data);
+ 
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
+                       $this->save_sessiondata();
+               }
+ 
+               function view_hour_data($values_hour,$show_cost)
+               {
+ 
+                       $grouping_descr_old     = '';
+                       while (is_array($values_hour) && list(,$hour) = 
each($values_hour))
+                       {
+                               $descr= $hour['hours_descr'];
+ 
+                               if($hour['remark'])
+                               {
+                                       $descr .= "\n" . $hour['remark'];
+                               }
+ 
+                               if(!$show_cost)
+                               {
+                                       unset($hour['billperae']);
+                                       unset($hour['cost']);
+                               }
+ 
+                               if($hour['grouping_descr']!=$grouping_descr_old)
+                               {
+                                       $content[] = array
+                                       (
+                                               lang('post')                    
        => $hour['grouping_descr'],
+                                               lang('code')                    
        => '',
+                                               lang('descr')                   
        => '',
+                                               lang('unit')                    
        => '',
+                                               lang('quantity')                
        => '',
+                                               lang('bill per unit')           
=> '',
+                                               lang('cost')                    
        => ''
+                                       );
+                               }
+ 
+                               $grouping_descr_old     = 
$hour['grouping_descr'];
+ 
+                               $content[] = array
+                               (
+                                       lang('post')                            
=> $hour['post'],
+                                       lang('code')                            
=> $hour['code'],
+                                       lang('descr')                           
=> $descr,
+                                       lang('unit')                            
=> $hour['unit'],
+                                       lang('quantity')                        
=> $hour['quantity'],
+                                       lang('bill per unit')           => 
$hour['billperae'],
+                                       lang('cost')                            
=> $hour['cost']
+                               );
+                       }
+                       return $content;
                }
  
***************
*** 279,284 ****
                        $mark_draft = get_var('mark_draft',array('POST','GET'));
  
- 
- 
                        $common_data            = 
$this->common_data($workorder_id);
                        $values_hour            = $common_data['content'];
--- 479,482 ----
***************
*** 380,465 ****
                        $this->pdf->ezStream();
  
-               }
- 
-               function index()
-               {
- 
-                       $GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
-                                                                               
'menu',
-                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));
- 
- 
-                       $delete = get_var('delete',array('POST','GET'));
-                       $hour_id = get_var('hour_id',array('POST','GET'));
-                       $workorder_id = 
get_var('workorder_id',array('POST','GET'));
-                       $links = $this->bocommon->menu();
- 
-                       if($delete && $hour_id)
-                       {
-                               $receipt = 
$this->bo->delete($hour_id,$workorder_id);
-                       }
- 
-                       $common_data=$this->common_data($workorder_id);
- 
-                       $table_add[] = array
-                       (
-                               'lang_add_prizebook'                            
=> lang('Add from prizebook'),
-                               'lang_add_prizebook_statustext'         => 
lang('add items from this vendors prizebook'),
-                               'add_prizebook_action'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.prizebook&workorder_id='
 . $workorder_id),
- 
-                               'lang_add_template'                             
        => lang('Add from template'),
-                               'lang_add_template_statustext'          => 
lang('add items from a predefined template'),
-                               'add_template_action'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.list_template&workorder_id='
 . $workorder_id),
- 
-                               'lang_add_custom'                               
        => lang('Add custom'),
-                               'lang_add_custom_statustext'            => 
lang('Add single custom line'),
-                               'add_custom_action'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.edit&from=index&workorder_id='
 . $workorder_id),
- 
-                               'lang_save_template'                            
=> lang('Save as template'),
-                               'lang_save_template_statustext'         => 
lang('Save this workorder as a template for later use'),
-                               'save_template_action'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.save_template&from=index&workorder_id='
 . $workorder_id),
- 
-                               'lang_print_view'                               
        => lang('Print view'),
-                               'lang_print_view_statustext'            => 
lang('View the complete workorder'),
-                               'print_view_action'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&from=index&workorder_id='
 . $workorder_id),
- 
-                               'lang_view_tender'                              
        => lang('View tender'),
-                               'lang_view_tender_statustext'           => 
lang('View the complete workorder as a tender for bidding'),
-                               'view_tender_action'                            
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.tender&from=index&workorder_id='
 . $workorder_id),
- 
-                               'lang_show_cost'                                
        => lang('Show calculated cost'),
-                               'lang_show_cost_statustext'                     
=> lang('Show calculated cost on the printview'),
- 
-                               'lang_mark_draft'                               
        => lang('Mark as DRAFT'),
-                               'lang_mark_draft_statustext'            => 
lang('Mark the tender as DRAFT')
- 
-                       );
- 
-                       $data = array
-                       (
-                               'error'                                         
        => $receipt['error'],
-                               'message'                                       
        => $receipt['message'],
-                               'link_delete'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.index&delete=true&workorder_id='
 . $workorder_id),
-                               'function'                                      
        => 'index',
-                               'links'                                         
        => $links,
-                               'num_records'                                   
=> count($hours_list),
-                               'total_hours_records'                   => 
$common_data['total_hours_records'],
-                               'lang_total_records'                    => 
lang('Total records'),
- 
-                               'appname'                                       
        => lang($this->currentapp),
-                               'function_msg'                                  
=> lang('list hours'),
-                               'total_hours_records'                   => 
$common_data['total_hours_records'],
-                               'lang_total_records'                    => 
lang('Total records'),
-                               'table_header_hour'                             
=> $common_data['table_header'],
-                               'values_hour'                                   
=> $common_data['content'],
-                               'workorder_data'                                
=> $common_data['workorder_data'],
-                               'table_add'                                     
        => $table_add,
-                               'table_sum'                                     
        => $common_data['table_sum']
-                       );
- 
- //_debug_array($data);
- 
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_hour' => $data));
-                       $this->save_sessiondata();
                }
  
--- 578,581 ----

Index: hook_settings.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_settings.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** hook_settings.inc.php       11 Dec 2002 19:31:22 -0000      1.6
--- hook_settings.inc.php       2 Apr 2003 11:13:46 -0000       1.7
***************
*** 13,17 ****
                ''     => 'No'
        );
!       create_select_box('show new/updated tickets on main 
screen','mainscreen_show_new_updated',$yes_and_no);
  
        $acc = CreateObject('phpgwapi.accounts');
--- 13,17 ----
                ''     => 'No'
        );
!       create_select_box('show new/updated tickets on main 
screen','mainscreen_show_new_updated',$yes_and_no,'Dont think this is working - 
yet');
  
        $acc = CreateObject('phpgwapi.accounts');
***************
*** 21,25 ****
                $_groups[$entry['account_id']] = $entry['account_lid'];
        }
!       create_select_box('Default group TTS','groupdefault',$_groups);
  
        $account_list = $acc->get_list('accounts');
--- 21,25 ----
                $_groups[$entry['account_id']] = $entry['account_lid'];
        }
!       create_select_box('Default group TTS','groupdefault',$_groups,'The 
default group to assign a ticket in Helpdesk-submodule');
  
        $account_list = $acc->get_list('accounts');
***************
*** 28,32 ****
                $_accounts[$entry['account_id']] = $entry['account_lid'];
        }
!       create_select_box('Default assign to TTS','assigntodefault',$_accounts);
  
        // Choose the correct priority to display
--- 28,32 ----
                $_accounts[$entry['account_id']] = $entry['account_lid'];
        }
!       create_select_box('Default assign to 
TTS','assigntodefault',$_accounts,'The default user to assign a ticket in 
Helpdesk-submodule');
  
        // Choose the correct priority to display
***************
*** 49,55 ****
                $degree[$i] = $i . $degree_comment[$i];
        }
!       create_select_box('Default Priority TTS','prioritydefault',$priority);
  
!       create_select_box('Default Degree Request 
safety','default_safety',$degree);
        create_select_box('Default Degree Request 
aesthetics','default_aesthetics',$degree);
        create_select_box('Default Degree Request indoor 
climate','default_climate',$degree);
--- 49,55 ----
                $degree[$i] = $i . $degree_comment[$i];
        }
!       create_select_box('Default Priority 
TTS','prioritydefault',$priority,'The default priority for tickets in the 
Helpdesk-submodule');
  
!       create_select_box('Default Degree Request 
safety','default_safety',$degree,'The degree of seriousness');
        create_select_box('Default Degree Request 
aesthetics','default_aesthetics',$degree);
        create_select_box('Default Degree Request indoor 
climate','default_climate',$degree);
***************
*** 59,63 ****
  
  
!       create_input_box('Refresh TTS every (seconds)','refreshinterval');
  
        $default_start_page = array(
--- 59,63 ----
  
  
!       create_input_box('Refresh TTS every (seconds)','refreshinterval','The 
intervall for Helpdesk refresh - cheking for new tickets');
  
        $default_start_page = array(
***************
*** 65,78 ****
                'equipment' => lang('Equipment'),
                'project' => lang('Project'),
!               'workorder' => lang('Workorder'),
!               'ticket' => lang('Ticket'),
!               'invoice' => lang('Invoice'),
!               'activity' => lang('Activities')
                );
!       create_select_box('Default start 
page','default_start_page',$default_start_page);
  
        create_input_box('Yout Cellphone','cellphone');
  
!       create_select_box('Workorder Approval 
From','workorder_approval_from',$_accounts);
  
  /*    
$email=$GLOBALS['phpgw_info']['user']['preferences']['email']['address'];
--- 65,76 ----
                'equipment' => lang('Equipment'),
                'project' => lang('Project'),
!               'tts' => lang('Ticket'),
!               'invoice' => lang('Invoice')
                );
!       create_select_box('Default start 
page','default_start_page',$default_start_page,'Select your start-submodule');
  
        create_input_box('Yout Cellphone','cellphone');
  
!       create_select_box('Workorder Approval 
From','workorder_approval_from',$_accounts,'If you need approval from your 
supervisor for projects/workorders');
  
  /*    
$email=$GLOBALS['phpgw_info']['user']['preferences']['email']['address'];





reply via email to

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