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.5,1.6 index.php,1.3


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property add_workorder.php,1.5,1.6 index.php,1.3,1.4 list_property_value.php,1.2,1.3 search_tenant.php,1.1.1.1,1.2 add_project.php,1.1,1.2 edit_project.php,1.1,1.2 list_project.php,1.1,1.2
Date: Thu, 19 Sep 2002 14:42:39 -0400

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

Modified Files:
        add_workorder.php index.php list_property_value.php 
        search_tenant.php add_project.php edit_project.php 
        list_project.php 
Log Message:
no message

Index: add_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_workorder.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** add_workorder.php   18 Sep 2002 19:54:15 -0000      1.5
--- add_workorder.php   19 Sep 2002 18:42:37 -0000      1.6
***************
*** 26,29 ****
--- 26,30 ----
        $t->set_var('descr_orig','');
  
+ 
        if ($new_cat)
        {
***************
*** 641,644 ****
--- 642,647 ----
        $t->set_var('lang_property',lang('Property'));
        $t->set_var('objekt_id',$objekt_id);
+       $t->set_var('project_id',$project);
+ //echo 'project_id: '.$project .'<BR>';
        $t->set_var('el_meter_id',$el_meter_id);
        $t->set_var('lang_el_meter',lang('El meter'));
***************
*** 676,680 ****
        $t->set_var('lang_total',lang('Total'));
        $t->set_var('lang_project_id',lang('Project ID'));
-       $t->set_var('project_id',$project_id);
  
  
--- 679,682 ----

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/index.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** index.php   5 Sep 2002 16:48:15 -0000       1.3
--- index.php   19 Sep 2002 18:42:37 -0000      1.4
***************
*** 16,20 ****
  
        
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
!       $sub='p_' . $start_page;
  
  //    $GLOBALS['phpgw']->preferences->read_repository();
--- 16,27 ----
  
        
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
!       if ($start_page=='project')
!       {
!               $sub='p_workorder';
!       }
!       else
!       {
!               $sub='p_' . $start_page;
!       }
  
  //    $GLOBALS['phpgw']->preferences->read_repository();

Index: list_property_value.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_property_value.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_property_value.php     16 Sep 2002 16:05:44 -0000      1.2
--- list_property_value.php     19 Sep 2002 18:42:37 -0000      1.3
***************
*** 80,84 ****
                                        $GLOBALS['phpgw']->db->query("select 
max(index_count) as max_index_count from fm_property_value Where objekt_id= 
'$objekt_id_h[$n]' and cost_id= '$cost_id_h[$n]'");
                                        $GLOBALS['phpgw']->db->next_record();
!                                       $next_index_count  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('max_index_count'))+1;
  
                                        $GLOBALS['phpgw']->db->query("update 
fm_property_value set current_index = Null"
--- 80,84 ----
                                        $GLOBALS['phpgw']->db->query("select 
max(index_count) as max_index_count from fm_property_value Where objekt_id= 
'$objekt_id_h[$n]' and cost_id= '$cost_id_h[$n]'");
                                        $GLOBALS['phpgw']->db->next_record();
!                                       $next_index_count  = 
$GLOBALS['phpgw']->db->f('max_index_count')+1;
  
                                        $GLOBALS['phpgw']->db->query("update 
fm_property_value set current_index = Null"
***************
*** 92,96 ****
        }
  
- 
        if ($add && $first_value)
        {
--- 92,95 ----
***************
*** 105,114 ****
                $initial_date= date("M d Y",$initial_date);
  
  
                $GLOBALS['phpgw']->db->query("insert into fm_property_value 
(objekt_id, cost_id, index_count, this_index, current_index, 
value,initial_value, date) "
!               . " values ('$objekt_id', '$cost_id','1', '0', 
'1','$first_value','$first_value','$initial_date')");
  
                $GLOBALS['phpgw']->db->query("insert into fm_property_cost 
(objekt_id, cost_id, descr) "
!               . " values ('$objekt_id', '$cost_id','$cost_descr')");
        }
  
--- 104,117 ----
                $initial_date= date("M d Y",$initial_date);
  
+               $GLOBALS['phpgw']->db->query("select max(cost_id) as 
max_cost_id from fm_property_cost Where objekt_id= '$objekt_id'");
+               $GLOBALS['phpgw']->db->next_record();
+               $next_cost_id  = $GLOBALS['phpgw']->db->f('max_cost_id')+1;
+ 
  
                $GLOBALS['phpgw']->db->query("insert into fm_property_value 
(objekt_id, cost_id, index_count, this_index, current_index, 
value,initial_value, date) "
!               . " values ('$objekt_id', '$next_cost_id','1', '0', 
'1','$first_value','$first_value','$initial_date')");
  
                $GLOBALS['phpgw']->db->query("insert into fm_property_cost 
(objekt_id, cost_id, descr) "
!               . " values ('$objekt_id', '$next_cost_id','$cost_descr')");
        }
  
***************
*** 304,308 ****
        $t->set_var('lang_initial_value',lang('Initial value'));
        $t->set_var('lang_date',lang('Date'));
! 
  
  // ---------------------------- end header declaration 
-------------------------------------
--- 307,312 ----
        $t->set_var('lang_initial_value',lang('Initial value'));
        $t->set_var('lang_date',lang('Date'));
!       $t->set_var('lang_write_off',lang('write off'));
!       $t->set_var('lang_property_name',lang('Property Name'));
  
  // ---------------------------- end header declaration 
-------------------------------------
***************
*** 329,333 ****
--- 333,342 ----
                $objektnavn = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('navn'));
                $index_count = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('index_count'));
+               $value = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('value'));
                $this_index = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('this_index'));
