phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.sowo_hour.inc.php, 1.19, 1.20 clas


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] property/inc class.sowo_hour.inc.php, 1.19, 1.20 class.uiwo_hour.inc.php, 1.41, 1.42 class.bowo_hour.inc.php, 1.12, 1.13 class.soproject.inc.php, 1.48, 1.49 class.uiproject.inc.php, 1.57, 1.58 class.uitts.inc.php, 1.47, 1.48 class.sotts.inc.php, 1.37, 1.38 class.botts.inc.php, 1.26, 1.27 class.boproject.inc.php, 1.21, 1.22 class.soworkorder.inc.php, 1.33, 1.34 class.uiinvoice.inc.php, 1.40, 1.41 class.boworkorder.inc.php, 1.20, 1.21 class.uiXport.inc.php, 1.34, 1.35 class.uiinvestment.inc.php, 1.27, 1.28 class.sotts2.inc.php, 1.7, 1.8
Date: Tue, 18 Nov 2003 16:25:19 +0000

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

Modified Files:
        class.sowo_hour.inc.php class.uiwo_hour.inc.php 
        class.bowo_hour.inc.php class.soproject.inc.php 
        class.uiproject.inc.php class.uitts.inc.php 
        class.sotts.inc.php class.botts.inc.php 
        class.boproject.inc.php class.soworkorder.inc.php 
        class.uiinvoice.inc.php class.boworkorder.inc.php 
        class.uiXport.inc.php class.uiinvestment.inc.php 
        class.sotts2.inc.php 
Log Message:
no message

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** class.sotts.inc.php 16 Nov 2003 17:51:44 -0000      1.37
--- class.sotts.inc.php 18 Nov 2003 16:25:16 -0000      1.38
***************
*** 181,184 ****
--- 181,185 ----
                                $tickets[$i]['group_id']                = 
$this->db->f('group_id');
                                $tickets[$i]['entry_date']              = 
$this->db->f('entry_date');
+                               $tickets[$i]['finnish_date']    = 
$this->db->f('finnish_date');
  
                                $this->db2->query("select count(*) from 
fm_tts_views where id='" . $this->db->f('id')
***************
*** 277,280 ****
--- 278,282 ----
                                $ticket['p_entity_id']          = 
$this->db->f('p_entity_id');
                                $ticket['p_cat_id']                     = 
$this->db->f('p_cat_id');
+                               $ticket['finnish_date']         = 
$this->db->f('finnish_date');
  
                                $user_id=(int)$this->db->f('user_id');
***************
*** 429,433 ****
                                $ticket['location_code'],
                                $address,
!                               time());
  
                        $values = $this->bocommon->validate_db_insert($values);
--- 431,436 ----
                                $ticket['location_code'],
                                $address,
!                               time(),
!                               $ticket['finnish_date']);
  
                        $values = $this->bocommon->validate_db_insert($values);
