phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property add_workorder.php,1.7,1.8 list_invoice.


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property add_workorder.php,1.7,1.8 list_invoice.php,1.7,1.8 edit_workorder.php,1.6,1.7 invoice_detail.php,1.5,1.6 view_workorder.php,1.5,1.6 add_st_hours_list.php,1.2,1.3 calculate_edithour.php,1.2,1.3 calculate_listhours.php,1.2,1.3 hours_addhour.php,1.2,1.3 view_detail.php,1.2,1.3 view_tender.php,1.2,1.3 hours_addhour_test.php,1.1.1.1,1.2
Date: Wed, 02 Oct 2002 13:00:05 -0400

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

Modified Files:
        add_workorder.php list_invoice.php edit_workorder.php 
        invoice_detail.php view_workorder.php add_st_hours_list.php 
        calculate_edithour.php calculate_listhours.php 
        hours_addhour.php view_detail.php view_tender.php 
        hours_addhour_test.php 
Log Message:
no message

Index: add_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_workorder.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** add_workorder.php   24 Sep 2002 15:44:47 -0000      1.7
--- add_workorder.php   2 Oct 2002 17:00:00 -0000       1.8
***************
*** 294,301 ****
                        {
                                $GLOBALS['phpgw']->db->query("insert into 
fm_wo_wrkorders 
(id,project_id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
!                                                       . 
"descr,title,num,location_code,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
                                                        . 
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant,budget)
 "
                                                        . "values 
('$num',$project_id_value,'$owner','$access','$cat_id','" . time() 
."','$sdate','$edate',"
!                                                       . 
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$objekt_id','$property_name',"
                                                        . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
                                                        . 
"'$key_fetch_location','$other_branch','$key_responsible','$tenant_id','$tenant_name','$contact_phone','$fc','$charge_tenant','$budget')");
--- 294,301 ----
                        {
                                $GLOBALS['phpgw']->db->query("insert into 
fm_wo_wrkorders 
(id,project_id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
!                                                       . 
"descr,title,num,location_code,equipment_id,equipment_type,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
                                                        . 
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant,budget)
 "
                                                        . "values 
('$num',$project_id_value,'$owner','$access','$cat_id','" . time() 
."','$sdate','$edate',"
!                                                       . 
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$equipment_id','$equipment_type','$objekt_id','$property_name',"
                                                        . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
                                                        . 
"'$key_fetch_location','$other_branch','$key_responsible','$tenant_id','$tenant_name','$contact_phone','$fc','$charge_tenant','$budget')");
***************
*** 429,433 ****
--- 429,435 ----
        
$t->set_var('entrance_link',$GLOBALS['phpgw']->link('/property/search_entrance.php','query='));
        
$t->set_var('apartment_link',$GLOBALS['phpgw']->link('/property/search_apartment.php','query='));
+       
$t->set_var('equipment_link',$GLOBALS['phpgw']->link('/property/search_equipment.php','query='));
        
$t->set_var('budget_account_link',$GLOBALS['phpgw']->link('/property/search_b_account.php','query='));
+       $t->set_var('lang_equipment',lang('Equipment'));
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
***************
*** 650,653 ****
--- 652,657 ----
        $t->set_var('apartment',$apartment);
        $t->set_var('street',$street);
+       $t->set_var('equipment_id',$equipment_id);
+       $t->set_var('equipment_type',$equipment_type);
        $t->set_var('other_branch',$other_branch);
        $t->set_var('tenant_name',$tenant_name);

Index: list_invoice.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_invoice.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** list_invoice.php    24 Sep 2002 15:44:47 -0000      1.7
--- list_invoice.php    2 Oct 2002 17:00:00 -0000       1.8
***************
*** 907,911 ****
                //      
$t->set_var('event',$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.search&from=calendar.uicalendar.search&keywords='
 . $objekt_id ));
  
!                       
$t->set_var('link_bilagsnr',$GLOBALS['phpgw']->link('/property/invoice_detail.php','bilagsnr='
 . $bilag_nr . '&coordinator_lid=' . $coordinator_lid. '&query=' . $query));
                        
$t->set_var('link_period',$GLOBALS['phpgw']->link('/property/invoice_period.php','bilagsnr='
 . $bilag_nr . '&period=' . $period));
                        
$t->set_var('link_no_of_days',$GLOBALS['phpgw']->link('/property/invoice_days.php','bilagsnr='
 . $bilag_nr . '&no_of_days=' . $no_of_days));
--- 907,911 ----
                //      
$t->set_var('event',$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.search&from=calendar.uicalendar.search&keywords='
 . $objekt_id ));
  
!                       
$t->set_var('link_bilagsnr',$GLOBALS['phpgw']->link('/property/invoice_detail.php','bilagsnr='
 . $bilag_nr . '&coordinator_lid=' . $coordinator_lid. '&query=' . $query. 
'&vendor_id=' . $spvend_code));
                        
$t->set_var('link_period',$GLOBALS['phpgw']->link('/property/invoice_period.php','bilagsnr='
 . $bilag_nr . '&period=' . $period));
                        
$t->set_var('link_no_of_days',$GLOBALS['phpgw']->link('/property/invoice_days.php','bilagsnr='
 . $bilag_nr . '&no_of_days=' . $no_of_days));

Index: edit_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_workorder.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** edit_workorder.php  24 Sep 2002 15:44:47 -0000      1.6
--- edit_workorder.php  2 Oct 2002 17:00:00 -0000       1.7
***************
*** 246,250 ****
                        $GLOBALS['phpgw']->db->query("update fm_wo_wrkorders 
set project_id=$project_id_value, access='$access', category='$cat_id', 
entry_date='" . time() . "', start_date='"
                                                        . "$sdate', 
end_date='$edate', coordinator='$coordinator', vendor='$abid', 
status='$status', descr='$descr', title='$title', "
!                                                       . "budget='$budget', 
num='$num',location_code='$location_code',objekt_id='$objekt_id',property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',
 "
                                                        . 
"seksjons_id='$seksjons_id',etasje='$etasje',leie_id='$leie_id',street='$street',
 account_id='$account_id',rig_addition='$rig_addition',addition='$addition',"
                                                        . 
"key_deliver='$key_deliver_location',key_fetch='$key_fetch_location',other_branch='$other_branch',"
--- 246,250 ----
                        $GLOBALS['phpgw']->db->query("update fm_wo_wrkorders 
set project_id=$project_id_value, access='$access', category='$cat_id', 
entry_date='" . time() . "', start_date='"
                                                        . "$sdate', 
end_date='$edate', coordinator='$coordinator', vendor='$abid', 
status='$status', descr='$descr', title='$title', "
!                                                       . "budget='$budget', 
num='$num',location_code='$location_code',objekt_id='$objekt_id',equipment_id='$equipment_id',equipment_type='$equipment_type',property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',
 "
                                                        . 
"seksjons_id='$seksjons_id',etasje='$etasje',leie_id='$leie_id',street='$street',
 account_id='$account_id',rig_addition='$rig_addition',addition='$addition',"
                                                        . 
"key_deliver='$key_deliver_location',key_fetch='$key_fetch_location',other_branch='$other_branch',"
***************
*** 343,350 ****
                        {
                                $GLOBALS['phpgw']->db->query("insert into 
fm_wo_wrkorders 
(id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
!                                                       . 
"descr,title,num,location_code,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
                                                        . 
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant)
 "
                                                        . "values 
('$num','$owner','$access','$cat_id','" . time() ."','$sdate','$edate',"
!                                                       . 
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$objekt_id','$property_name',"
                                                        . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
                                                        . 
"'$key_fetch_location','$other_branch','$key_responsible','$tenant_id','$tenant_name','$contact_phone','$fc','$charge_tenant')");
--- 343,350 ----
                        {
                                $GLOBALS['phpgw']->db->query("insert into 
fm_wo_wrkorders 
(id,owner,access,category,entry_date,start_date,end_date,coordinator,vendor,status,"
!                                                       . 
"descr,title,num,location_code,equipment_id,equipment_type,objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,"
                                                        . 
"street,account_id,rig_addition,addition,key_deliver,key_fetch,other_branch,key_responsible,tenant_id,tenant_name,contact_phone,integration,charge_tenant)
 "
                                                        . "values 
('$num','$owner','$access','$cat_id','" . time() ."','$sdate','$edate',"
!                                                       . 
"'$coordinator','$abid','$status','$descr','$title','$num','$location_code','$equipment_id','$equipment_type','$objekt_id','$property_name',"
                                                        . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street','$account_id','$rig_addition','$addition','$key_deliver_location',"
                                                        . 
"'$key_fetch_location','$other_branch','$key_responsible','$tenant_id','$tenant_name','$contact_phone','$fc','$charge_tenant')");
***************
*** 545,549 ****
--- 545,551 ----
        
$t->set_var('entrance_link',$GLOBALS['phpgw']->link('/property/search_entrance.php','query='));
        
$t->set_var('apartment_link',$GLOBALS['phpgw']->link('/property/search_apartment.php','query='));
+       
$t->set_var('equipment_link',$GLOBALS['phpgw']->link('/property/search_equipment.php','query='));
        
$t->set_var('budget_account_link',$GLOBALS['phpgw']->link('/property/search_b_account.php','query='));
+       $t->set_var('lang_equipment',lang('Equipment'));
  
  
***************
*** 602,605 ****
--- 604,613 ----
        $t->set_var('lang_detailing',lang('Detailing'));
        $t->set_var('lang_property',lang('Property'));
+ 
+       $equipment_id  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('equipment_id'));
+       $t->set_var('equipment_id',$equipment_id);
+ 
+       $equipment_type  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('equipment_type'));
+       $t->set_var('equipment_type',$equipment_type);
  
        $objekt_id  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('objekt_id'));

Index: invoice_detail.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/invoice_detail.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** invoice_detail.php  24 Sep 2002 15:44:47 -0000      1.5
--- invoice_detail.php  2 Oct 2002 17:00:00 -0000       1.6
***************
*** 36,39 ****
--- 36,40 ----
  
        $t->set_var('bilagsnr',$bilagsnr);
+ 
        $t->set_var('coordinator_lid',$coordinator_lid);
  
***************
*** 244,247 ****
--- 245,254 ----
        }
  
+       $GLOBALS['phpgw']->db->query(" SELECT org_name from phpgw_addressbook 
where id = $vendor_id");
+       $GLOBALS['phpgw']->db->next_record();
+       $vendor = $GLOBALS['phpgw']->db->f('org_name');
+       $t->set_var('vendor',$vendor);
+ 
+ 
        $GLOBALS['phpgw']->db->query(" SELECT * from fm_admin where account_id 
= $user_id");
        $GLOBALS['phpgw']->db->next_record();
***************
*** 588,592 ****
  
                
$t->set_var('link_remark',$GLOBALS['phpgw']->link('/property/invoice_remark.php','invoice_id='
 . $invoice_id.'&remark_table='.$remark_table ));
!               
$t->set_var('link_workorder',$GLOBALS['phpgw']->link('/property/view_workorder.php','id='
 . $wrkorder_id.'&view_one_page=1'));
  
  
--- 595,599 ----
  
                
$t->set_var('link_remark',$GLOBALS['phpgw']->link('/property/invoice_remark.php','invoice_id='
 . $invoice_id.'&remark_table='.$remark_table ));
!               
$t->set_var('link_workorder',$GLOBALS['phpgw']->link('/property/view_workorder.php','id='
 . $wrkorder_id.'&view_one_page=1&show_cost=1'));
  
  

Index: view_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/view_workorder.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** view_workorder.php  24 Sep 2002 15:44:47 -0000      1.5
--- view_workorder.php  2 Oct 2002 17:00:00 -0000       1.6
***************
*** 684,687 ****
--- 684,692 ----
  
                        $tolerance  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['tolerance']);
+                       if (!$tolerance || $tolerance==0)
+                       {
+                               $tolerance='';
+                       }
+ 
  
                        $ns3420_id  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['ns3420_id']);
***************
*** 721,730 ****
                        if (! $hours_descr) $hours_descr = '&nbsp;';
  
!                       $hours_descr= 
str_replace("\n","<br>",$hours_descr).$tolerance;
  
                        $remark = 
$GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                        if ($remark)
                        {
!                               $hours_descr =$hours_descr.'<br>' 
.lang(Remark).': ' . $remark;
                        }
  
--- 726,739 ----
                        if (! $hours_descr) $hours_descr = '&nbsp;';
  
!                       $hours_descr= str_replace("\n","<br>",$hours_descr);
!                       if ($tolerance)
!                       {
!                               $hours_descr= str_replace("-."," 
",$hours_descr).$tolerance;
!                       }
  
                        $remark = 
$GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                        if ($remark)
                        {
!                               $hours_descr =$hours_descr.'<br>' . $remark;
                        }
  

Index: add_st_hours_list.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_st_hours_list.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** add_st_hours_list.php       16 Sep 2002 16:05:44 -0000      1.2
--- add_st_hours_list.php       2 Oct 2002 17:00:00 -0000       1.3
***************
*** 126,130 ****
                                        $grouping_descr= $grouping_descr_h[$n];
  
!                                       $GLOBALS['phpgw']->db->query("SELECT 
max(record) as record FROM fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and 
grouping_id= '$grouping_id'");
                                        $GLOBALS['phpgw']->db->next_record();
                                        $record= 
$GLOBALS['phpgw']->db->f('record')+1;
--- 126,130 ----
                                        $grouping_descr= $grouping_descr_h[$n];
  
!                                       $GLOBALS['phpgw']->db->query("SELECT 
max(record) as record FROM fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and 
building_part= '$building_part_h[$n]'");
                                        $GLOBALS['phpgw']->db->next_record();
                                        $record= 
$GLOBALS['phpgw']->db->f('record')+1;

Index: calculate_edithour.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/calculate_edithour.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** calculate_edithour.php      16 Sep 2002 16:05:44 -0000      1.2
--- calculate_edithour.php      2 Oct 2002 17:00:00 -0000       1.3
***************
*** 116,120 ****
        // ---------------------end grouping ------------------------------
  
!                       if (!$grouping_id==$grouping_orig)
                        {
                                $GLOBALS['phpgw']->db->query("SELECT 
max(record) as record FROM fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and 
grouping_id= '$grouping_id'");
--- 116,120 ----
        // ---------------------end grouping ------------------------------
  
!       /*              if (!$grouping_id==$grouping_orig)
                        {
                                $GLOBALS['phpgw']->db->query("SELECT 
max(record) as record FROM fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and 
grouping_id= '$grouping_id'");
***************
*** 128,131 ****
--- 128,135 ----
                                $record=$record_orig;
                        }
+ 
+       */
+ 
+                       $record=$record_orig;
  
                        if(!$grouping_id)

Index: calculate_listhours.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/calculate_listhours.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** calculate_listhours.php     16 Sep 2002 16:05:44 -0000      1.2
--- calculate_listhours.php     2 Oct 2002 17:00:00 -0000       1.3
***************
*** 247,250 ****
--- 247,254 ----
                $activity_id  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['activity_id']);
                $tolerance  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['tolerance']);
+               if (!$tolerance || $tolerance==0)
+               {
+                       $tolerance='';
+               }
  
                $ns3420_id  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['ns3420_id']);
***************
*** 285,295 ****
                $hours_descr = 
$GLOBALS['phpgw']->strip_html($hours[$i]['hours_descr']);
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr).$tolerance;
! 
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr .='<br>' .lang(Remark).': ' . $remark;
                }
                $t->set_var('tr_color',$tr_color);
--- 289,302 ----
                $hours_descr = 
$GLOBALS['phpgw']->strip_html($hours[$i]['hours_descr']);
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr);
!               if ($tolerance)
!               {
!                       $hours_descr= str_replace("-."," 
",$hours_descr).$tolerance;
!               }
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr .='<br>' . $remark;
                }
                $t->set_var('tr_color',$tr_color);

Index: hours_addhour.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/hours_addhour.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** hours_addhour.php   16 Sep 2002 16:05:44 -0000      1.2
--- hours_addhour.php   2 Oct 2002 17:00:00 -0000       1.3
***************
*** 152,156 ****
  
  
!               $GLOBALS['phpgw']->db->query("SELECT max(record) as record FROM 
fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and grouping_id= '$grouping_id'");
                $GLOBALS['phpgw']->db->next_record();
                $record= $GLOBALS['phpgw']->db->f('record')+1;
--- 152,156 ----
  
  
!               $GLOBALS['phpgw']->db->query("SELECT max(record) as record FROM 
fm_wo_hours WHERE wrkorder_id ='$wrkorder_id' and building_part= 
'$building_part'");
                $GLOBALS['phpgw']->db->next_record();
                $record= $GLOBALS['phpgw']->db->f('record')+1;

Index: view_detail.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/view_detail.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** view_detail.php     16 Sep 2002 16:05:44 -0000      1.2
--- view_detail.php     2 Oct 2002 17:00:00 -0000       1.3
***************
*** 146,149 ****
--- 146,153 ----
                if (! $activity_id) $activity_id = '&nbsp;';
                $tolerance  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['tolerance']);
+               if (!$tolerance || $tolerance==0)
+               {
+                       $tolerance='';
+               }
  
                $ns3420_id  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['ns3420_id']);
***************
*** 200,209 ****
                if (! $hours_descr) $hours_descr = '&nbsp;';
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr).$tolerance;
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr =$hours_descr.'<br>' .lang(Remark).': ' . 
$remark;
                }
  
--- 204,217 ----
                if (! $hours_descr) $hours_descr = '&nbsp;';
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr);
!               if ($tolerance)
!               {
!                       $hours_descr= str_replace("-."," 
",$hours_descr).$tolerance;
!               }
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr =$hours_descr.'<br>' . $remark;
                }
  

Index: view_tender.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/view_tender.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** view_tender.php     16 Sep 2002 16:05:44 -0000      1.2
--- view_tender.php     2 Oct 2002 17:00:00 -0000       1.3
***************
*** 148,151 ****
--- 148,156 ----
                $tolerance  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['tolerance']);
  