+               $this_write_off=round(($this_index * $initial_value),2);
+               $this_write_off = str_replace(".",",",$this_write_off);
+               $this_index = str_replace(".",",",$this_index);
+ 
                $cost_descr = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('descr'));
  
***************
*** 342,347 ****
  
  
-               $value = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('value'));
                $value_h ='<input type="hidden" name="value_h[' . $j . ']" 
value="'. $value . '">';
  
  //            echo 'value: '.intval($value) .'<BR>';
--- 351,356 ----
  
  
                $value_h ='<input type="hidden" name="value_h[' . $j . ']" 
value="'. $value . '">';
+               $value = str_replace(".",",",$value);
  
  //            echo 'value: '.intval($value) .'<BR>';
***************
*** 371,374 ****
--- 380,384 ----
                        'value' => $value,
                        'value_h' => $value_h,
+                       'this_write_off' => $this_write_off,
                        'date' => $date,
                        'index_count' => $index_count));

Index: search_tenant.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/search_tenant.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** search_tenant.php   28 Aug 2002 16:43:14 -0000      1.1.1.1
--- search_tenant.php   19 Sep 2002 18:42:37 -0000      1.2
***************
*** 146,150 ****
  
  
!       $sql="SELECT boei_leieobjekt.objekt_id, boei_leieobjekt.bygg_id, 
boei_leieobjekt.seksjons_id, boei_leieobjekt.etasje, boei_leieobjekt.leie_id, 
boei_leieobjekt.gatenr, boei_leietaker.leietaker_id, boei_leietaker.fornavn, 
boei_leietaker.etternavn, boei_leietaker.contact_phone, 
boei_gateadresse.gatenavn "
                . "FROM (boei_leieobjekt $join boei_leietaker ON 
boei_leieobjekt.leietaker_id = boei_leietaker.leietaker_id) $join 
boei_gateadresse ON boei_leieobjekt.gateadresse_id = 
boei_gateadresse.gateadresse_id "
                . " $ukjent  $location $querymethod  $fand $filtermethod";
--- 146,150 ----
  
  
!       $sql="SELECT boei_leieobjekt.objekt_id, 
boei_leieobjekt.bygg_id,boei_leieobjekt.el_meter_id, 
boei_leieobjekt.seksjons_id, boei_leieobjekt.etasje, boei_leieobjekt.leie_id, 
boei_leieobjekt.gatenr, boei_leietaker.leietaker_id, boei_leietaker.fornavn, 
boei_leietaker.etternavn, boei_leietaker.contact_phone, 
boei_gateadresse.gatenavn "
                . "FROM (boei_leieobjekt $join boei_leietaker ON 
boei_leieobjekt.leietaker_id = boei_leietaker.leietaker_id) $join 
boei_gateadresse ON boei_leieobjekt.gateadresse_id = 
boei_gateadresse.gateadresse_id "
                . " $ukjent  $location $querymethod  $fand $filtermethod";
***************
*** 233,236 ****
--- 233,237 ----
                if (! $leietaker_id)  $leietaker_id  = '&nbsp;';
  