***************
*** 436,440 ****
                        $this->db->query("insert into fm_tts_tickets 
(priority,user_id,"
                                . 
"assignedto,group_id,subject,cat_id,status,details,location_code,"
!                               . "address,entry_date $cols)"
                                . "VALUES ($values $vals )",__LINE__,__FILE__);
  
--- 439,443 ----
                        $this->db->query("insert into fm_tts_tickets 
(priority,user_id,"
                                . 
"assignedto,group_id,subject,cat_id,status,details,location_code,"
!                               . "address,entry_date,finnish_date $cols)"
                                . "VALUES ($values $vals )",__LINE__,__FILE__);
  
***************
*** 448,451 ****
--- 451,458 ----
                        {
                                $this->historylog->add('O',$id,mktime(),'');
+                               if($ticket['finnish_date'])
+                               {
+                                       
$this->historylog->add('IF',$id,$ticket['finnish_date'],'');
+                               }
                        }
  

Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** class.uiproject.inc.php     17 Nov 2003 22:49:33 -0000      1.57
--- class.uiproject.inc.php     18 Nov 2003 16:25:15 -0000      1.58
***************
*** 822,825 ****
--- 822,831 ----
                        }
  
+                       if($values['reserve'])
+                       {
+                               
$reserve_remainder=$values['reserve']+$values['deviation'];
+                               $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
+                       }
+ 
                        $data = array
                        (
***************
*** 888,891 ****
--- 894,901 ----
                                'lang_reserve_statustext'               => 
lang('Enter the reserve'),
  
+                               'lang_reserve_remainder'                => 
lang('reserve remainder'),
+                               'value_reserve_remainder'               => 
$reserve_remainder,
+                               'value_reserve_remainder_percent'=> 
$remainder_percent,
+ 
                                'vendor_data'                                   
=> $vendor_data,
                                'location_data'                                 
=> $location_data,
***************
*** 1064,1067 ****
--- 1074,1083 ----
  
  
+                       if($values['reserve'])
+                       {
+                               
$reserve_remainder=$values['reserve']+$values['deviation'];
+                               $remainder_percent= 
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
+                       }
+ 
  //_debug_array($values);
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
***************
*** 1103,1106 ****
--- 1119,1130 ----
                                'lang_budget'                                   
=> lang('Budget'),
                                'value_budget'                                  
=> $values['budget'],
+ 
+                               'lang_reserve'                                  
=> lang('reserve'),
+                               'value_reserve'                                 
=> $values['reserve'],
+                               'lang_reserve_statustext'               => 
lang('Enter the reserve'),
+ 
+                               'lang_reserve_remainder'                => 
lang('reserve remainder'),
+                               'value_reserve_remainder'               => 
$reserve_remainder,
+                               'value_reserve_remainder_percent'=> 
$remainder_percent,
  
                                'vendor_data'                                   
=> $vendor_data,

Index: class.boproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** class.boproject.inc.php     6 Nov 2003 18:51:02 -0000       1.21
--- class.boproject.inc.php     18 Nov 2003 16:25:16 -0000      1.22
***************
*** 332,339 ****
                        {
                                $sum_workorder_budget= 
$sum_workorder_budget+$workorder_data[$i]['budget'];
                                $sum_workorder_calculation= 
$sum_workorder_calculation+$workorder_data[$i]['calculation'];
                                
$project['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
!                               
$project['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
 2, ',', ' ');
!                               
$project['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
 2, ',', ' ');
                                $vendor = 
$contacts->read_single_entry((int)$workorder_data[$i]['vendor_id'],array('org_name'=>'org_name'));
                                $project['workorder_budget'][$i]['vendor_name'] 
= $vendor[0]['org_name'];
--- 332,340 ----
                        {
                                $sum_workorder_budget= 
$sum_workorder_budget+$workorder_data[$i]['budget'];
+                               $sum_deviation= 
$sum_deviation+$workorder_data[$i]['deviation'];
                                $sum_workorder_calculation= 
$sum_workorder_calculation+$workorder_data[$i]['calculation'];
                                
$project['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
!                               
$project['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
 2, ',', '');
!                               
$project['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
 2, ',', '');
                                $vendor = 
$contacts->read_single_entry((int)$workorder_data[$i]['vendor_id'],array('org_name'=>'org_name'));
                                $project['workorder_budget'][$i]['vendor_name'] 
= $vendor[0]['org_name'];
***************
*** 341,346 ****
                        if($workorder_data)
                        {
!                               $project['sum_workorder_budget']= 
number_format($sum_workorder_budget, 2, ',', ' ');
!                               $project['sum_workorder_calculation']= 
number_format($sum_workorder_calculation*$tax, 2, ',', ' ');
                        }
  
--- 342,348 ----
                        if($workorder_data)
                        {
!                               $project['sum_workorder_budget']= 
number_format($sum_workorder_budget, 2, ',', '');
!                               $project['deviation']= $sum_deviation;
!                               $project['sum_workorder_calculation']= 
number_format($sum_workorder_calculation*$tax, 2, ',', '');
                        }
  

Index: class.boworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.boworkorder.inc.php   29 Oct 2003 17:28:43 -0000      1.20
--- class.boworkorder.inc.php   18 Nov 2003 16:25:17 -0000      1.21
***************
*** 329,333 ****
                        $config->read_repository();
                        $tax = 1+($config->config_data['fm_tax'])/100;
!                       $workorder['calculation']       
=number_format($workorder['calculation']*$tax, 2, ',', ' ');
                        return $workorder;
                }
--- 329,333 ----
                        $config->read_repository();
                        $tax = 1+($config->config_data['fm_tax'])/100;
!                       $workorder['calculation']       
=number_format($workorder['calculation']*$tax, 2, ',', '');
                        return $workorder;
                }

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** class.uiwo_hour.inc.php     17 Nov 2003 22:49:39 -0000      1.41
--- class.uiwo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.42
***************
*** 99,106 ****
--- 99,109 ----
                        if (isset($list) AND is_array($list))
                        {
+                               $dateformat                                     
        = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                                foreach($list as $entry)
                                {
                                        $sum_deviation = $sum_deviation + 
$entry['amount'];
  
+                                       $entry_date = 
(isset($entry['entry_date'])?$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat):'');
+ 
                                        $content[] = array
                                        (
***************
*** 108,111 ****
--- 111,115 ----
                                                'amount'                        
                => $entry['amount'],
                                                'descr'                         
                => $entry['descr'],
+                                               'entry_date'                    
        => $entry_date,
                                                'link_edit'                     
                => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.edit_deviation&workorder_id='
 . $workorder_id . '&hour_id=' . $hour_id . '&id=' . $entry['id']),
                                                'lang_edit_statustext'          
=> lang('edit the deviation'),
***************
*** 121,127 ****
                        $table_header[] = array
                        (
!                               'lang_ID'               => lang('ID'),
                                'lang_amount'   => lang('amount'),
                                'lang_descr'    => lang('Descr'),
                                'lang_edit'             => lang('edit'),
                                'lang_delete'   => lang('delete')
--- 125,132 ----
                        $table_header[] = array
                        (
!                               'lang_id'               => lang('ID'),
                                'lang_amount'   => lang('amount'),
                                'lang_descr'    => lang('Descr'),
+                               'lang_date'             => lang('date'),
                                'lang_edit'             => lang('edit'),
                                'lang_delete'   => lang('delete')
***************
*** 162,165 ****
--- 167,171 ----
                        $id                             = 
get_var('id',array('POST','GET'));
                        $values                 = 
get_var('values',array('POST','GET'));
+                       $dateformat             = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour'));
***************
*** 215,219 ****
                        );
  
- //                    $workorder      = 
$this->boworkorder->read_single($workorder_id);
                        $hour = $this->bo->read_single_hour($hour_id);
  
--- 221,224 ----
***************
*** 223,235 ****
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
                                'lang_workorder'                                
=> lang('Workorder ID'),
                                'lang_hour_id'                                  
=> lang('Post'),
-                               'entity_name'                                   
=> $entity['name'],
-                               'lang_category'                                 
=> lang('category'),
-                               'category_name'                                 
=> $category['name'],
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
-                               'lang_name_standardtext'                => 
lang('Enter a name of the standard'),
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.deviation&workorder_id='
 . $workorder_id . '&hour_id=' . $hour_id),
--- 228,238 ----
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
+                       $entry_date = 
(isset($values['entry_date'])?$GLOBALS['phpgw']->common->show_date($values['entry_date'],$dateformat):'');
+ 
                        $data = array
                        (
                                'lang_workorder'                                
=> lang('Workorder ID'),
                                'lang_hour_id'                                  
=> lang('Post'),
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.deviation&workorder_id='
 . $workorder_id . '&hour_id=' . $hour_id),
***************
*** 238,244 ****
--- 241,249 ----
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
+                               'lang_date'                                     
        => lang('date'),
                                'value_id'                                      
        => $id,
                                'value_workorder_id'                    => 
$workorder_id,
                                'value_hour_id'                                 
=> $hour_id,
+                               'entry_date'                                    
=> $entry_date,
                                'value_id'                                      
        => $id,
                                'lang_descr_standardtext'               => 
lang('Enter a description of the deviation'),
***************
*** 250,254 ****
                        );
  
!                       $appname                                                
= lang('entity');
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
--- 255,259 ----
                        );
  
!                       $appname                                                
= lang('workorder');
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
***************
*** 276,279 ****
--- 281,285 ----
                                {
                                        $sum_hour       = $sum_hour + 
$hour['cost'];
+                                       $sum_deviation  = $sum_deviation + 
$hour['deviation'];
  
                                        
if($hour['grouping_descr']!=$grouping_descr_old)
***************
*** 337,340 ****
--- 343,347 ----
                        }
  
+                       
$this->bo->update_deviation(array('workorder_id'=>$workorder_id,'sum_deviation'=>$sum_deviation));
  
  //_debug_array($content);
***************
*** 358,377 ****
                        $tax = $this->config->config_data['fm_tax'];
  
!                       $addition_percentage = $sum_hour * 
$workorder['addition_percentage']/100;
!                       $sum_tax        = ($sum_hour + $addition_percentage + 
$workorder['addition_rs'])*$tax/100;
!                       $total_sum      = $sum_hour + $addition_percentage + 
$workorder['addition_rs'] + $sum_tax;
  
                        $table_sum[] = array
                        (
                                'lang_sum_calculation'                  => 
lang('Sum calculation'),
!                               'value_sum_calculation'                 => 
number_format($sum_hour, 2, ',', ' '),
                                'lang_addition_rs'                              
=> lang('Rig addition'),
!                               'value_addition_rs'                             
=> number_format($workorder['addition_rs'], 2, ',', ' '),
                                'lang_addition_percentage'              => 
lang('Percentage addition'),
!                               'value_addition_percentage'             => 
number_format($addition_percentage, 2, ',', ' '),
                                'lang_sum_tax'                                  
=> lang('Sum tax'),
!                               'value_sum_tax'                                 
=> number_format($sum_tax, 2, ',', ' '),
                                'lang_total_sum'                                
=> lang('Total sum'),
!                               'value_total_sum'                               
=> number_format($total_sum, 2, ',', ' ')
                        );
  
--- 365,389 ----
                        $tax = $this->config->config_data['fm_tax'];
  
!                       $sum_result     = $sum_hour+$sum_deviation;
! 
!                       $addition_percentage = $sum_result * 
$workorder['addition_percentage']/100;
!                       $sum_tax        = ($sum_result + $addition_percentage + 
$workorder['addition_rs'])*$tax/100;
!                       $total_sum      = $sum_result + $addition_percentage + 
$workorder['addition_rs'] + $sum_tax;
  
                        $table_sum[] = array
                        (
                                'lang_sum_calculation'                  => 
lang('Sum calculation'),
!                               'value_sum_calculation'                 => 
number_format($sum_hour, 2, ',', ''),
                                'lang_addition_rs'                              
=> lang('Rig addition'),
!                               'value_addition_rs'                             
=> number_format($workorder['addition_rs'], 2, ',', ''),
                                'lang_addition_percentage'              => 
lang('Percentage addition'),
!                               'value_addition_percentage'             => 
number_format($addition_percentage, 2, ',', ''),
                                'lang_sum_tax'                                  
=> lang('Sum tax'),
!                               'value_sum_tax'                                 
=> number_format($sum_tax, 2, ',', ''),
                                'lang_total_sum'                                
=> lang('Total sum'),
!                               'value_total_sum'                               
=> number_format($total_sum, 2, ',', ''),
!                               'lang_sum_deviation'                    => 
lang('Sum deviation'),
!                               'sum_deviation'                                 
=> number_format($sum_deviation, 2, ',', ''),
!                               'sum_result'                                    
=> number_format($sum_result, 2, ',', '')
                        );
  

Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** class.uiinvestment.inc.php  28 Oct 2003 15:14:42 -0000      1.27
--- class.uiinvestment.inc.php  18 Nov 2003 16:25:17 -0000      1.28
***************
*** 137,147 ****
                                        'descr'                                 
        => $investment['descr'],
                                        'initial_value_ex'                      
=> $investment['initial_value'],
!                                       'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ' '),
                                        'value_ex'                              
        => $investment['value'],
!                                       'value'                                 
        => number_format($investment['value'], 0, ',', ' '),
                                        'this_index'                            
=> $investment['this_index'],
                                        'index_count'                           
=> $investment['index_count'],
                                        'entity_name'                           
=> $investment['entity_name'],
!                                       'this_write_off'                        
=> number_format($investment['this_write_off'], 0, ',', ' '),
                                        'link_history'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.history&entity_id='
 . $investment['entity_id'].'&investment_id=' . 
$investment['investment_id'].'&entity_type=' . $this->cat_id),
                                        'lang_history'                          
=> lang('History'),
--- 137,147 ----
                                        'descr'                                 
        => $investment['descr'],
                                        'initial_value_ex'                      
=> $investment['initial_value'],
!                                       'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ''),
                                        'value_ex'                              
        => $investment['value'],
!                                       'value'                                 
        => number_format($investment['value'], 0, ',', ''),
                                        'this_index'                            
=> $investment['this_index'],
                                        'index_count'                           
=> $investment['index_count'],
                                        'entity_name'                           
=> $investment['entity_name'],
!                                       'this_write_off'                        
=> number_format($investment['this_write_off'], 0, ',', ''),
                                        'link_history'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.history&entity_id='
 . $investment['entity_id'].'&investment_id=' . 
$investment['investment_id'].'&entity_type=' . $this->cat_id),
                                        'lang_history'                          
=> lang('History'),
***************
*** 263,268 ****
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
!                               'sum_initial_value'                             
=> number_format($sum_initial_value, 0, ',', ' '),
!                               'sum_value'                                     
        => number_format($sum_value, 0, ',', ' '),
  
                                'table_update'                                  
=> $table_update,
--- 263,268 ----
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
!                               'sum_initial_value'                             
=> number_format($sum_initial_value, 0, ',', ''),
!                               'sum_value'                                     
        => number_format($sum_value, 0, ',', ''),
  
                                'table_update'                                  
=> $table_update,
***************
*** 348,358 ****
                                        'date'                                  
        => @date($dateformat,strtotime($investment['date'])),
                                        'initial_value_ex'                      
=> $investment['initial_value'],
!                                       'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ' '),
                                        'value_ex'                              
        => $investment['value'],
!                                       'value'                                 
        => number_format($investment['value'], 0, ',', ' '),
                                        'this_index'                            
=> $investment['this_index'],
                                        'current_index'                         
=> $investment['current_index'],
                                        'index_count'                           
=> $investment['index_count'],
!                                       'this_write_off'                        
=> number_format($investment['this_write_off'], 0, ',', ' '),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.delete&entity_id='
 . $entity_id.'&investment_id=' . $investment_id.'&index_count=' . 
$investment['index_count'].'&entity_type='.$entity_type),
                                        'lang_delete'                           