+               if (!$tolerance || $tolerance==0)
+               {
+                       $tolerance='';
+               }
+ 
                $ns3420_id  = 
$GLOBALS['phpgw']->strip_html($hours[$i]['ns3420_id']);
                $ns3420_id= str_replace("-","$tolerance",$ns3420_id);
***************
*** 220,229 ****
                if (! $hours_descr) $hours_descr = '&nbsp;';
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr).$tolerance;
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr =$hours_descr.'<br>' .lang(Remark).': ' . 
$remark;
                }
  
--- 225,238 ----
                if (! $hours_descr) $hours_descr = '&nbsp;';
  
!               $hours_descr= str_replace("\n","<br>",$hours_descr);
!               if ($tolerance)
!               {
!                       $hours_descr= str_replace("-."," 
",$hours_descr).$tolerance;
!               }
  
                $remark = $GLOBALS['phpgw']->strip_html($hours[$i]['remark']);
                if ($remark)
                {
!                       $hours_descr =$hours_descr.'<br>' . $remark;
                }
  

Index: hours_addhour_test.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/hours_addhour_test.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** hours_addhour_test.php      28 Aug 2002 16:43:10 -0000      1.1.1.1
--- hours_addhour_test.php      2 Oct 2002 17:00:00 -0000       1.2
***************
*** 36,80 ****
                $errorcount = 0;
  
!               if ($shour && ($shour != 0) && ($shour != 12))
!               {
!                       if ($sampm=='pm') { $shour = $shour + 12; }
!               }
! 
!               if ($shour && ($shour == 12))
!               {
!                       if ($sampm=='am') { $shour = 0; }
!               }
! 
!               if ($ehour && ($ehour != 0) && ($ehour != 12))
!               {
!                       if ($eampm=='pm') { $ehour = $ehour + 12; }
!               }
! 
!               if ($ehour && ($ehour == 12))
!               {
!                       if ($eampm=='am') { $ehour = 0; }
!               }
! 
!               if (checkdate($smonth,$sday,$syear)) { $sdate = 
mktime($shour,$smin,0,$smonth,$sday,$syear); }
!               else
!               {
!                       if ($shour && $smin && $smonth && $sday && $syear)
!                       {
!                               $error[$errorcount++] = lang('You have entered 
an invalid start date !') . '<br>' . $shour . ':' . $smin  . ' ' . $smonth . 
'/' . $sday . '/' . $syear;
!                       }
!               }
  
-               if (checkdate($emonth,$eday,$eyear)) { $edate = 
mktime($ehour,$emin,0,$emonth,$eday,$eyear); }
-               else
-               {
-                       if ($ehour && $emin && $emonth && $eday && $eyear)
-                       {
-                               $error[$errorcount++] = lang('You have entered 
an invalid end date !') . '<br>' . $ehour . ':' . $emin . ' ' . $emonth . '/' . 
$eday . '/' . $eyear;
-                       }
-               }
  
!               $GLOBALS['phpgw']->db->query("SELECT descr FROM fm_wo_ns3420 
WHERE id ='$ns3420_id' ");
!               $GLOBALS['phpgw']->db->next_record();
!               $hours_descr = $GLOBALS['phpgw']->db->f('descr');
  
  
--- 36,45 ----
                $errorcount = 0;
  
! //            $error[$errorcount++] = lang('You have entered an invalid end 
date !') . '<br>' . $ehour . ':' . $emin . ' ' . $emonth . '/' . $eday . '/' . 
$eyear;
  
  
! //            $GLOBALS['phpgw']->db->query("SELECT descr FROM fm_wo_ns3420 
WHERE id ='$ns3420_id' ");
! //            $GLOBALS['phpgw']->db->next_record();
! //            $hours_descr = $GLOBALS['phpgw']->db->f('descr');
  
  
***************
*** 92,96 ****
  
                $GLOBALS['phpgw']->db->query("INSERT into fm_wo_hours 
(id,wrkorder_id,activity_id,entry_date,start_date,end_date,hours_descr,remark,minutes,status,minperae,"
!                                                       . "billperae,employee, 
quantity, unit, cost,vendor_id,ns3420_id,building_part) VALUES 
('$id','$wrkorder_id','$activity','" . time() . 
"','$sdate','$edate','$hours_descr','$remark','$ae_minutes',"
                                                        . 
"'$status','$minperae','$billperae','$employee','$quantity','$unit','$cost','$vendor_id','$ns3420_id','$building_part')");
  
--- 57,61 ----
  
                $GLOBALS['phpgw']->db->query("INSERT into fm_wo_hours 
(id,wrkorder_id,activity_id,entry_date,start_date,end_date,hours_descr,remark,minutes,status,minperae,"
!                                                       . "billperae,employee, 
quantity, unit, cost,vendor_id,ns3420_id,building_part) VALUES 
('$id','$wrkorder_id','$activity','" . time() . 
"','$sdate','$edate','$ns3420_descr','$remark','$ae_minutes',"
                                                        . 
"'$status','$minperae','$billperae','$employee','$quantity','$unit','$cost','$vendor_id','$ns3420_id','$building_part')");
  
***************
*** 149,152 ****
--- 114,118 ----
                $t->set_var('minperae',$minperae);
                $t->set_var('billperae',$billperae);
+               $t->set_var('ns3420_descr',$ns3420_descr);
                $t->set_var('cost',$cost);
                $t->set_var('lang_cost',lang('Cost'));





reply via email to

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