+               $el_meter_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('el_meter_id'));
  
  
***************
*** 248,251 ****
--- 249,253 ----
                                        'contact_phone'         => 
$contact_phone,
                                        'leietaker_id'  => $leietaker_id,
+                                       'el_meter_id'   => $el_meter_id,
                                        'location_code'         => 
$location_code));
  

Index: add_project.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_project.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** add_project.php     18 Sep 2002 19:56:31 -0000      1.1
--- add_project.php     19 Sep 2002 18:42:37 -0000      1.2
***************
*** 366,370 ****
        $t->set_var('lang_charge_tenant',lang('Charge tenant'));
  
!       $t->set_var('lang_title',lang('Title'));
        $t->set_var('title',$title);
        $t->set_var('lang_descr',lang('Description'));
--- 366,370 ----
        $t->set_var('lang_charge_tenant',lang('Charge tenant'));
  
!       $t->set_var('lang_title',lang('Project name'));
        $t->set_var('title',$title);
        $t->set_var('lang_descr',lang('Description'));
***************
*** 538,542 ****
                $t->set_var('lang_check_requirements',lang('check 
requirements'));
  
!               
$create_workorder_link=$GLOBALS['phpgw']->link('/property/add_workorder.php','project_id='
 . 
$p_id.'&objekt_id='.$objekt_id.'&cat_id='.$cat_id.'&title='.$title.'&coordinator='.$coordinator
                .'&status='.$status
                .'&descr='.$descr
--- 538,542 ----
                $t->set_var('lang_check_requirements',lang('check 
requirements'));
  
!               
$create_workorder_link=$GLOBALS['phpgw']->link('/property/add_workorder.php','project='
 . 
$p_id.'&objekt_id='.$objekt_id.'&cat_id='.$cat_id.'&title='.$title.'&coordinator='.$coordinator
                .'&status='.$status
                .'&descr='.$descr

Index: edit_project.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_project.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** edit_project.php    18 Sep 2002 19:56:31 -0000      1.1
--- edit_project.php    19 Sep 2002 18:42:37 -0000      1.2
***************
*** 308,312 ****
        $t->set_var('lang_choose','');
        $t->set_var('choose','');
!       $t->set_var('lang_title',lang('Title'));
        $title  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('title'));
        if (! $title)  $title  = '&nbsp;';
--- 308,312 ----
        $t->set_var('lang_choose','');
        $t->set_var('choose','');
!       $t->set_var('lang_title',lang('Project name'));
        $title  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('title'));
        if (! $title)  $title  = '&nbsp;';
***************
*** 392,414 ****
        $key_responsible = $GLOBALS['phpgw']->db->f('key_responsible');
  
-       if 
($fm_wrkorder->check_perms($grants[$GLOBALS['phpgw']->db->f('coordinator')],PHPGW_ACL_DELETE)
 || $GLOBALS['phpgw']->db->f('coordinator') == 
$GLOBALS['phpgw_info']['user']['account_id'])
-       {
-               $t->set_var('delete','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/property/delete_project.php',"id=$id&cat_id=$cat_id&start=$start&sort=$sort&order=$order&query=$query&filter=$filter")
 . '"><input type="submit" value="' . lang('Delete') .'"></form>');
-       }
-       else
-       {
-               $t->set_var('delete','&nbsp;');
-       }
-       $t->set_var('lang_select_responsible',lang('Select Responsible'));
- 
        $other_branch  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('other_branch'));
! //    $cat_id  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('category'));
        $t->set_var('other_branch',$other_branch);
  
-       $t->set_var('tenant_id', $GLOBALS['phpgw']->db->f("tenant_id"));
-       $t->set_var('tenant_name', $GLOBALS['phpgw']->db->f("tenant_name"));
-       $t->set_var('contact_phone', $GLOBALS['phpgw']->db->f("contact_phone"));
-       $t->set_var('rig_addition', $GLOBALS['phpgw']->db->f("rig_addition"));
-       $t->set_var('addition', $GLOBALS['phpgw']->db->f("addition"));
  
        $t->set_var('lang_rig_addition',lang('Rig addition'));
--- 392,409 ----
        $key_responsible = $GLOBALS['phpgw']->db->f('key_responsible');
  
        $other_branch  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('other_branch'));
!       $cat_id  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('category'));
        $t->set_var('other_branch',$other_branch);