=> lang('Delete'),
--- 348,358 ----
                                        'date'                                  
        => @date($dateformat,strtotime($investment['date'])),
                                        'initial_value_ex'                      
=> $investment['initial_value'],
!                                       'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ''),
                                        'value_ex'                              
        => $investment['value'],
!                                       'value'                                 
        => number_format($investment['value'], 0, ',', ''),
                                        'this_index'                            
=> $investment['this_index'],
                                        'current_index'                         
=> $investment['current_index'],
                                        'index_count'                           
=> $investment['index_count'],
!                                       'this_write_off'                        
=> number_format($investment['this_write_off'], 0, ',', ''),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.delete&entity_id='
 . $entity_id.'&investment_id=' . $investment_id.'&index_count=' . 
$investment['index_count'].'&entity_type='.$entity_type),
                                        'lang_delete'                           
=> lang('Delete'),

Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** class.uiXport.inc.php       28 Oct 2003 15:14:40 -0000      1.34
--- class.uiXport.inc.php       18 Nov 2003 16:25:17 -0000      1.35
***************
*** 381,385 ****
                                                
$content[$i]['row'][$k]['align']        = 'right';
                                                
$sum=$sum+$table[$i][$import[$header[$k]]];
!                                               
$content[$i]['row'][$k]['value']        = 
number_format($table[$i][$import[$header[$k]]], 2, ',', ' ');
                                        }
                                }
