[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.62,1.63 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.62,1.63 class.bogab.inc.php,1.6,1.7 class.boinvoice.inc.php,1.18,1.19 class.bolocation.inc.php,1.19,1.20 class.bolookup.inc.php,1.9,1.10 class.socommon.inc.php,1.29,1.30 class.sodocument.inc.php,1.8,1.9 class.sogab.inc.php,1.8,1.9 class.soinvoice.inc.php,1.23,1.24 class.solocation.inc.php,1.15,1.16 class.solookup.inc.php,1.22,1.23 class.sotts.inc.php,1.21,1.22 class.soXport.inc.php,1.25,1.26 class.uiequipment.inc.php,1.29,1.30class.uiinvestment.inc.php,1.23,1.24 class.uiinvoice.inc.php,1.26,1.27 class.uilocation.inc.php,1.17,1.18 class.uilookup.inc.php,1.25,1.26 class.uireport.inc.php,1.10,1.11 class.uirequest.inc.php,1.21,1.22 class.uitts.inc.php,1.30,1.31 hook_admin.inc.php,1.34,1.35 class.boapartment.inc.php,1.3,NONE class.bobuilding.inc.php,1.8,NONE class.boentrance.inc.php,1.5,NONE class.boproperty.inc.php,1.7,NONEclass.soapartment.inc.php,1.6,NONE class.sobuilding.inc.php,1.13,NONEclass.soentrance.inc.php,1.5,NONE class.soproperty.inc.php,1.19,NONEclass.uiapartment.inc.php,1.13,NONE class.uibuilding.inc.php,1.21,NONEclass.uientrance.inc.php,1.13,NONE class.uiproperty.inc.php,1.24,NONE |
Date: |
Sat, 28 Jun 2003 12:11:50 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv26697/inc
Modified Files:
class.bocommon.inc.php class.bogab.inc.php
class.boinvoice.inc.php class.bolocation.inc.php
class.bolookup.inc.php class.socommon.inc.php
class.sodocument.inc.php class.sogab.inc.php
class.soinvoice.inc.php class.solocation.inc.php
class.solookup.inc.php class.sotts.inc.php
class.soXport.inc.php class.uiequipment.inc.php
class.uiinvestment.inc.php class.uiinvoice.inc.php
class.uilocation.inc.php class.uilookup.inc.php
class.uireport.inc.php class.uirequest.inc.php
class.uitts.inc.php hook_admin.inc.php
Removed Files:
class.boapartment.inc.php class.bobuilding.inc.php
class.boentrance.inc.php class.boproperty.inc.php
class.soapartment.inc.php class.sobuilding.inc.php
class.soentrance.inc.php class.soproperty.inc.php
class.uiapartment.inc.php class.uibuilding.inc.php
class.uientrance.inc.php class.uiproperty.inc.php
Log Message:
Remove the old location hierarchy
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -r1.62 -r1.63
*** class.bocommon.inc.php 27 Jun 2003 11:26:16 -0000 1.62
--- class.bocommon.inc.php 28 Jun 2003 16:11:47 -0000 1.63
***************
*** 195,324 ****
-
- function get_location()
- {
- $location
= array();
- $location['location_code'] =
get_var('location_code',array('POST','GET'));
- $location['equipment_id'] =
get_var('equipment_id',array('POST','GET'));
- $location['property_id'] =
get_var('property_id',array('POST','GET'));
- $location['property_name'] =
get_var('property_name',array('POST','GET'));
- $location['building_id'] =
get_var('building_id',array('POST','GET'));
- $location['entrance_id'] =
get_var('entrance_id',array('POST','GET'));
- $location['floor'] =
get_var('floor',array('POST','GET'));
- $location['apartment_id'] =
get_var('apartment_id',array('POST','GET'));
- $location['street_name'] =
get_var('street_name',array('POST','GET'));
- $location['street_number'] =
get_var('street_number',array('POST','GET'));
- $location['tenant_id'] =
get_var('tenant_id',array('POST','GET'));
- $location['tenant_name'] =
get_var('tenant_name',array('POST','GET'));
- $location['contact_phone'] =
get_var('contact_phone',array('POST','GET'));
- //_debug_array($location);
-
- return $location;
- }
-
- function initiate_ui_location($data)
- {
- //_debug_array($data);
-
- switch($data['location_type'])
- {
- case 'form':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('location_form'));
- break;
- case 'view':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('location_view'));
- break;
- }
-
- if($data['equipment'])
- {
- $location['equipment']
= True;
- $location['lang_select_location_statustext']=
lang('select either a location or an equipment');
- $location['equipment_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.equipment');
- $location['lang_equipment']
= lang('Equipment');
- $location['value_equipment_id']
= $data['equipment_id'];
- $location['lang_select_equipment_help']
= lang('Klick this link to select equipment');
-
- if($data['equipment_id'])
- {
- $location['value_equipment_type'] =
$this->socommon->get_equipment_type($data['equipment_id']);
- }
-
- }
- else
- {
- $location['lang_select_location_statustext']
= lang('select a location');
- }
-
-
- if($data['tenant'])
- {
- $location['tenant']
= True;
- $location['lang_tenant']
= lang('Tenant');
- $location['tenant_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=tenant');
- $location['lang_contact_phone']
= lang('Tenant phone');
- $location['lang_select_tenant_help']
= lang('Klick this link to select tenant');
- $location['value_tenant_id']
= $data['tenant_id'];
- $location['value_tenant_name']
= $data['tenant_name'];
- $location['value_contact_phone']
= $data['contact_phone'];
- $data['apartment']
= True;
- }
- if($data['apartment'])
- {
- $location['apartment']
= True;
- $location['apartment_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=apartment');
- $location['value_apartment_id']
= $data['apartment_id'];
- $location['value_floor']
= $data['floor'];
- $location['lang_select_apartment_help']
= lang('Klick this link to select apartment');
- $location['lang_floor']
= lang('Floor');
- $location['lang_apartment']
= lang('Apartment');
- $data['entrance']
= True;
- $data['address']
= True;
- }
-
- if($data['address'])
- {
- $location['address']
= True;
- $location['lang_address']
= lang('Address');
- $location['value_street_name']
= $data['street_name'];
- $location['value_street_number']
= $data['street_number'];
- }
- if($data['entrance'])
- {
- $location['entrance']
= True;
- $location['value_entrance_id']
= $data['entrance_id'];
- $location['value_street_name']
= $data['street_name'];
- $location['value_street_number']
= $data['street_number'];
- $location['entrance_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=entrance');
- $location['lang_entrance']
= lang('Entrance');
- $location['lang_select_entrance_help']
= lang('Klick this link to select entrance');
- $data['building']
= True;
- }
-
- if($data['building'])
- {
- $location['building']
= True;
- $location['value_building_id']
= $data['building_id'];
- $location['building_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=building');
- $location['lang_building']
= lang('Building');
- $location['lang_select_building_help']
= lang('Klick this link to select building');
- }
-
- $location['overlib_source']
= './'.$this->currentapp.'/inc/overlib.js';
- $location['value_property_id']
= $data['property_id'];
- $location['value_property_name']
= $data['property_name'];
- $location['lang_location']
= lang('Location');
- $location['location_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
- $location['property_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
- $location['lang_property']
= lang('Property');
- $location['lang_select_property_help']
= lang('Klick this link to select property');
- $location['lang_property_name']
= lang('Property Name');
-
- //_debug_array($location);
- return $location;
-
- }
-
-
function initiate_ui_vendorlookup($data)
{
--- 195,198 ----
***************
*** 573,596 ****
if ($sub == property)
{
-
- /* $i++;
- $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiproperty.index');
- $menu['sub_menu'][$i]['lang']
= lang('Property');
- $menu['sub_menu'][$i]['statustext']
= lang('Property');
- $i++;
- $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uibuilding.index');
- $menu['sub_menu'][$i]['lang']
= lang('Building');
- $menu['sub_menu'][$i]['statustext']
= lang('Building');
- $i++;
- $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uientrance.index');
- $menu['sub_menu'][$i]['lang']
= lang('Entrance');
- $menu['sub_menu'][$i]['statustext']
= lang('Entrance');
- $i++;
- $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiapartment.index');
- $menu['sub_menu'][$i]['lang']
= lang('Apartment');
- $menu['sub_menu'][$i]['statustext']
= lang('Apartment');
- */
-
-
$location =
$this->soadmin_location->select_location_type();
for ($j=0; $j<count($location); $j++)
--- 447,450 ----
***************
*** 742,768 ****
- function
location_code($property_id='',$building_id='',$entrance_id='',$apartment='')
- {
-
- $location_code=$property_id;
-
- if($building_id)
- {
- $location_code.= "-".$building_id;
- }
- if($entrance_id)
- {
- $location_code.= "-".$entrance_id;
- }
- if($apartment)
- {
- $location_code.= "-".$apartment;
- }
-
- return $location_code;
-
- }
-
-
function read_location_data($location_code)
{
--- 596,599 ----
***************
*** 930,936 ****
}
-
-
-
function select_part_of_town($format='',$selected='')
{
--- 761,764 ----
***************
*** 987,1110 ****
$categories=
$this->socommon->select_category_property_list();
-
- while (is_array($categories) && list(,$category) =
each($categories))
- {
- $sel_category = '';
- if ($category['id']==$selected)
- {
- $sel_category = 'selected';
- }
-
- $category_list[] = array
- (
- 'cat_id' => $category['id'],
- 'name' => $category['name'],
- 'selected' => $sel_category
- );
- }
-
- for ($i=0;$i<count($category_list);$i++)
- {
- if ($category_list[$i]['selected'] !=
'selected')
- {
- unset($category_list[$i]['selected']);
- }
- }
-
- return $category_list;
- }
- function select_category_building_list($format='',$selected='')
- {
- switch($format)
- {
- case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
- break;
- case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
- break;
- }
-
- $categories=
$this->socommon->select_category_building_list();
-
- while (is_array($categories) && list(,$category) =
each($categories))
- {
- $sel_category = '';
- if ($category['id']==$selected)
- {
- $sel_category = 'selected';
- }
-
- $category_list[] = array
- (
- 'cat_id' => $category['id'],
- 'name' => $category['name'],
- 'selected' => $sel_category
- );
- }
-
- for ($i=0;$i<count($category_list);$i++)
- {
- if ($category_list[$i]['selected'] !=
'selected')
- {
- unset($category_list[$i]['selected']);
- }
- }
-
- return $category_list;
- }
- function select_category_entrance_list($format='',$selected='')
- {
- switch($format)
- {
- case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
- break;
- case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
- break;
- }
-
- $categories=
$this->socommon->select_category_entrance_list();
-
- while (is_array($categories) && list(,$category) =
each($categories))
- {
- $sel_category = '';
- if ($category['id']==$selected)
- {
- $sel_category = 'selected';
- }
-
- $category_list[] = array
- (
- 'cat_id' => $category['id'],
- 'name' => $category['name'],
- 'selected' => $sel_category
- );
- }
-
- for ($i=0;$i<count($category_list);$i++)
- {
- if ($category_list[$i]['selected'] !=
'selected')
- {
- unset($category_list[$i]['selected']);
- }
- }
-
- return $category_list;
- }
- function select_category_apartment_list($format='',$selected='')
- {
- switch($format)
- {
- case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
- break;
- case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
- break;
- }
-
- $categories=
$this->socommon->select_category_apartment_list();
while (is_array($categories) && list(,$category) =
each($categories))
--- 815,818 ----
Index: class.bogab.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bogab.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.bogab.inc.php 27 Jun 2003 19:04:30 -0000 1.6
--- class.bogab.inc.php 28 Jun 2003 16:11:47 -0000 1.7
***************
*** 106,113 ****
! function
read($property_id='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='')
{
$gab = $this->so->read(array('start' =>
$this->start,'sort' => $this->sort,'order' =>
$this->order,'allrows'=>$this->allrows,
!
'cat_id' => $this->cat_id,'property_id' => $property_id,
'gaards_nr' => $gaards_nr,'bruksnr' => $bruksnr,'feste_nr' =>
$feste_nr,'seksjons_nr' => $seksjons_nr,));
$this->total_records = $this->so->total_records;
--- 106,113 ----
! function
read($loc1='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='')
{
$gab = $this->so->read(array('start' =>
$this->start,'sort' => $this->sort,'order' =>
$this->order,'allrows'=>$this->allrows,
!
'cat_id' => $this->cat_id,'loc1' => $loc1,
'gaards_nr' => $gaards_nr,'bruksnr' => $bruksnr,'feste_nr' =>
$feste_nr,'seksjons_nr' => $seksjons_nr,));
$this->total_records = $this->so->total_records;
Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.boinvoice.inc.php 23 May 2003 08:40:19 -0000 1.18
--- class.boinvoice.inc.php 28 Jun 2003 16:11:47 -0000 1.19
***************
*** 110,119 ****
}
! function
read_invoice($paid='',$start_date='',$end_date='',$vendor_id='',$property_id='',$workorder_id='')
{
$invoice = $this->so->read_invoice(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'user_lid' => $this->user_lid,'cat_id' => $this->cat_id, 'paid' =>
$paid,
'start_date'=>$start_date,'end_date'=>$end_date,'vendor_id'=>$vendor_id,
!
'property_id'=>$property_id,'workorder_id'=>$workorder_id,'allrows'=>$this->allrows));
$this->total_records = $this->so->total_records;
--- 110,119 ----
}
! function
read_invoice($paid='',$start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='')
{
$invoice = $this->so->read_invoice(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'user_lid' => $this->user_lid,'cat_id' => $this->cat_id, 'paid' =>
$paid,
'start_date'=>$start_date,'end_date'=>$end_date,'vendor_id'=>$vendor_id,
!
'loc1'=>$loc1,'workorder_id'=>$workorder_id,'allrows'=>$this->allrows));
$this->total_records = $this->so->total_records;
***************
*** 136,145 ****
! function
read_consume($start_date='',$end_date='',$vendor_id='',$property_id='',$workorder_id='',$b_account_class='',$district_id='')
{
$invoice = $this->so->read_consume(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'user_lid' => $this->user_lid,'cat_id' => $this->cat_id,
'start_date'=>$start_date,'end_date'=>$end_date,'vendor_id'=>$vendor_id,
!
'property_id'=>$property_id,'workorder_id'=>$workorder_id,'b_account_class'
=>$b_account_class,
'district_id' => $district_id ));
--- 136,145 ----
! function
read_consume($start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$b_account_class='',$district_id='')
{
$invoice = $this->so->read_consume(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'user_lid' => $this->user_lid,'cat_id' => $this->cat_id,
'start_date'=>$start_date,'end_date'=>$end_date,'vendor_id'=>$vendor_id,
!
'loc1'=>$loc1,'workorder_id'=>$workorder_id,'b_account_class'
=>$b_account_class,
'district_id' => $district_id ));
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.bolocation.inc.php 27 Jun 2003 11:14:51 -0000 1.19
--- class.bolocation.inc.php 28 Jun 2003 16:11:47 -0000 1.20
***************
*** 633,636 ****
--- 633,642 ----
$this->so->delete($location_code);
}
+
+ function update_cat()
+ {
+ return $this->so->update_cat();
+ }
+
}
?>
Index: class.bolookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolookup.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.bolookup.inc.php 19 Jun 2003 12:09:59 -0000 1.9
--- class.bolookup.inc.php 28 Jun 2003 16:11:47 -0000 1.10
***************
*** 169,226 ****
}
- function read_location()
- {
- $location = $this->so->read_location(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
- function read_property()
- {
- $location = $this->so->read_property(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
- function read_building()
- {
- $location = $this->so->read_building(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
- function read_entrance()
- {
- $location = $this->so->read_entrance(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
- function read_apartment()
- {
- $location = $this->so->read_apartment(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
- function read_tenant_old()
- {
- $location = $this->so->read_tenant(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));
- $this->total_records = $this->so->total_records;
-
- return $location;
- }
-
function read_equipment()
{
--- 169,172 ----
Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.socommon.inc.php 21 Jun 2003 19:27:35 -0000 1.29
--- class.socommon.inc.php 28 Jun 2003 16:11:47 -0000 1.30
***************
*** 93,100 ****
$attrib_table='fm_equipment_attrib';
break;
- case 'location':
- $type_table='fm_location_type_attrib';
- $attrib_table='fm_location_attrib';
- break;
case 'report':
$type_table='fm_report_type_attrib';
--- 93,96 ----
***************
*** 138,144 ****
$table='fm_equipment_attrib';
break;
- case 'location':
- $table='fm_location_attrib';
- break;
case 'report':
$table='fm_report_attrib';
--- 134,137 ----
***************
*** 162,212 ****
}
- function check_property($property_id='')
- {
- $this->db->query("SELECT count(*) FROM fm_property
where property_id='$property_id'");
-
- $this->db->next_record();
-
- if ( $this->db->f(0))
- {
- return True;
- }
- }
-
- function check_building($property_id='',$building_id='')
- {
- $this->db->query("SELECT count(*) FROM fm_building
where property_id='$property_id' and building_id='$building_id'");
-
- $this->db->next_record();
-
- if ( $this->db->f(0))
- {
- return True;
- }
- }
- function
check_entrance($property_id='',$building_id='',$entrance_id='')
- {
- $this->db->query("SELECT count(*) FROM fm_entrance
where property_id='$property_id' and building_id='$building_id' and
entrance_id='$entrance_id'");
-
- $this->db->next_record();
-
- if ( $this->db->f(0))
- {
- return True;
- }
- }
-
- function
check_apartment($property_id='',$building_id='',$entrance_id='',$apartment_id='')
- {
- $this->db->query("SELECT count(*) FROM fm_apartment
where property_id='$property_id' and building_id='$building_id' and
entrance_id='$entrance_id' and apartment_id='$apartment_id'");
-
- $this->db->next_record();
-
- if ( $this->db->f(0))
- {
- return True;
- }
- }
-
function check_location($location_code='',$type_id='')
{
--- 155,158 ----
***************
*** 235,295 ****
return $part_of_town;
- }
-
- function select_category_property_list()
- {
-
- $this->db->query("SELECT id, descr FROM
fm_property_category where id >'0' ORDER BY descr ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $categories[$i]['id']
= $this->db->f('id');
- $categories[$i]['name']
= stripslashes($this->db->f('descr'));
- $i++;
- }
- return $categories;
- }
- function select_category_building_list()
- {
-
- $this->db->query("SELECT id, descr FROM
fm_building_category where id >'0' ORDER BY descr ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $categories[$i]['id']
= $this->db->f('id');
- $categories[$i]['name']
= stripslashes($this->db->f('descr'));
- $i++;
- }
- return $categories;
- }
- function select_category_entrance_list()
- {
-
- $this->db->query("SELECT id, descr FROM
fm_entrance_category where id >'0' ORDER BY descr ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $categories[$i]['id']
= $this->db->f('id');
- $categories[$i]['name']
= stripslashes($this->db->f('descr'));
- $i++;
- }
- return $categories;
- }
- function select_category_apartment_list()
- {
-
- $this->db->query("SELECT id, descr FROM
fm_apartment_category where id >'0' ORDER BY descr ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $categories[$i]['id']
= $this->db->f('id');
- $categories[$i]['name']
= stripslashes($this->db->f('descr'));
- $i++;
- }
- return $categories;
}
--- 181,184 ----
Index: class.sodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodocument.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.sodocument.inc.php 27 Jun 2003 11:14:51 -0000 1.8
--- class.sodocument.inc.php 28 Jun 2003 16:11:47 -0000 1.9
***************
*** 509,522 ****
$location = split("-", $location_code);
! $property_id = $location[0];
if(!$equipment_id)
{
! $file = $this->fakebase. SEP . 'document' . SEP
. $property_id . SEP . $document_name;
}
else
{
! $file = $this->fakebase. SEP . 'document' . SEP
. $property_id . SEP . $equipment_id . SEP . $document_name;
}
--- 509,522 ----
$location = split("-", $location_code);
! $loc1 = $location[0];
if(!$equipment_id)
{
! $file = $this->fakebase. SEP . 'document' . SEP
. $loc1 . SEP . $document_name;
}
else
{
! $file = $this->fakebase. SEP . 'document' . SEP
. $loc1 . SEP . $equipment_id . SEP . $document_name;
}
Index: class.sogab.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sogab.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.sogab.inc.php 27 Jun 2003 19:04:30 -0000 1.8
--- class.sogab.inc.php 28 Jun 2003 16:11:47 -0000 1.9
***************
*** 38,42 ****
$order =
(isset($data['order'])?$data['order']:'');
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
! $property_id =
(isset($data['property_id'])?$data['property_id']:'');
$gaards_nr =
(isset($data['gaards_nr'])?$data['gaards_nr']:'');
$bruksnr =
(isset($data['bruksnr'])?$data['bruksnr']:'');
--- 38,42 ----
$order =
(isset($data['order'])?$data['order']:'');
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
! $loc1 = (isset($data['loc1'])?$data['loc1']:'');
$gaards_nr =
(isset($data['gaards_nr'])?$data['gaards_nr']:'');
$bruksnr =
(isset($data['bruksnr'])?$data['bruksnr']:'');
***************
*** 69,76 ****
}
! if ($property_id)
{
! $len=strlen($property_id);
! $filtermethod .= " $where
left(fm_gab_location.location_code,$len)='$property_id' ";
$where = 'AND';
}
--- 69,76 ----
}
! if ($loc1)
{
! $len=strlen($loc1);
! $filtermethod .= " $where
left(fm_gab_location.location_code,$len)='$loc1' ";
$where = 'AND';
}
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.soinvoice.inc.php 21 Jun 2003 19:27:35 -0000 1.23
--- class.soinvoice.inc.php 28 Jun 2003 16:11:47 -0000 1.24
***************
*** 58,62 ****
$end_date =
(isset($data['end_date'])?$data['end_date']:'');
$vendor_id =
(isset($data['vendor_id'])?$data['vendor_id']:'');
! $property_id =
(isset($data['property_id'])?$data['property_id']:'');
$workorder_id =
(isset($data['workorder_id'])?$data['workorder_id']:'');
$allrows =
(isset($data['allrows'])?$data['allrows']:'');
--- 58,62 ----
$end_date =
(isset($data['end_date'])?$data['end_date']:'');
$vendor_id =
(isset($data['vendor_id'])?$data['vendor_id']:'');
! $loc1 =
(isset($data['loc1'])?$data['loc1']:'');
$workorder_id =
(isset($data['workorder_id'])?$data['workorder_id']:'');
$allrows =
(isset($data['allrows'])?$data['allrows']:'');
***************
*** 101,107 ****
$where= 'AND';
}
! if ($property_id)
{
! $filtermethod .= " $where dima ='$property_id'
";
$where= 'AND';
}
--- 101,107 ----
$where= 'AND';
}
! if ($loc1)
{
! $filtermethod .= " $where dima ='$loc1' ";
$where= 'AND';
}
***************
*** 405,409 ****
$end_date =
(isset($data['end_date'])?$data['end_date']:'');
$vendor_id =
(isset($data['vendor_id'])?$data['vendor_id']:'');
! $property_id =
(isset($data['property_id'])?$data['property_id']:'');
$district_id =
(isset($data['district_id'])?$data['district_id']:'');
$workorder_id =
(isset($data['workorder_id'])?$data['workorder_id']:0);
--- 405,409 ----
$end_date =
(isset($data['end_date'])?$data['end_date']:'');
$vendor_id =
(isset($data['vendor_id'])?$data['vendor_id']:'');
! $loc1 =
(isset($data['loc1'])?$data['loc1']:'');
$district_id =
(isset($data['district_id'])?$data['district_id']:'');
$workorder_id =
(isset($data['workorder_id'])?$data['workorder_id']:0);
***************
*** 452,458 ****
}
! if($property_id)
{
! $filtermethod .=" $where (dima like
'%$property_id%')";
$where= 'AND';
}
--- 452,458 ----
}
! if($loc1)
{
! $filtermethod .=" $where (dima like '%$loc1%')";
$where= 'AND';
}
***************
*** 481,486 ****
$sql = "SELECT district_id,periode,sum(godkjentbelop)
as consume $select_account_class "
! . " FROM fm_ecobilagoverf $this->join
fm_property ON left(fm_ecobilagoverf.dima,4) = fm_property.property_id
$this->join "
! . " fm_part_of_town ON fm_property.fm_part_of_town_id =
fm_part_of_town.part_of_town_id "
. " $filtermethod group by district_id,periode
$group_account_class";
//echo $sql;
--- 481,486 ----
$sql = "SELECT district_id,periode,sum(godkjentbelop)
as consume $select_account_class "
! . " FROM fm_ecobilagoverf $this->join
fm_location1 ON left(fm_ecobilagoverf.dima,4) = fm_location1.loc1 $this->join "
! . " fm_part_of_town ON fm_location1.part_of_town_id =
fm_part_of_town.part_of_town_id "
. " $filtermethod group by district_id,periode
$group_account_class";
//echo $sql;
***************
*** 565,569 ****
{
$dima_check=substr($values['dima'][$n],0,4);
! $GLOBALS['phpgw']->db->query("select
count(*) from fm_property where property_id = $dima_check ");
$GLOBALS['phpgw']->db->next_record();
if ($GLOBALS['phpgw']->db->f(0) == 0)
--- 565,569 ----
{
$dima_check=substr($values['dima'][$n],0,4);
! $GLOBALS['phpgw']->db->query("select
count(*) from fm_location1 where loc1 = '$dima_check' ");
$GLOBALS['phpgw']->db->next_record();
if ($GLOBALS['phpgw']->db->f(0) == 0)
Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.solocation.inc.php 23 Jun 2003 12:26:43 -0000 1.15
--- class.solocation.inc.php 28 Jun 2003 16:11:47 -0000 1.16
***************
*** 657,660 ****
--- 657,810 ----
$this->db->query("DELETE FROM fm_location WHERE
location_code='" . $location_code ."'",__LINE__,__FILE__);
}
+
+ function update_cat()
+ {
+ $sql = "SELECT property_id,building_id,entrance_id,
count(*) as count_99 FROM fm_apartment where cat_id='99' group by
property_id,building_id,entrance_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+
$outdated[$this->db->f('property_id')][$this->db->f('building_id')][$this->db->f('entrance_id')]['count_99']=$this->db->f('count_99');
+ }
+
+ $sql = "SELECT property_id,building_id,entrance_id,
count(*) as count_all FROM fm_apartment group by
property_id,building_id,entrance_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ if(
$outdated[$this->db->f('property_id')][$this->db->f('building_id')][$this->db->f('entrance_id')]['count_99']==$this->db->f('count_all'))
+ {
+ $update[]=array
+ (
+ 'property_id' =>
$this->db->f('property_id'),
+ 'building_id' =>
$this->db->f('building_id'),
+ 'entrance_id' =>
$this->db->f('entrance_id')
+ );
+
+ }
+ }
+
+ $j=0;
+ for ($i=0; $i<count($update); $i++)
+ {
+
+ $sql = "SELECT cat_id FROM fm_entrance "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'"
+ . " AND building_id= '" .
$update[$i]['building_id'] ."'"
+ . " AND entrance_id= '" .
$update[$i]['entrance_id'] ."'";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if(!$this->db->f('cat_id')=='99')
+ {
+ $j++;
+ $this->db->query("UPDATE fm_entrance set
+ cat_id='99' "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'"
+ . " AND building_id= '" .
$update[$i]['building_id'] ."'"
+ . " AND entrance_id= '" .
$update[$i]['entrance_id'] ."'",__LINE__,__FILE__);
+ }
+ }
+
+ $receipt['message'][]=array('msg'=>lang('%1 Entrances
has been updated to not active of %2 already not active',$j,count($update)));
+
+ unset($outdated);
+ unset($update);
+
+ $sql = "SELECT property_id,building_id, count(*) as
count_99 FROM fm_entrance where cat_id='99' group by property_id,building_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+
$outdated[$this->db->f('property_id')][$this->db->f('building_id')]['count_99']=$this->db->f('count_99');
+ }
+
+ $sql = "SELECT property_id,building_id, count(*) as
count_all FROM fm_entrance group by property_id,building_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ if(
$outdated[$this->db->f('property_id')][$this->db->f('building_id')]['count_99']==$this->db->f('count_all'))
+ {
+ $update[]=array
+ (
+ 'property_id' =>
$this->db->f('property_id'),
+ 'building_id' =>
$this->db->f('building_id')
+ );
+
+ }
+ }
+
+ $j=0;
+ for ($i=0; $i<count($update); $i++)
+ {
+ $sql = "SELECT cat_id FROM fm_building "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'"
+ . " AND building_id= '" .
$update[$i]['building_id'] ."'";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if(!$this->db->f('cat_id')=='99')
+ {
+ $j++;
+ $this->db->query("UPDATE fm_building set
+ cat_id='99' "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'"
+ . " AND building_id= '" .
$update[$i]['building_id'] ."'",__LINE__,__FILE__);
+ }
+ }
+
+ $receipt['message'][]=array('msg'=>lang('%1 Buildings
has been updated to not active of %2 already not active',$j,count($update)));
+
+ unset($outdated);
+ unset($update);
+
+ $sql = "SELECT property_id, count(*) as count_99 FROM
fm_building where cat_id='99' group by property_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+
$outdated[$this->db->f('property_id')]['count_99']=$this->db->f('count_99');
+ }
+
+ $sql = "SELECT property_id, count(*) as count_all FROM
fm_building group by property_id";
+ $this->db->query($sql,__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ if(
$outdated[$this->db->f('property_id')]['count_99']==$this->db->f('count_all'))
+ {
+ $update[]=array
+ (
+ 'property_id' =>
$this->db->f('property_id')
+ );
+
+ }
+ }
+
+ $j=0;
+ for ($i=0; $i<count($update); $i++)
+ {
+ $sql = "SELECT cat_id FROM fm_property "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->db->next_record();
+
+ if(!$this->db->f('cat_id')=='99')
+ {
+ $j++;
+ $this->db->query("UPDATE fm_property set
+ cat_id='99' "
+ . " WHERE property_id= '" .
$update[$i]['property_id'] ."'",__LINE__,__FILE__);
+ }
+ }
+
+ $receipt['message'][]=array('msg'=>lang('%1 Properties
has been updated to not active of %2 already not active',$j,count($update)));
+
+ unset($outdated);
+ unset($update);
+
+ return $receipt;
+ }
}
?>
Index: class.solookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solookup.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** class.solookup.inc.php 21 Jun 2003 19:27:35 -0000 1.22
--- class.solookup.inc.php 28 Jun 2003 16:11:47 -0000 1.23
***************
*** 169,286 ****
- function read_location($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_apartment.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_apartment.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_apartment.access='public' OR fm_apartment.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "' AND fm_apartment.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_apartment.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND
fm_apartment.cat_id!='99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( street_name LIKE
'%$query%' OR fm_apartment.location_code LIKE '%$query%' OR first_name LIKE
'%$query%' OR last_name LIKE '%$query%')";
- }
-
-
- $sql = "SELECT
fm_apartment.property_id,building_id,entrance_id,floor,apartment_id,street_number,street_name,fm_apartment_category.descr
as category,fm_apartment.tenant_id, first_name, last_name"
- . " FROM fm_apartment $this->join"
- . " fm_property ON fm_apartment.property_id =
fm_property.property_id $this->join"
- . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id $this->join"
- . " fm_tenant ON fm_apartment.tenant_id =
fm_tenant.tenant_id $this->join"
- . " fm_streetaddress ON fm_apartment.street_id =
fm_streetaddress.street_id $this->join"
- . " fm_apartment_category ON fm_apartment.cat_id =
fm_apartment_category.id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'building_id' =>
$this->db->f('building_id'),
- 'entrance_id' =>
$this->db->f('entrance_id'),
- 'floor' =>
$this->db->f('floor'),
- 'apartment_id' =>
$this->db->f('apartment_id'),
- 'street_name' =>
$this->db->f('street_name'),
- 'street_number' =>
$this->db->f('street_number'),
- 'category' =>
$this->db->f('category'),
- 'tenant_id' =>
$this->db->f('tenant_id'),
- 'firstname' =>
$this->db->f('first_name'),
- 'lastname' =>
$this->db->f('last_name')
- );
- }
-
- return $location;
- }
-
function read_street($data)
{
--- 169,172 ----
***************
*** 445,981 ****
return $ns3420;
}
-
- function read_property($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_property.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_property.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_property.access='public' OR fm_property.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_property.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_property.owner='" .
$this->account . "' AND fm_property.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_property.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND
fm_property.cat_id!='99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( fm_property.name LIKE
'%$query%' OR location_code LIKE '%$query%' )";
- }
-
- $sql = "SELECT fm_property.* FROM fm_property
$this->join fm_part_of_town on fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'property_name' =>
$this->db->f('name')
- );
- }
-
- return $location;
- }
-
- function read_building($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_building.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_building.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_building.access='public' OR fm_building.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_building.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_building.owner='" .
$this->account . "' AND fm_building.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_building.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND
fm_building.cat_id!='99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( street_name LIKE
'%$query%' OR fm_building.location_code LIKE '%$query%' OR fm_property.name
LIKE '%$query%' ";
- }
-
- $sql = "SELECT
fm_property.property_id,fm_property.name,building_id"
- . " FROM fm_building $this->join"
- . " fm_property ON fm_building.property_id =
fm_property.property_id $this->join"
- . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'property_name' => $this->db->f('name'),
- 'building_id' =>
$this->db->f('building_id')
- );
- }
-
- return $location;
- }
-
- function read_entrance($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_property.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_property.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_property.access='public' OR fm_property.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_property.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_property.owner='" .
$this->account . "' AND fm_property.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_entrance.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND fm_entrance.cat_id !=
'99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( descr LIKE '%$query%' OR
fm_property.location_code LIKE '%$query%' OR fm_property.name LIKE '%$query%')";
- }
-
-
- $sql = "SELECT
fm_property.property_id,fm_property.name,building_id,entrance_id,fm_entrance.descr"
- . " FROM fm_entrance $this->join"
- . " fm_property ON fm_entrance.property_id =
fm_property.property_id $this->join"
- . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'property_name' => $this->db->f('name'),
- 'building_id' =>
$this->db->f('building_id'),
- 'entrance_id' =>
$this->db->f('entrance_id'),
- 'street_name' => $this->db->f('descr')
- );
- }
-
- return $location;
- }
-
- function read_apartment($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_apartment.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_apartment.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_apartment.access='public' OR fm_apartment.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "' AND fm_apartment.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_apartment.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND
fm_apartment.cat_id!='99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( street_name LIKE
'%$query%' OR fm_apartment.location_code LIKE '%$query%')";
- }
-
-
- $sql = "SELECT
fm_apartment.property_id,fm_property.name,building_id,entrance_id,floor,apartment_id,street_number,street_name,fm_apartment_category.descr"
- . " FROM fm_apartment $this->join"
- . " fm_property ON fm_apartment.property_id =
fm_property.property_id $this->join"
- . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id $this->join"
- . " fm_streetaddress ON fm_apartment.street_id =
fm_streetaddress.street_id $this->join"
- . " fm_apartment_category ON fm_apartment.cat_id =
fm_apartment_category.id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'property_name' => $this->db->f('name'),
- 'building_id' =>
$this->db->f('building_id'),
- 'entrance_id' =>
$this->db->f('entrance_id'),
- 'floor' =>
$this->db->f('floor'),
- 'apartment_id' =>
$this->db->f('apartment_id'),
- 'street_name' =>
$this->db->f('street_name'),
- 'street_number' =>
$this->db->f('street_number'),
- 'category' =>
$this->db->f('descr')
- );
- }
-
- return $location;
- }
-
- function read_tenant_old($data)
- {
- //_debug_array($data);
- if(is_array($data))
- {
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by
fm_apartment.property_id DESC';
- }
-
- if ($filter == 'none')
- {
- $filtermethod = ' ( fm_apartment.owner=' .
$this->account;
- if (is_array($this->grants))
- {
- $grants = $this->grants;
- while (list($user) = each($grants))
- {
- $public_user_list[] = $user;
- }
- reset($public_user_list);
- $filtermethod .= " OR
(fm_apartment.access='public' OR fm_apartment.owner IN(" .
implode(',',$public_user_list) . ")))";
- }
- else
- {
- $filtermethod .= ' )';
- }
- }
- elseif ($filter == 'yours')
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "'";
- }
- else
- {
- $filtermethod = " fm_apartment.owner='" .
$this->account . "' AND fm_apartment.access='private'";
- }
-
- if ($cat_id > 0)
- {
- $filtermethod .= " AND
fm_apartment.cat_id='$cat_id' ";
- }
- else
- {
- $filtermethod .= " AND
fm_apartment.cat_id!='99' ";
- }
-
- if ($district_id > 0)
- {
- $filtermethod .= " AND
district_id='$district_id' ";
- }
- if($query)
- {
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
-
- $querymethod = " AND ( street_name LIKE
'%$query%' OR fm_apartment.location_code LIKE '%$query%' OR first_name LIKE
'%$query%' OR last_name LIKE '%$query%')";
- }
-
-
- $sql = "SELECT
fm_apartment.property_id,fm_property.name,building_id,entrance_id,floor,apartment_id,street_number,street_name,fm_apartment_category.descr,fm_apartment.tenant_id,
first_name, last_name,contact_phone "
- . " FROM fm_apartment $this->join"
- . " fm_property ON fm_apartment.property_id =
fm_property.property_id $this->join"
- . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id $this->join"
- . " fm_tenant ON fm_apartment.tenant_id =
fm_tenant.tenant_id $this->join"
- . " fm_streetaddress ON fm_apartment.street_id =
fm_streetaddress.street_id $this->join"
- . " fm_apartment_category ON fm_apartment.cat_id =
fm_apartment_category.id "
- . " WHERE $filtermethod $querymethod ";
-
- //echo $sql;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
- $location[] = array
- (
- 'property_id' =>
$this->db->f('property_id'),
- 'property_name' => $this->db->f('name'),
- 'building_id' =>
$this->db->f('building_id'),
- 'entrance_id' =>
$this->db->f('entrance_id'),
- 'floor' =>
$this->db->f('floor'),
- 'apartment_id' =>
$this->db->f('apartment_id'),
- 'street_name' =>
$this->db->f('street_name'),
- 'street_number' =>
$this->db->f('street_number'),
- 'category' =>
$this->db->f('descr'),
- 'tenant_id' =>
$this->db->f('tenant_id'),
- 'contact_phone' =>
$this->db->f('contact_phone'),
- 'firstname' =>
$this->db->f('first_name'),
- 'lastname' =>
$this->db->f('last_name')
- );
- }
-
- return $location;
- }
-
}
?>
--- 331,334 ----
Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.sotts.inc.php 24 Jun 2003 10:26:40 -0000 1.21
--- class.sotts.inc.php 28 Jun 2003 16:11:47 -0000 1.22
***************
*** 281,288 ****
}
- function delete($id )
- {
- $this->db->query('DELETE FROM fm_building WHERE
property_id=' . $property_id . ' and building_id=' .
$building_id,__LINE__,__FILE__);
- }
}
?>
--- 281,284 ----
Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.soXport.inc.php 21 Jun 2003 19:27:35 -0000 1.25
--- class.soXport.inc.php 28 Jun 2003 16:11:47 -0000 1.26
***************
*** 23,28 ****
{
$this->db->query("select
fm_meter.name,fm_meter.location_code,fm_part_of_town.district_id "
! . " from fm_meter $this->join fm_property ON
fm_meter.property_id = fm_property.property_id $this->join "
! . " fm_part_of_town ON fm_property.part_of_town_id =
fm_part_of_town.part_of_town_id where fm_meter.id='$anleggsnr'");
$this->db->next_record();
--- 23,28 ----
{
$this->db->query("select
fm_meter.name,fm_meter.location_code,fm_part_of_town.district_id "
! . " from fm_meter $this->join fm_location1 ON
fm_meter.loc1 = fm_location1.loc1 $this->join "
! . " fm_part_of_town ON fm_location1.part_of_town_id =
fm_part_of_town.part_of_town_id where fm_meter.id='$anleggsnr'");
$this->db->next_record();
***************
*** 30,37 ****
$location = split("-",
$this->db->f('location_code'));
! $property_id = $location[0];
! $building_id = $location[1];
! $entrance_id = $location[2];
! $dima=$property_id.$building_id.$entrance_id;
$maalerinfo['dima']=$dima;
--- 30,37 ----
$location = split("-",
$this->db->f('location_code'));
! $loc1 = $location[0];
! $loc2 = $location[1];
! $loc3 = $location[2];
! $dima=$loc1.$loc2.$loc3;
$maalerinfo['dima']=$dima;
***************
*** 44,54 ****
{
//Finn dima fra Boei
! $sql = "select fm_gabnr.property_id,
fm_gabnr.building_id, fm_gabnr.entrance_id from fm_gabnr, fm_property,
boei_eier "
! . "where substring(fm_gabnr.gabnr,5,5)='$Gnr' and "
! . " substring(fm_gabnr.gabnr,10,4)='$Bnr' and "
! . " substring(fm_gabnr.gabnr,18,3)='$sekjonnr' and
"
! . " fm_gabnr.property_id=fm_property.property_id
and "
! . " fm_property.eier_id=boei_eier.eier_id and "
! . " (boei_eier.eiertype_id=0 or
boei_eier.eiertype_id=2)";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
--- 44,54 ----
{
//Finn dima fra Boei
! $sql = "select fm_gab_location.loc1,
fm_gab_location.loc2, fm_gab_location.loc3 from fm_gab_location, fm_location1,
boei_eier "
! . "where substring(fm_gab_location.gabnr,5,5)='$Gnr'
and "
! . " substring(fm_gab_location.gabnr,10,4)='$Bnr'
and "
! . "
substring(fm_gab_location.gabnr,18,3)='$sekjonnr' and "
! . " fm_gab_location.loc1=fm_location1.loc1 and "
! . " fm_location1.owner_id=fm_owner.owner_id and "
! . " (fm_owner.category=0 or fm_owner.category=2)";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
***************
*** 57,61 ****
// if ($GLOBALS['phpgw']->db->f(0))
{
!
$dima=$GLOBALS['phpgw']->db->f('property_id').$GLOBALS['phpgw']->db->f('building_id').$GLOBALS['phpgw']->db->f('entrance_id');
}
// else
--- 57,61 ----
// if ($GLOBALS['phpgw']->db->f(0))
{
!
$dima=$GLOBALS['phpgw']->db->f('loc1').$GLOBALS['phpgw']->db->f('loc2').$GLOBALS['phpgw']->db->f('loc3');
}
// else
***************
*** 69,80 ****
function dima_to_address($dima)
{
! $property_id=substr($dima,0,4);
! $building_id=substr($dima,4,2);
! $entrance_id=substr($dima,6,2);
! $sql = "select descr from fm_entrance where property_id
= '$property_id' and building_id= '$building_id' and entrance_id =
'$entrance_id' ";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
$GLOBALS['phpgw']->db->next_record();
! $adresse=$GLOBALS['phpgw']->db->f('descr');
! return $adresse;
}
--- 69,80 ----
function dima_to_address($dima)
{
! $loc1=substr($dima,0,4);
! $loc2=substr($dima,4,2);
! $loc3=substr($dima,6,2);
! $sql = "select loc3_name from fm_location3 where loc1 =
'$loc1' and loc2= '$loc2' and loc3 = '$loc3' ";
$GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
$GLOBALS['phpgw']->db->next_record();
! $address=$GLOBALS['phpgw']->db->f('loc3_name');
! return $address;
}
***************
*** 701,711 ****
$location_code = $this->db->f('location_code');
$location = split("-", $location_code);
! $property_id = $location[0];
! $apartment_id = $location[3];
! $sql= "select cat_id from fm_apartment where
fm_apartment.property_id='$property_id' and
fm_apartment.apartment_id='$apartment_id'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
! $dimc = $this->db->f('cat_id');
return $dimc;
}
--- 701,711 ----
$location_code = $this->db->f('location_code');
$location = split("-", $location_code);
! $loc1 = $location[0];
! $loc4 = $location[3];
! $sql= "select category from fm_location4 where
fm_location4.loc1='$loc1' and fm_location4.loc4='$loc4'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
! $dimc = $this->db->f('category');
return $dimc;
}
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uiequipment.inc.php 24 Jun 2003 10:26:40 -0000 1.29
--- class.uiequipment.inc.php 28 Jun 2003 16:11:47 -0000 1.30
***************
*** 504,508 ****
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
- 'lang_property_id'
=> lang('Property ID'),
'lang_year'
=> lang('Year'),
'lang_category'
=> lang('category'),
--- 504,507 ----
Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.uiinvestment.inc.php 25 Jun 2003 09:47:28 -0000 1.23
--- class.uiinvestment.inc.php 28 Jun 2003 16:11:47 -0000 1.24
***************
*** 600,608 ****
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
- 'value_property_id'
=> $values['property_id'],
- 'value_building_id'
=> $values['building_id'],
- 'value_entrance_id'
=> $values['entrance_id'],
- 'value_apartment_id' =>
$values['apartment_id'],
- 'value_equipment_id' =>
$values['equipment_id'],
'value_new_period'
=> $values['new_period'],
'value_inital_value' =>
$values['initial_value'],
--- 600,603 ----
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** class.uiinvoice.inc.php 12 Jun 2003 20:51:13 -0000 1.26
--- class.uiinvoice.inc.php 28 Jun 2003 16:11:47 -0000 1.27
***************
*** 39,43 ****
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->bo =
CreateObject($this->currentapp.'.boinvoice',True);
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->start =
$this->bo->start;
--- 39,44 ----
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->bo =
CreateObject($this->currentapp.'.boinvoice',True);
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
! $this->bolocation =
CreateObject($this->currentapp.'.bolocation');
$this->start =
$this->bo->start;
***************
*** 97,101 ****
$vendor_id =
get_var('vendor_id',array('POST','GET'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
! $property_id =
get_var('property_id',array('POST','GET'));
--- 98,102 ----
$vendor_id =
get_var('vendor_id',array('POST','GET'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
! $loc1 = get_var('loc1',array('POST','GET'));
***************
*** 118,122 ****
! $content =
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$property_id,$workorder_id);
$i=0;
--- 119,123 ----
! $content =
$this->bo->read_invoice($paid,$start_date,$end_date,$vendor_id,$loc1,$workorder_id);
$i=0;
***************
*** 254,257 ****
--- 255,259 ----
if ($paid)
{
+
$location_data=$this->bolocation->initiate_ui_location(array('type_id'=> 1));
$data['allow_allrows']
= false;
***************
*** 283,292 ****
$data['lang_select_vendor_statustext'] =
lang('Select the vendor by klicking this link');
$data['lang_vendor']
= lang('Vendor');
! $data['property_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
$data['lang_select_property_statustext']=
lang('Select the property by klicking this link');
$data['lang_property_statustext']
= lang('Search by property');
$data['lang_property']
= lang('property');
! $data['property_id']
= $property_id;
$data['lang_search']
= lang('Search');
$data['lang_search_statustext']
= lang('Search for paid invoices');
--- 285,294 ----
$data['lang_select_vendor_statustext'] =
lang('Select the vendor by klicking this link');
$data['lang_vendor']
= lang('Vendor');
! $data['property_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&lookup=1&type_id=1&lookup_name=0');
$data['lang_select_property_statustext']=
lang('Select the property by klicking this link');
$data['lang_property_statustext']
= lang('Search by property');
$data['lang_property']
= lang('property');
! $data['loc1']
= $loc1;
$data['lang_search']
= lang('Search');
$data['lang_search_statustext']
= lang('Search for paid invoices');
***************
*** 579,583 ****
$workorder_id =
get_var('workorder_id',array('POST','GET'));
! $property_id =
get_var('property_id',array('POST','GET'));
$district_id =
get_var('district_id',array('POST','GET'));
$b_account_class =
get_var('b_account_class',array('POST','GET'));
--- 581,585 ----
$workorder_id =
get_var('workorder_id',array('POST','GET'));
! $loc1 =
get_var('loc1',array('POST','GET'));
$district_id =
get_var('district_id',array('POST','GET'));
$b_account_class =
get_var('b_account_class',array('POST','GET'));
***************
*** 595,599 ****
else
{
! $content =
$this->bo->read_consume($start_date,$end_date,$vendor_id,$property_id,$workorder_id,$b_account_class,$district_id);
}
--- 597,601 ----
else
{
! $content =
$this->bo->read_consume($start_date,$end_date,$vendor_id,$loc1,$workorder_id,$b_account_class,$district_id);
}
***************
*** 697,706 ****
$data['lang_select_vendor_statustext'] = lang('Select
the vendor by klicking this link');
$data['lang_vendor']
= lang('Vendor');
! $data['property_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.property');
$data['lang_select_property_statustext']= lang('Select
the property by klicking this link');
$data['lang_property_statustext'] =
lang('Search by property');
$data['lang_property']
= lang('property');
! $data['property_id']
= $property_id;
$data['lang_search']
= lang('Search');
$data['lang_search_statustext'] =
lang('Search for paid invoices');
--- 699,712 ----
$data['lang_select_vendor_statustext'] = lang('Select
the vendor by klicking this link');
$data['lang_vendor']
= lang('Vendor');
!
!
$location_data=$this->bolocation->initiate_ui_location(array('type_id'=> 1));
!
! $data['property_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.index&lookup=1&type_id=1&lookup_name=0');
!
$data['lang_select_property_statustext']= lang('Select
the property by klicking this link');
$data['lang_property_statustext'] =
lang('Search by property');
$data['lang_property']
= lang('property');
! $data['loc1']
= $loc1;
$data['lang_search']
= lang('Search');
$data['lang_search_statustext'] =
lang('Search for paid invoices');
***************
*** 709,715 ****
$data['values_consume']
= $content;
! //_debug_array($data);
! $appname
= lang('consume');
! $function_msg =
lang('list consume');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
--- 715,720 ----
$data['values_consume']
= $content;
! $appname
= lang('consume');
! $function_msg
= lang('list consume');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** class.uilocation.inc.php 24 Jun 2003 10:26:40 -0000 1.17
--- class.uilocation.inc.php 28 Jun 2003 16:11:47 -0000 1.18
***************
*** 20,27 ****
var $public_functions = array
(
! 'index' => True,
! 'view' => True,
! 'edit' => True,
! 'delete' => True
);
--- 20,28 ----
var $public_functions = array
(
! 'index' => True,
! 'view' => True,
! 'edit' => True,
! 'delete' => True,
! 'update_cat'=> True
);
***************
*** 879,882 ****
--- 880,924 ----
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
+ }
+
+ function update_cat()
+ {
+ $confirm = get_var('confirm',array('POST'));
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uilocation.index'
+ );
+
+ if (get_var('confirm',array('POST')))
+ {
+ $receipt= $this->bo->update_cat();
+ $lang_confirm_msg = lang('Do you really want to
update the categories again');
+ $lang_yes = lang('again');
+ }
+ else
+ {
+ $lang_confirm_msg = lang('Do you really
want to update the categories');
+ $lang_yes = lang('yes');
+ }
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('location'));
+
+ $data = array
+ (
+ 'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php'),
+ 'update_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.update_cat'),
+ 'message' =>
$receipt['message'],
+ 'lang_confirm_msg' =>
$lang_confirm_msg,
+ 'lang_yes' =>
$lang_yes,
+ 'lang_yes_statustext' => lang('Update the
category to not active based on if there is only nonactive apartments'),
+ 'lang_no_statustext' => lang('Back to
Admin'),
+ 'lang_no' =>
lang('no')
+ );
+
+ $appname = lang('location');
+ $function_msg = lang('Update the not active category
for locations');
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('update_cat' => $data));
}
}
Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.uilookup.inc.php 24 Jun 2003 10:26:40 -0000 1.25
--- class.uilookup.inc.php 28 Jun 2003 16:11:47 -0000 1.26
***************
*** 475,479 ****
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_tenant_new' => $data));
$this->save_sessiondata();
}
--- 475,479 ----
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_tenant' => $data));
$this->save_sessiondata();
}
***************
*** 569,744 ****
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_ns3420' => $data));
- $this->save_sessiondata();
- }
-
- function location()
- {
-
- $GLOBALS['phpgw']->xslttpl->add_file(array('lookup',
-
'nextmatchs',
-
'search_field'));
-
- $list = get_var('list',array('POST','GET'));
-
-
- switch ($list)
- {
- case 'property':
- $location_list =
$this->bo->read_property();
- $cat_list =
$this->bocommon->select_category_property_list('filter',$this->cat_id);
- $function_msg = lang('list
property');
- break;
- case 'building':
- $location_list =
$this->bo->read_building();
- $cat_list =
$this->bocommon->select_category_building_list('filter',$this->cat_id);
- $function_msg = lang('list
building');
- break;
- case 'entrance':
- $location_list =
$this->bo->read_entrance();
- $cat_list =
$this->bocommon->select_category_entrance_list('filter',$this->cat_id);
- $function_msg = lang('list
entrance');
- break;
- case 'apartment':
- $location_list =
$this->bo->read_apartment();
- $cat_list =
$this->bocommon->select_category_apartment_list('filter',$this->cat_id);
- $function_msg = lang('list
apartment');
- break;
- case 'tenant':
- $location_list =
$this->bo->read_tenant_old();
- $cat_list =
$this->bocommon->select_category_apartment_list('filter',$this->cat_id);
- $function_msg = lang('list
tenant');
- break;
- default: break;
- }
-
-
- // $location_list = $this->bo->read_location($list);
-
- while (is_array($location_list) &&
list(,$location_entry) = each($location_list))
- {
- $content[] = array
- (
- 'property_id'
=> $location_entry['property_id'],
- 'property_name'
=> $location_entry['property_name'],
- 'building_id'
=> $location_entry['building_id'],
- 'entrance_id'
=> $location_entry['entrance_id'],
- 'floor'
=> $location_entry['floor'],
- 'apartment_id'
=> $location_entry['apartment_id'],
- 'street_name'
=> $location_entry['street_name'],
- 'street_number'
=> $location_entry['street_number'],
- 'tenant_id'
=> $location_entry['tenant_id'],
- 'tenant_name'
=> $location_entry['lastname'].', '.$location_entry['firstname'],
- 'category'
=> $location_entry['category'],
- 'contact_phone'
=> $location_entry['contact_phone']
- );
- }
-
- $table_header[] = array
- (
- 'sort_property' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'property_id',
-
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uilookup.location',
-
'cat_id'
=>$this->cat_id,
-
'district_id' =>
$this->district_id,
-
'list'
=> $list)
-
)),
- 'lang_property' => lang('Property'),
- 'sort_property_name' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'navn',
-
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uilookup.location',
-
'cat_id'
=>$this->cat_id,
-
'district_id' =>
$this->district_id,
-
'list'
=> $list)
-
)),
- 'lang_property_name'=> lang('Property name'),
- 'lang_building' => lang('Building'),
- 'lang_entrance' => lang('Entrance'),
- 'lang_floor' => lang('Floor'),
- 'lang_apartment' => lang('Apartment'),
- 'sort_street_name' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'street_name',
-
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uilookup.location',
-
'cat_id'
=>$this->cat_id,
-
'district_id' =>
$this->district_id,
-
'list'
=> $list)
-
)),
- 'lang_street_name' => lang('Street
Name'),
- 'lang_street_num' => lang('Num'),
- 'sort_tenant' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'last_name',
-
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uilookup.location',
-
'cat_id'
=>$this->cat_id,
-
'district_id' =>
$this->district_id,
-
'list'
=> $list)
-
)),
- 'lang_tenant' => lang('Tenant'),
- 'lang_category' => lang('Category')
- );
-
- $table_done[] = array
- (
- 'lang_done' =>
lang('Done'),
- 'lang_done_statustext' => lang('Close this
window')
- );
-
- $link_select = array
- (
- 'menuaction' =>
$this->currentapp.'.uilookup.location',
- 'order' => $this->order,
- 'sort' => $this->sort,
- 'cat_id' =>
$this->cat_id,
- 'district_id' => $this->district_id,
- 'query' => $this->query,
- 'filter' =>
$this->filter,
- 'list' => $list
- );
-
- $data = array
- (
- 'allow_allrows'
=> false,
- 'start_record'
=> $this->start,
- 'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
- 'num_records'
=> count($location_list),
- 'all_records'
=> $this->bo->total_records,
- 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
- 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
- 'lang_no_cat'
=> lang('no category'),
- 'lang_cat_statustext' =>
lang('Select the category the building belongs to. To do not use a category
select NO CATEGORY'),
- 'select_name'
=> 'cat_id',
- 'cat_list'
=> $cat_list,
- 'district_list'
=> $this->bocommon->select_district_list('filter',$this->district_id),
- 'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
- 'lang_no_district'
=> lang('no district'),
- 'lang_district_statustext' =>
lang('Select the district the selection belongs to. To do not use a district
select NO DISTRICT'),
- 'select_district_name' =>
'district_id',
-
- 'filter_list'
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' =>
'yes')),
- 'lang_filter_statustext' =>
lang('Select the filter. To show all entries select SHOW ALL'),
- 'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
- 'lang_searchbutton_statustext' => lang('Submit
the search string'),
- 'query'
=> $this->query,
- 'lang_search'
=> lang('search'),
- 'lang_select'
=> lang('Select'),
- 'table_header_'.$list =>
$table_header,
- 'values_'.$list
=> $content,
- 'table_done'
=> $table_done
- );
-
- $appname
= lang($this->currentapp);
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_'.$list => $data));
$this->save_sessiondata();
}
--- 569,572 ----
Index: class.uireport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uireport.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uireport.inc.php 26 Jun 2003 12:23:05 -0000 1.10
--- class.uireport.inc.php 28 Jun 2003 16:11:47 -0000 1.11
***************
*** 303,306 ****
--- 303,311 ----
function view_file()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uireport.index');
+ }
+
$GLOBALS['phpgw_info']['flags']['noframework'] = True;
$file_name =
get_var('file_name',array('POST','GET'));
***************
*** 580,584 ****
(
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'property_id'
=> $values['location']['loc1'],
'link_view_file'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uireport.view_file&loc1='
. $values['location_data']['loc1'] . '&report_id=' . $id),
'link_to_files'
=> $link_to_files,
--- 585,588 ----
***************
*** 614,618 ****
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uireport.index'),
- 'lang_property_id'
=> lang('Property ID'),
'lang_category'
=> lang('category'),
'lang_save'
=> lang('save'),
--- 618,621 ----
Index: class.uirequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.uirequest.inc.php 23 Jun 2003 12:26:43 -0000 1.21
--- class.uirequest.inc.php 28 Jun 2003 16:11:47 -0000 1.22
***************
*** 893,912 ****
!
$location_data=$this->bocommon->initiate_ui_location(array(
! 'location_type' => 'view',
! 'equipment' => true,
! 'apartment' => true,
! 'equipment_id' =>
$values['equipment_id'],
! 'property_id' =>
$values['property_id'],
! 'property_name' =>
$values['property_name'],
! 'building_id' =>
$values['building_id'],
! 'entrance_id' =>
$values['entrance_id'],
! 'floor' =>
$values['floor'],
! 'street_name' =>
$values['street_name'],
! 'street_number' =>
$values['street_number'],
! 'tenant_id' =>
$values['tenant_id'],
! 'tenant_name' =>
$values['tenant_name'],
! 'contact_phone' =>
$values['contact_phone'],
! 'apartment_id' =>
$values['apartment_id']));
--- 893,905 ----
!
$location_data=$this->bolocation->initiate_ui_location(array(
! 'values' =>
$values['location_data'],
! 'type_id' =>
count(explode('-',$values['location_data']['location_code'])),
! 'no_link' =>
False, // disable lookup links for location type less than type_id
! 'tenant' =>
$values['location_data']['tenant_id'],
! 'equipment' =>
$values['location_data']['eqiupment_id'],
! 'lookup_type' => 'view'
! ));
!
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.uitts.inc.php 24 Jun 2003 10:26:40 -0000 1.30
--- class.uitts.inc.php 28 Jun 2003 16:11:47 -0000 1.31
***************
*** 381,420 ****
}
- function delete()
- {
- $property_id = get_var('property_id',array('GET'));
- $building_id =
get_var('building_id',array('POST','GET'));
- $confirm = get_var('confirm',array('POST'));
-
- $link_data = array
- (
- 'menuaction' =>
$this->currentapp.'.uibuilding.index'
- );
-
- if (get_var('confirm',array('POST')))
- {
- $this->bo->delete($property_id,$building_id);
- Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
- }
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('app_delete'));
-
- $data = array
- (
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibuilding.delete&property_id='
. $property_id.'&building_id=' . $building_id),
- 'lang_confirm_msg' => lang('do you
really want to delete this entry'),
- 'lang_yes' =>
lang('yes'),
- 'lang_yes_statustext' => lang('Delete the
entry'),
- 'lang_no_statustext' => lang('Back to the
list'),
- 'lang_no' =>
lang('no')
- );
-
- $appname
= lang('helpdesk');
- $function_msg =
lang('delete ticket');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
- }
function view()
--- 381,384 ----
***************
*** 549,563 ****
'location_data'
=> $location_data,
'lang_location_code' =>
lang('Location Code'),
- 'lang_property_id'
=> lang('Property id'),
- 'lang_building_id'
=> lang('Building id'),
- 'lang_entrance_id'
=> lang('Entrance id'),
- 'lang_apartment_id'
=> lang('Apartment id'),
- 'lang_street'
=> lang('Street'),
- 'value_location_code' =>
$ticket['location_code'],
- 'value_property_id'
=> $ticket['property_id'],
- 'value_building_id'
=> $ticket['building_id'],
- 'value_entrance_id'
=> $ticket['entrance_id'],
- 'value_apartment_id' =>
$ticket['apartment_id'],
- 'value_street'
=> $ticket['street_name'] . ' ' . $ticket['street_number'],
'lang_ticket'
=> lang('Ticket'),
--- 513,516 ----
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** hook_admin.inc.php 29 May 2003 07:42:24 -0000 1.34
--- hook_admin.inc.php 28 Jun 2003 16:11:47 -0000 1.35
***************
*** 19,23 ****
'Location type'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=location'),
'Location type_2'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin_location.index'),
! 'Update the not active category for
locations'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiproperty.update_cat'),
// 'Request Categories'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=request'),
'Workorder Categories' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=wo'),
--- 19,23 ----
'Location type'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=location'),
'Location type_2'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin_location.index'),
! 'Update the not active category for
locations'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uilocation.update_cat'),
// 'Request Categories'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=request'),
'Workorder Categories' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=wo'),
--- class.boapartment.inc.php DELETED ---
--- class.bobuilding.inc.php DELETED ---
--- class.boentrance.inc.php DELETED ---
--- class.boproperty.inc.php DELETED ---
--- class.soapartment.inc.php DELETED ---
--- class.sobuilding.inc.php DELETED ---
--- class.soentrance.inc.php DELETED ---
--- class.soproperty.inc.php DELETED ---
--- class.uiapartment.inc.php DELETED ---
--- class.uibuilding.inc.php DELETED ---
--- class.uientrance.inc.php DELETED ---
--- class.uiproperty.inc.php DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.62,1.63 class.bogab.inc.php,1.6,1.7 class.boinvoice.inc.php,1.18,1.19 class.bolocation.inc.php,1.19,1.20 class.bolookup.inc.php,1.9,1.10 class.socommon.inc.php,1.29,1.30 class.sodocument.inc.php,1.8,1.9 class.sogab.inc.php,1.8,1.9 class.soinvoice.inc.php,1.23,1.24 class.solocation.inc.php,1.15,1.16 class.solookup.inc.php,1.22,1.23 class.sotts.inc.php,1.21,1.22 class.soXport.inc.php,1.25,1.26 class.uiequipment.inc.php,1.29,1.30class.uiinvestment.inc.php,1.23,1.24 class.uiinvoice.inc.php,1.26,1.27 class.uilocation.inc.php,1.17,1.18 class.uilookup.inc.php,1.25,1.26 class.uireport.inc.php,1.10,1.11 class.uirequest.inc.php,1.21,1.22 class.uitts.inc.php,1.30,1.31 hook_admin.inc.php,1.34,1.35 class.boapartment.inc.php,1.3,NONE class.bobuilding.inc.php,1.8,NONE class.boentrance.inc.php,1.5,NONE class.boproperty.inc.php,1.7,NONEclass.soapartment.inc.php,1.6,NONE class.sobuilding.inc.php,1.13,NONEclass.soentrance.inc.php,1.5,NONE class.soproperty.inc.php,1.19,NONEclass.uiapartment.inc.php,1.13,NONE class.uibuilding.inc.php,1.21,NONEclass.uientrance.inc.php,1.13,NONE class.uiproperty.inc.php,1.24,NONE,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default invoice.xsl,1.27,1.28 location.xsl,1.17,1.18 lookup.xsl,1.20,1.21 apartment.xsl,1.6,NONE building.xsl,1.10,NONE entrance.xsl,1.6,NONE property.xsl,1.12,NONE
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/modules class.module_news.inc.php,1.2.2.4,1.2.2.5
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default invoice.xsl,1.27,1.28 location.xsl,1.17,1.18 lookup.xsl,1.20,1.21 apartment.xsl,1.6,NONE building.xsl,1.10,NONE entrance.xsl,1.6,NONE property.xsl,1.12,NONE
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/modules class.module_news.inc.php,1.2.2.4,1.2.2.5
- Index(es):