+ //    echo 'cat_id: '.$cat_id .'<BR>';
+ 
+       $coordinator=$GLOBALS['phpgw']->db->f('coordinator');
+ 
+       $tenant_id=$GLOBALS['phpgw']->db->f('tenant_id');
+       $t->set_var('tenant_id',$tenant_id);
+       $tenant_name=$GLOBALS['phpgw']->db->f('tenant_name');
+       $t->set_var('tenant_name',$tenant_name);
+       $contact_phone=$GLOBALS['phpgw']->db->f('contact_phone');
+       $t->set_var('contact_phone',$contact_phone);
  
  
        $t->set_var('lang_rig_addition',lang('Rig addition'));
***************
*** 424,427 ****
--- 419,433 ----
        $t->set_var('lang_select_cat',lang('Select category'));
        $t->set_var('lang_select_location',lang('Select location'));
+ 
+       if 
($fm_wrkorder->check_perms($grants[$GLOBALS['phpgw']->db->f('coordinator')],PHPGW_ACL_DELETE)
 || $GLOBALS['phpgw']->db->f('coordinator') == 
$GLOBALS['phpgw_info']['user']['account_id'])
+       {
+               $t->set_var('delete','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/property/delete_project.php',"id=$id&cat_id=$cat_id&start=$start&sort=$sort&order=$order&query=$query&filter=$filter")
 . '"><input type="submit" value="' . lang('Delete') .'"></form>');
+       }
+       else
+       {
+               $t->set_var('delete','&nbsp;');
+       }
+       $t->set_var('lang_select_responsible',lang('Select Responsible'));
+ 
        $c = CreateObject('phpgwapi.categories');
        $c->app_name = 'p_workorder';
***************
*** 667,675 ****
                $t->set_var('lang_check_requirements',lang('check 
requirements'));
  
!               
$create_workorder_link=$GLOBALS['phpgw']->link('/property/add_workorder.php','project_id='
 . 
$id.'&objekt_id='.$objekt_id.'&cat_id='.$cat_id.'&title='.$title.'&coordinator='.$coordinator
                .'&status='.$status
                .'&descr='.$descr
!               .'&start_date_p='.$start_date
!               .'&end_date_p='.$end_date
                
.'&project_id='.$num.'&property_name='.$property_name.'&bygg_id='.$bygg_id.'&building_name='.$building_name.'&seksjons_id='.$seksjons_id.'&etasje='.$etasje
                
.'&leie_id='.$leie_id.'&street='.$street.'&key_deliver_location='.$key_deliver_location.'&key_fetch_location='.$key_fetch_location.'&other_branch='.$other_branch.'&key_responsible='.$key_responsible
--- 673,681 ----
                $t->set_var('lang_check_requirements',lang('check 
requirements'));
  
!               
$create_workorder_link=$GLOBALS['phpgw']->link('/property/add_workorder.php','project='
 . 
$id.'&objekt_id='.$objekt_id.'&cat_id='.$cat_id.'&title='.$title.'&coordinator='.$coordinator
                .'&status='.$status
                .'&descr='.$descr
!               .'&start_date_p='.$start_dateout
!               .'&end_date_p='.$end_dateout
                
.'&project_id='.$num.'&property_name='.$property_name.'&bygg_id='.$bygg_id.'&building_name='.$building_name.'&seksjons_id='.$seksjons_id.'&etasje='.$etasje
                
.'&leie_id='.$leie_id.'&street='.$street.'&key_deliver_location='.$key_deliver_location.'&key_fetch_location='.$key_fetch_location.'&other_branch='.$other_branch.'&key_responsible='.$key_responsible
***************
*** 681,685 ****
  
                $t->set_var('create_workorder',$create_workorder);
! 
        }
        else
--- 687,691 ----
  
                $t->set_var('create_workorder',$create_workorder);
! //            echo 'create_workorder_link: '.$create_workorder_link .'<BR>';
        }
        else

Index: list_project.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_project.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** list_project.php    18 Sep 2002 19:56:31 -0000      1.1
--- list_project.php    19 Sep 2002 18:42:37 -0000      1.2
***************
*** 197,201 ****
  //    $t->set_var('property_table',$property_table);
  
- 
        $t->set_var('lang_select',lang('Select'));
        
$t->set_var('cats_action',$GLOBALS['phpgw']->link('/property/list_project.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
--- 197,200 ----





reply via email to

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