--- 381,385 ----
                                                
$content[$i]['row'][$k]['align']        = 'right';
                                                
$sum=$sum+$table[$i][$import[$header[$k]]];
!                                               
$content[$i]['row'][$k]['value']        = 
number_format($table[$i][$import[$header[$k]]], 2, ',', '');
                                        }
                                }
***************
*** 445,449 ****
                                'budsjettansvarligid'                   => 
$table[1]['budsjettansvarligid'],
                                'lang_sum'                                      
        => lang('Sum'),
!                               'sum'                                           
        => number_format($sum, 2, ',', ' '),
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
--- 445,449 ----
                                'budsjettansvarligid'                   => 
$table[1]['budsjettansvarligid'],
                                'lang_sum'                                      
        => lang('Sum'),
!                               'sum'                                           
        => number_format($sum, 2, ',', ''),
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** class.uitts.inc.php 17 Nov 2003 22:49:30 -0000      1.47
--- class.uitts.inc.php 18 Nov 2003 16:25:16 -0000      1.48
***************
*** 94,97 ****
--- 94,98 ----
                                        'address'                               
        => $ticket['address'],
                                        'date'                                  
        => $ticket['timestampopened'],
+                                       'finnish_date'                          
=> $ticket['finnish_date'],
                                        'user'                                  
        => $ticket['user'],
                                        'assignedto'                            
=> $ticket['assignedto'],
***************
*** 180,183 ****
--- 181,198 ----
                                                                                
                                                        
'allrows'=>$this->allrows)
                                                                                
)),
+                               'sort_finnish_date'     => 
$this->nextmatchs->show_sort_order(array
+                                                                               
(
+                                                                               
        'sort'  => $this->sort,
+                                                                               
        'var'   =>      'finnish_date',
+                                                                               
        'order' =>      $this->order,
+                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uitts.index',
+                                                                               
                                                        'cat_id'        
=>$this->cat_id,
+                                                                               
                                                        'filter'        
=>$this->filter,
+                                                                               
                                                        'district_id'   => 
$this->district_id,
+                                                                               
                                                        'query'         
=>$this->query,
+                                                                               
                                                        
'allrows'=>$this->allrows)
+                                                                               
)),
+                               'lang_finnish_date'             => 
lang('finnish date'),
+                               'lang_finnish_statustext'=> lang('presumed 
finnish date'),
                                'lang_opened_by'                => lang('Opened 
by')
                        );
***************
*** 330,338 ****
                                }
  
!                               if(!$values['details'])
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please give som details !'));
                                }
! 
                                if(!$values['location']['loc1'] && 
!$values['extra']['equipment_id'])
                                {
--- 345,353 ----
                                }
  
! /*                            if(!$values['details'])
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please give som details !'));
                                }
! */
                                if(!$values['location']['loc1'] && 
!$values['extra']['equipment_id'])
                                {
***************
*** 393,400 ****
--- 408,449 ----
                        }
  
+                       $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+                       $sep = '/';
+                       $dlarr[strpos($dateformat,'y')] = 'yyyy';
+                       $dlarr[strpos($dateformat,'m')] = 'MM';
+                       $dlarr[strpos($dateformat,'d')] = 'DD';
+                       ksort($dlarr);
+ 
+                       $dateformat= (implode($sep,$dlarr));
+ 
+                       switch(substr($dateformat,0,1))
+                       {
+                               case 'M':
+                                       $dateformat_validate= 
"javascript:vDateType='1'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'1')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'1')";
+                                       break;
+                               case 'y':
+                                       
$dateformat_validate="javascript:vDateType='2'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'2')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'2')";
+                                       break;
+                               case 'D':
+                                       
$dateformat_validate="javascript:vDateType='3'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'3')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'3')";
+                                       break;
+                       }
+ 
+ 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
+                               'lang_dateformat'                               
=> strtolower($dateformat),
+                               'dateformat_validate'                   => 
$dateformat_validate,
+                               'onKeyUp'                                       
        => $onKeyUp,
+                               'onBlur'                                        
        => $onBlur,
+                               'dateformat_source'                             
=> './'.$this->currentapp.'/inc/dateformat.js',
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'location_data'                                 
=> $location_data,
***************
*** 427,430 ****
--- 476,483 ----
                                'value_details'                                 
=> $values['details'],
                                'value_subject'                                 
=> $values['subject'],
+ 
+                               'lang_finnish_date'                             
=> lang('finnish date'),
+                               'value_finnish_date'                    => 
$values['finnish_date'],
+ 
                                'lang_done_statustext'                  => 
lang('Back to the ticket list'),
                                'lang_save_statustext'                  => 
lang('Save the ticket'),
***************
*** 602,605 ****
--- 655,685 ----
  
  //_debug_array($link_entity);
+                       $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+                       $sep = '/';
+                       $dlarr[strpos($dateformat,'y')] = 'yyyy';
+                       $dlarr[strpos($dateformat,'m')] = 'MM';
+                       $dlarr[strpos($dateformat,'d')] = 'DD';
+                       ksort($dlarr);
+ 
+                       $dateformat= (implode($sep,$dlarr));
+ 
+                       switch(substr($dateformat,0,1))
+                       {
+                               case 'M':
+                                       $dateformat_validate= 
"javascript:vDateType='1'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'1')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'1')";
+                                       break;
+                               case 'y':
+                                       
$dateformat_validate="javascript:vDateType='2'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'2')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'2')";
+                                       break;
+                               case 'D':
+                                       
$dateformat_validate="javascript:vDateType='3'";
+                                       $onKeyUp        = 
"DateFormat(this,this.value,event,false,'3')";
+                                       $onBlur         = 
"DateFormat(this,this.value,event,true,'3')";
+                                       break;
+                       }
  
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
***************
*** 607,610 ****
--- 687,698 ----
                        $data = array
                        (
+                               'lang_dateformat'                               
=> strtolower($dateformat),
+                               'dateformat_validate'                   => 
$dateformat_validate,
+                               'onKeyUp'                                       
        => $onKeyUp,
+                               'onBlur'                                        
        => $onBlur,
+                               'dateformat_source'                             
=> './'.$this->currentapp.'/inc/dateformat.js',
+                               'lang_finnish_date'                             
=> lang('finnish date'),
+                               'value_finnish_date'                    => 
$ticket['finnish_date'],
+ 
                                'link_entity'                                   
=> $link_entity,
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),

Index: class.sotts2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts2.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** class.sotts2.inc.php        15 Oct 2003 17:27:38 -0000      1.7
--- class.sotts2.inc.php        18 Nov 2003 16:25:17 -0000      1.8
***************
*** 28,31 ****
--- 28,34 ----
                        $this->db->next_record();
  
+ 
+                       $location_code  = $this->db->f('location_code');
+                       $oldfinnish_date        = $this->db->f('finnish_date');
                        $oldassigned            = $this->db->f('assignedto');
                        $oldgroup_id            = $this->db->f('group_id');
***************
*** 65,70 ****
--- 68,82 ----
                        ** B - Billing rate
                        ** H - Billing hours
+                       ** F - finnish date
                        */
  
+                       $ticket['finnish_date'] = 
$this->bocommon->date_to_timestamp($ticket['finnish_date']);
+                       if ($oldfinnish_date != $ticket['finnish_date'])
+                       {
+                               $fields_updated = True;
+                               $this->db->query("update fm_tts_tickets set 
finnish_date='" . $ticket['finnish_date']
+                                       . "' where id='$id'",__LINE__,__FILE__);
+                               
$this->historylog->add('F',$id,$ticket['finnish_date'],$oldfinnish_date);
+                       }
  
                        if ($old_status != $ticket['status'])
***************
*** 158,162 ****
                                if 
($this->config->config_data['mailnotification'])
                                {
!                                       
$receipt=$this->bo->mail_ticket($id,$fields_updated,'');
  
                                }
--- 170,174 ----
                                if 
($this->config->config_data['mailnotification'])
                                {
!                                       
$receipt=$this->bo->mail_ticket($id,$fields_updated,'',$location_code);
  
                                }

Index: class.bowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bowo_hour.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** class.bowo_hour.inc.php     17 Nov 2003 22:49:42 -0000      1.12
--- class.bowo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.13
***************
*** 268,271 ****
--- 268,276 ----
                }
  
+               function update_deviation($data)
+               {
+                       $this->so->update_deviation($data);
+               }
+ 
                function save_deviation($values,$action='')
                {

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** class.soproject.inc.php     17 Nov 2003 22:49:35 -0000      1.48
--- class.soproject.inc.php     18 Nov 2003 16:25:15 -0000      1.49
***************
*** 368,372 ****
                function project_workorder_data($project_id = '')
                {
!                       $this->db->query("select budget, id as workorder_id, 
vendor_id, calculation,rig_addition,addition from fm_workorder where 
project_id='$project_id'");
                        while ($this->db->next_record())
                        {
--- 368,372 ----
                function project_workorder_data($project_id = '')
                {
!                       $this->db->query("select budget, id as workorder_id, 
vendor_id, calculation,rig_addition,addition,deviation from fm_workorder where 
project_id='$project_id'");
                        while ($this->db->next_record())
                        {
***************
*** 374,377 ****
--- 374,378 ----
                                        'workorder_id'  => 
$this->db->f('workorder_id'),
                                        'budget'                => 
$this->db->f('budget'),
+                                       'deviation'             => 
$this->db->f('deviation'),
                                        'calculation'   => 
($this->db->f('calculation')*(1+$this->db->f('addition')/100))+$this->db->f('rig_addition'),
                                        'vendor_id'     => 
$this->db->f('vendor_id')

Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** class.sowo_hour.inc.php     17 Nov 2003 22:49:41 -0000      1.19
--- class.sowo_hour.inc.php     18 Nov 2003 16:25:15 -0000      1.20
***************
*** 151,155 ****
                                $deviation[] = array
                                (
!                               //      'project_id'            => 
$this->db->f('project_id'),
                                        'workorder_id'          => 
$workorder_id,
                                        'hour_id'                       => 
$hour_id,
--- 151,155 ----
                                $deviation[] = array
                                (
!                                       'entry_date'            => 
$this->db->f('entry_date'),
                                        'workorder_id'          => 
$workorder_id,
                                        'hour_id'                       => 
$hour_id,
***************
*** 180,184 ****
                        $deviation = array
                        (
!                               //'project_id'          => 
$this->db->f('project_id'),
                                'workorder_id'          => $workorder_id,
                                'hour_id'                       => $hour_id,
--- 180,184 ----
                        $deviation = array
                        (
!                               'entry_date'            => 
$this->db->f('entry_date'),
                                'workorder_id'          => $workorder_id,
                                'hour_id'                       => $hour_id,
***************
*** 205,213 ****
                                $values['amount'],
                                $values['descr'],
                                );
  
                        $values_insert  = 
$this->bocommon->validate_db_insert($values_insert);
  
!                       $this->db->query("INSERT INTO fm_wo_h_deviation 
(workorder_id,hour_id,id,amount,descr) VALUES 
($values_insert)",__LINE__,__FILE__);
  
                        $receipt['id']= $id;
--- 205,214 ----
                                $values['amount'],
                                $values['descr'],
+                               time()
                                );
  
                        $values_insert  = 
$this->bocommon->validate_db_insert($values_insert);
  
!                       $this->db->query("INSERT INTO fm_wo_h_deviation 
(workorder_id,hour_id,id,amount,descr,entry_date) VALUES 
($values_insert)",__LINE__,__FILE__);
  
                        $receipt['id']= $id;
***************
*** 234,237 ****
--- 235,250 ----
                        return $receipt;
                }
+ 
+               function update_deviation($data)
+               {
+                       if(is_array($data))
+                       {
+                               $id = 
(isset($data['workorder_id'])?$data['workorder_id']:0);
+                               $deviation = 
(isset($data['sum_deviation'])?$data['sum_deviation']:0);
+                       }
+                       $this->db->query("UPDATE fm_workorder set deviation = 
$deviation WHERE id=$id",__LINE__,__FILE__);
+                       return $receipt;
+               }
+ 
  
                function next_record($workorder_id)

Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** class.uiinvoice.inc.php     29 Oct 2003 17:28:43 -0000      1.40
--- class.uiinvoice.inc.php     18 Nov 2003 16:25:17 -0000      1.41
***************
*** 127,131 ****
  
                                        $sum                                    
                        = $sum + $extra['amount'];
!                                       $content[$i]['amount']                  
        = number_format($extra['amount'], 2, ',', ' ');
                                        $content[$i]['lang_payment_date']       
= lang('Payment Date');
                                        $content[$i]['link_sub']                
        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.list_sub&user_lid='.$this->user_lid
 . '&query=' . $this->query);
--- 127,131 ----
  
                                        $sum                                    
                        = $sum + $extra['amount'];
!                                       $content[$i]['amount']                  
        = number_format($extra['amount'], 2, ',', '');
                                        $content[$i]['lang_payment_date']       
= lang('Payment Date');
                                        $content[$i]['link_sub']                
        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.list_sub&user_lid='.$this->user_lid
 . '&query=' . $this->query);
***************
*** 239,243 ****
  
                        $data['msgbox_data']                                    
= $GLOBALS['phpgw']->common->msgbox($msgbox_data);
!                       $data['sum']                                            
        = number_format($sum, 2, ',', ' ');
                        $data['overlib_source']                                 
= './'.$this->currentapp.'/inc/overlib.js';
                        $data['links']                                          
        = $links;
--- 239,243 ----
  
                        $data['msgbox_data']                                    
= $GLOBALS['phpgw']->common->msgbox($msgbox_data);
!                       $data['sum']                                            
        = number_format($sum, 2, ',', '');
                        $data['overlib_source']                                 
= './'.$this->currentapp.'/inc/overlib.js';
                        $data['links']                                          
        = $links;
***************
*** 377,381 ****
                                {
                                        $sum                                    
                                        = $sum + $content[$i]['amount'];
!                                       $content[$i]['amount']                  
                        = number_format($content[$i]['amount'], 2, ',', ' ');
                                        $content[$i]['paid']                    
                        = $paid;
                                        
$content[$i]['lang_tax_code_statustext']        = lang('select the appropriate 
tax code');
--- 377,381 ----
                                {
                                        $sum                                    
                                        = $sum + $content[$i]['amount'];
!                                       $content[$i]['amount']                  
                        = number_format($content[$i]['amount'], 2, ',', '');
                                        $content[$i]['paid']                    
                        = $paid;
                                        
$content[$i]['lang_tax_code_statustext']        = lang('select the appropriate 
tax code');
***************
*** 495,499 ****
                                'check_source'                                  
=> './'.$this->currentapp.'/inc/check.js',
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
!                               'sum'                                           
        => number_format($sum, 2, ',', ' '),
                                'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
--- 495,499 ----
                                'check_source'                                  
=> './'.$this->currentapp.'/inc/check.js',
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
!                               'sum'                                           
        => number_format($sum, 2, ',', ''),
                                'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
***************
*** 639,643 ****
                                {
                                        $sum=$sum+$content[$i]['consume'];
!                                       $content[$i]['consume'] 
=number_format($content[$i]['consume'], 2, ',', ' ');
                                        $i++;
                                }
--- 639,643 ----
                                {
                                        $sum=$sum+$content[$i]['consume'];
!                                       $content[$i]['consume'] 
=number_format($content[$i]['consume'], 2, ',', '');
                                        $i++;
                                }
***************
*** 673,677 ****
  
                        $data['lang_sum']                                       
        = lang('Sum');
!                       $data['sum']                                            
        = number_format($sum, 2, ',', ' ');
                        $data['overlib_source']                                 
= './'.$this->currentapp.'/inc/overlib.js';
                        $data['links']                                          
        = $links;
--- 673,677 ----
  
                        $data['lang_sum']                                       
        = lang('Sum');
!                       $data['sum']                                            
        = number_format($sum, 2, ',', '');
                        $data['overlib_source']                                 
= './'.$this->currentapp.'/inc/overlib.js';
                        $data['links']                                          
        = $links;

Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** class.botts.inc.php 16 Nov 2003 13:21:52 -0000      1.26
--- class.botts.inc.php 18 Nov 2003 16:25:16 -0000      1.27
***************
*** 51,54 ****
--- 51,55 ----
                        $this->historylog       = 
CreateObject($this->currentapp.'.historylog','tts');
                        $this->config           = 
CreateObject('phpgwapi.config');
+                       $this->dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
  
                        if ($session)
***************
*** 302,312 ****
                function read()
                {
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- 
                        $tickets = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' => 
$this->district_id,
                                                                                
        'allrows'=>$this->allrows));
                        $this->total_records = $this->so->total_records;
- 
                        $entity = $this->so->get_origin_entity_type();
  
--- 303,310 ----
***************
*** 323,332 ****
                                }
  
!                               $tickets[$i]['timestampopened'] = 
$GLOBALS['phpgw']->common->show_date($tickets[$i]['entry_date'],$dateformat);
  
                                if ($tickets[$i]['status'] == 'X')
                                {
                                        $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$tickets[$i]['id']);
!                                       $tickets[$i]['timestampclosed'] = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
                                }
                                if ($tickets[$i]['new_ticket'])
--- 321,332 ----
                                }
  
!                               $tickets[$i]['timestampopened'] = 
$GLOBALS['phpgw']->common->show_date($tickets[$i]['entry_date'],$this->dateformat);
! 
!                               $tickets[$i]['finnish_date'] = 
(isset($tickets[$i]['finnish_date'])?$GLOBALS['phpgw']->common->show_date($tickets[$i]['finnish_date'],$this->dateformat):'');
  
                                if ($tickets[$i]['status'] == 'X')
                                {
                                        $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$tickets[$i]['id']);
!                                       $tickets[$i]['timestampclosed'] = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
                                }
                                if ($tickets[$i]['new_ticket'])
***************
*** 355,358 ****
--- 355,363 ----
                        $ticket['group_lid'] = 
$GLOBALS['phpgw']->accounts->id2name($ticket['group_id']);
  
+                       if($ticket['finnish_date'])
+                       {
+                               $ticket['finnish_date'] = 
$GLOBALS['phpgw']->common->show_date($ticket['finnish_date'],$this->dateformat);
+                       }
+ 
                        if($ticket['location_code'])
                        {
***************
*** 391,395 ****
  
                        $history_values = 
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
!                       $ticket['timestampopened'] = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
                        // Figure out when it was opened and last closed
  
--- 396,400 ----
  
                        $history_values = 
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
!                       $ticket['timestampopened'] = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
                        // Figure out when it was opened and last closed
  
***************
*** 401,405 ****
  
                                $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$id);
!                               $ticket['timestampclosed']= 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
                        }
  
--- 406,410 ----
  
                                $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$id);
!                               $ticket['timestampclosed']= 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
                        }
  
***************
*** 416,420 ****
                                'S' => 'Subject changed',
                                'B' => 'Billing rate',
!                               'H' => 'Billing hours'
                        );
  
--- 421,426 ----
                                'S' => 'Subject changed',
                                'B' => 'Billing rate',
!                               'H' => 'Billing hours',
!                               'F' => 'finnish date'
                        );
  
***************
*** 469,472 ****
--- 475,480 ----
                                        case 'H': $type = lang('Billable hours 
changed'); break;
                                        case 'B': $type = lang('Billable rate 
changed'); break;
+                                       case 'F': $type = lang('finnish date 
changed'); break;
+                                       case 'IF': $type = lang('Initial 
finnish date'); break;
                                        default: break;
                                }
***************
*** 494,497 ****
--- 502,509 ----
                                        $record_history[$i]['value_new_value']  
= $this->get_category_name($value['new_value']);
                                }
+                               else if (($value['status'] == 'F') || 
($value['status'] =='IF'))
+                               {
+                                       $record_history[$i]['value_new_value']  
= $GLOBALS['phpgw']->common->show_date($value['new_value'],$this->dateformat);
+                               }
                                else if ($value['status'] != 'O' && 
$value['new_value'])
                                {
***************
*** 519,522 ****
--- 531,535 ----
                        }
  
+                       $ticket['finnish_date'] = 
$this->bocommon->date_to_timestamp($ticket['finnish_date']);
                        $ticket['location_code']=implode("-", $location);
  
***************
*** 527,532 ****
                        if ($this->config->config_data['mailnotification'])
                        {
!                               $errorcount=count($receipt['error']);
!                               $receipt = 
$this->mail_ticket($receipt['id'],$fields_updated,$receipt);
  
                        }
--- 540,544 ----
                        if ($this->config->config_data['mailnotification'])
                        {
!                               $receipt = 
$this->mail_ticket($receipt['id'],$fields_updated,$receipt,$ticket['location_code']);
  
                        }
***************
*** 536,545 ****
  
  
!               function mail_ticket($id,$fields_updated,$receipt=0)
                {
                        $this->config->read_repository();
                        $this->send                     = 
CreateObject('phpgwapi.send');
  
-                       $errorcount=count($receipt['error']);
                        $members = array();
  
--- 548,556 ----
  
  
!               function 
mail_ticket($id,$fields_updated,$receipt=0,$location_code='')
                {
                        $this->config->read_repository();
                        $this->send                     = 
CreateObject('phpgwapi.send');
  
                        $members = array();
  
***************
*** 547,556 ****
  
                        $history_values = 
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
!                       $timestampopened = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
  
                        if($ticket['status']=='X')
                        {
                                $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$id);
!                               $timestampclosed = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
                        }
  
--- 558,567 ----
  
                        $history_values = 
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
!                       $timestampopened = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
  
                        if($ticket['status']=='X')
                        {
                                $history_values = 
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$id);
!                               $timestampclosed = 
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
                        }
  
***************
*** 570,574 ****
                                'S' => 'Subject changed',
                                'B' => 'Billing rate',
!                               'H' => 'Billing hours'
                        );
  
--- 581,586 ----
                                'S' => 'Subject changed',
                                'B' => 'Billing rate',
!                               'H' => 'Billing hours',
!                               'F' => 'finnish date changed'
                        );
  
***************
*** 577,581 ****
  
                        // build subject
!                       $ticket['subject'] = '['.lang('Ticket').' #'.$id.'] 
'.lang($status[$stat]).': '.$ticket['subject'];
  
  
--- 589,593 ----
  
                        // build subject
!                       $ticket['subject'] = '['.lang('Ticket').' #'.$id.'] : ' 
. $location_code .' ' .$this->get_category_name($ticket['cat_id']);
  
  
***************
*** 669,674 ****
                        }
  
-                       $errorcount = 0;
- 
                        $error = Array();
                        $toarray = Array();
--- 681,684 ----
***************
*** 686,691 ****
                                        else
                                        {
!                                               
$receipt['error'][$errorcount++] = array('msg'=> lang('Your message could not 
be sent!'));
!                                               
$receipt['error'][$errorcount++] = array('msg'=>lang('This user has not defined 
an email address !') . ' : ' . $members[$i]['account_name']);
                                        }
                                }
--- 696,701 ----
                                        else
                                        {
!                                               $receipt['error'][] = 
array('msg'=> lang('Your message could not be sent!'));
!                                               $receipt['error'][] = 
array('msg'=>lang('This user has not defined an email address !') . ' : ' . 
$members[$i]['account_name']);
                                        }
                                }
***************
*** 714,718 ****
                        else:
                        {
!                               $receipt['error'][$errorcount++] = 
array('msg'=> lang('Mailing method is not chosen! (admin section)'));
                        }
                        endif;
--- 724,728 ----
                        else:
                        {
!                               $receipt['error'][] = array('msg'=> 
lang('Mailing method is not chosen! (admin section)'));
                        }
                        endif;
***************
*** 721,736 ****
                        if (!$rc)
                        {
!                               $receipt['error'][$errorcount++] = 
array('msg'=> lang('Your message could not be sent by mail!'));
!                               $receipt['error'][$errorcount++] = 
array('msg'=> lang('The mail server returned'));
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'From :' . $current_user_name . '<' . $current_user_address .'>');
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'to: '.$to);
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'subject: '.$ticket['subject']);
!                               $receipt['error'][$errorcount++] = 
array('msg'=> $body );
!       //                      $receipt['error'][$errorcount++] = 
array('msg'=> 'cc: ' . $cc);
!       //                      $receipt['error'][$errorcount++] = 
array('msg'=> 'bcc: '.$bcc);
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'group: '.$group_name);
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'err_code: '.$this->send->err['code']);
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'err_msg: '. htmlspecialchars($this->send->err['msg']));
!                               $receipt['error'][$errorcount++] = 
array('msg'=> 'err_desc: '. $GLOBALS['phpgw']->err['desc']);
                        }
  
--- 731,746 ----
                        if (!$rc)
                        {
!                               $receipt['error'][] = array('msg'=> lang('Your 
message could not be sent by mail!'));
!                               $receipt['error'][] = array('msg'=> lang('The 
mail server returned'));
!                               $receipt['error'][] = array('msg'=> 'From :' . 
$current_user_name . '<' . $current_user_address .'>');
!                               $receipt['error'][] = array('msg'=> 'to: '.$to);
!                               $receipt['error'][] = array('msg'=> 'subject: 
'.$ticket['subject']);
!                               $receipt['error'][] = array('msg'=> $body );
!       //                      $receipt['error'][] = array('msg'=> 'cc: ' . 
$cc);
!       //                      $receipt['error'][] = array('msg'=> 'bcc: 
'.$bcc);
!                               $receipt['error'][] = array('msg'=> 'group: 
'.$group_name);
!                               $receipt['error'][] = array('msg'=> 'err_code: 
'.$this->send->err['code']);
!                               $receipt['error'][] = array('msg'=> 'err_msg: 
'. htmlspecialchars($this->send->err['msg']));
!                               $receipt['error'][] = array('msg'=> 'err_desc: 
'. $GLOBALS['phpgw']->err['desc']);
                        }
  

Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** class.soworkorder.inc.php   3 Nov 2003 18:01:12 -0000       1.33
--- class.soworkorder.inc.php   18 Nov 2003 16:25:16 -0000      1.34
***************
*** 386,389 ****
--- 386,390 ----
                                $workorder['chapter_id']                = 
$this->db->f('chapter_id');
                                $workorder['chapter']                   = 
$this->db->f('chapter');
+                               $workorder['deviation']                 = 
$this->db->f('deviation');
                                $workorder['grants']                            
= (int)$this->grants[$this->db->f('user_id')];
                        }





reply via email to

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