[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.24,1.25
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.24,1.25 class.uiwo_hour.inc.php,1.27,1.28 class.uitts.inc.php,1.28,1.29 class.uiproject.inc.php,1.29,1.30 class.uiinvestment.inc.php,1.21,1.22 class.sotts.inc.php,1.18,1.19 class.soproject.inc.php,1.19,1.20 class.botts.inc.php,1.13,1.14 class.boproject.inc.php,1.9,1.10 class.bolocation.inc.php,1.15,1.16 class.bocommon.inc.php,1.57,1.58 |
Date: |
Sun, 22 Jun 2003 07:10:46 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv23298/inc
Modified Files:
class.uiworkorder.inc.php class.uiwo_hour.inc.php
class.uitts.inc.php class.uiproject.inc.php
class.uiinvestment.inc.php class.sotts.inc.php
class.soproject.inc.php class.botts.inc.php
class.boproject.inc.php class.bolocation.inc.php
class.bocommon.inc.php
Log Message:
no message
Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.uiworkorder.inc.php 21 Jun 2003 19:27:35 -0000 1.24
--- class.uiworkorder.inc.php 22 Jun 2003 11:10:44 -0000 1.25
***************
*** 484,488 ****
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$project['location_data'],
! 'type_id' => -1,
// calculated from location_types
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$project['location_data']['tenant_id'],
--- 484,488 ----
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$project['location_data'],
! 'type_id' =>
count(explode('-',$project['location_data']['location_code'])),
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$project['location_data']['tenant_id'],
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** class.uiwo_hour.inc.php 21 Jun 2003 19:27:35 -0000 1.27
--- class.uiwo_hour.inc.php 22 Jun 2003 11:10:44 -0000 1.28
***************
*** 397,401 ****
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$project['location_data'],
! 'type_id' => -1,
// calculated from location_types
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$project['location_data']['tenant_id'],
--- 397,401 ----
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$project['location_data'],
! 'type_id' =>
count(explode('-',$project['location_data']['location_code'])),
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$project['location_data']['tenant_id'],
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uitts.inc.php 19 Jun 2003 20:03:09 -0000 1.28
--- class.uitts.inc.php 22 Jun 2003 11:10:44 -0000 1.29
***************
*** 42,45 ****
--- 42,46 ----
$this->so2 =
CreateObject($this->currentapp.'.sotts2');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->bolocation =
CreateObject($this->currentapp.'.bolocation');
$this->start =
$this->bo->start;
***************
*** 81,84 ****
--- 82,86 ----
$ticket_list = $this->bo->read();
+ //_debug_array($ticket_list);
while (is_array($ticket_list) && list(,$ticket) =
each($ticket_list))
{
***************
*** 93,96 ****
--- 95,99 ----
$ticket['priority']--;
}
+ //_debug_array($ticket);
$content[] = array
***************
*** 101,109 ****
'first'
=> $first,
'location_code'
=> $ticket['location_code'],
! 'address'
=> $ticket['address'],
'date'
=> $ticket['timestampopened'],
'owner'
=> $ticket['owner'],
'assignedto'
=> $ticket['assignedto'],
- 'address'
=> $ticket['address'],
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uitts.view&id='
. $ticket['id']),
'lang_view_statustext' =>
lang('view the ticket'),
--- 104,111 ----
'first'
=> $first,
'location_code'
=> $ticket['location_code'],
! 'address'
=> $ticket['location_data']['street_name'] . ' ' .
$ticket['location_data']['street_number'],
'date'
=> $ticket['timestampopened'],
'owner'
=> $ticket['owner'],
'assignedto'
=> $ticket['assignedto'],
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uitts.view&id='
. $ticket['id']),
'lang_view_statustext' =>
lang('view the ticket'),
***************
*** 241,275 ****
function add()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('tts'));
- $values = get_var('values',array('POST'));
! if($values)
{
! $values = $values +
$this->bocommon->get_location();
! }
!
!
$location_data=$this->bocommon->initiate_ui_location(array(
!
'location_type' => 'form',
!
'equipment' => false,
!
'tenant' => true,
!
'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'],
!
'apartment_id' => $values['apartment_id'],
!
'tenant_id' => $values['tenant_id'],
!
'tenant_name' => $values['tenant_name'],
!
'contact_phone' => $values['contact_phone'],
!
'equipment_id' => $values['equipment_id']));
- //_debug_array($values);
- if ($values['save'])
- {
if(!$values['subject'])
--- 243,271 ----
function add()
{
+ $values = get_var('values',array('POST'));
+ $insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
$GLOBALS['phpgw']->xslttpl->add_file(array('tts'));
! //_debug_array($insert_record);
! if ($values['save'])
{
! for ($i=0;
$i<count($insert_record['location']); $i++)
! {
!
if($_POST[$insert_record['location'][$i]])
! {
!
$values['location'][$insert_record['location'][$i]]=
$_POST[$insert_record['location'][$i]];
! }
! }
+ while (is_array($insert_record['extra']) &&
list($key,) = each($insert_record['extra']))
+ {
+ if($_POST[$key])
+ {
+ $values['extra'][$key] =
$_POST[$key];
+ }
+ }
if(!$values['subject'])
***************
*** 293,297 ****
}
! if(!$values['property_id'] &&
!$values['equipment_id'])
{
$receipt['error'][]=array('msg'=>lang('Pleace select a location - or an
equipment !'));
--- 289,293 ----
}
! if(!$values['location']['loc1'] &&
!$values['extra']['equipment_id'])
{
$receipt['error'][]=array('msg'=>lang('Pleace select a location - or an
equipment !'));
***************
*** 304,309 ****
--- 300,323 ----
header('Location: '.
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uitts.index&order=id&sort=DESC'));
}
+ else
+ {
+ if($values['location'])
+ {
+ $location_code=implode("-",
$values['location']);
+ $values['location_data'] =
$this->bolocation->read_single($location_code,$values['extra']);
+ }
+ }
}
+
$location_data=$this->bolocation->initiate_ui_location(array(
+ 'values' =>
$values['location_data'],
+ 'type_id' => -1,
// calculated from location_types
+ 'no_link' =>
False, // disable lookup links for location type less than type_id
+ 'tenant' => True,
+ 'equipment' => True,
+ 'lookup_type' => 'form'
+ ));
+
+
$link_data = array
(
***************
*** 475,496 ****
);
-
$location_data=$this->bocommon->initiate_ui_location(array(
- 'location_type' => 'view',
- 'equipment' => true,
- 'tenant' => true,
- 'address' => true,
- 'equipment_id' =>
$ticket['equipment_id'],
- 'property_id' =>
$ticket['property_id'],
- 'property_name' =>
$ticket['property_name'],
- 'building_id' =>
$ticket['building_id'],
- 'entrance_id' =>
$ticket['entrance_id'],
- 'floor' =>
$ticket['floor'],
- 'street_name' =>
$ticket['street_name'],
- 'street_number' =>
$ticket['street_number'],
- 'tenant_id' =>
$ticket['tenant_id'],
- 'tenant_name' =>
$ticket['tenant_name'],
- 'contact_phone' =>
$ticket['contact_phone'],
- 'apartment_id' =>
$ticket['apartment_id']));
if($ticket['report_id'])
--- 489,501 ----
);
+
$location_data=$this->bolocation->initiate_ui_location(array(
+ 'values' =>
$ticket['location_data'],
+ 'type_id' =>
count(explode('-',$ticket['location_data']['location_code'])),
+ 'no_link' =>
False, // disable lookup links for location type less than type_id
+ 'tenant' =>
$ticket['location_data']['tenant_id'],
+ 'equipment' =>
$ticket['location_data']['equipment_id'],
+ 'lookup_type' => 'view'
+ ));
if($ticket['report_id'])
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uiproject.inc.php 21 Jun 2003 22:32:31 -0000 1.29
--- class.uiproject.inc.php 22 Jun 2003 11:10:44 -0000 1.30
***************
*** 779,786 ****
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$values['location_data'],
! 'type_id' => -1,
// calculated from location_types
'no_link' =>
False, // disable lookup links for location type less than type_id
! 'tenant' => True,
! 'equipment' => True,
'lookup_type' => 'view'
));
--- 779,786 ----
$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']['equipment_id'],
'lookup_type' => 'view'
));
Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.uiinvestment.inc.php 21 Jun 2003 22:32:31 -0000 1.21
--- class.uiinvestment.inc.php 22 Jun 2003 11:10:44 -0000 1.22
***************
*** 471,475 ****
}
-
$errorcount = 0;
--- 471,474 ----
Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.sotts.inc.php 21 Jun 2003 19:27:35 -0000 1.18
--- class.sotts.inc.php 22 Jun 2003 11:10:44 -0000 1.19
***************
*** 17,21 ****
$this->db2 = $this->db;
$this->mail =
CreateObject($this->currentapp.'.botts_mail');
- $this->grants =
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->historylog =
CreateObject($this->currentapp.'.historylog','tts');
--- 17,20 ----
***************
*** 167,171 ****
$ticket['location_code'] =
$this->db->f('location_code');
$ticket['equipment_id'] =
$this->db->f('equipment_id');
- $ticket['floor'] =
$this->db->f('floor');
// $ticket['contact_phone'] =
$this->db->f('contact_phone');
$ticket['street_name'] =
$this->db->f('street_name');
--- 166,169 ----
***************
*** 241,245 ****
$this->db->query("insert into fm_tts_tickets
(priority,owner,"
.
"assignedto,subject,cat_id,status,details,location_code,"
! . "floor,address,tenant_id) values ('"
. $ticket['priority'] . "','"
. $GLOBALS['phpgw_info']['user']['account_id']
. "','"
--- 239,243 ----
$this->db->query("insert into fm_tts_tickets
(priority,owner,"
.
"assignedto,subject,cat_id,status,details,location_code,"
! . "equipment_id,address,tenant_id) values ('"
. $ticket['priority'] . "','"
. $GLOBALS['phpgw_info']['user']['account_id']
. "','"
***************
*** 249,253 ****
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
! . $ticket['floor'] . "','"
. $address . "','"
. $ticket['tenant_id'] .
"')",__LINE__,__FILE__);
--- 247,251 ----
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
! . $ticket['extra']['equipment_id'] . "','"
. $address . "','"
. $ticket['tenant_id'] .
"')",__LINE__,__FILE__);
***************
*** 256,262 ****
$this->historylog->add('O',$id,mktime(),'');
! if($ticket['contact_phone'])
{
! $this->db->query("update fm_tenant set
contact_phone='". $ticket['contact_phone']. "' where tenant_id='".
$ticket['tenant_id']. "'",__LINE__,__FILE__);
}
--- 254,260 ----
$this->historylog->add('O',$id,mktime(),'');
! if($ticket['extra']['contact_phone'])
{
! $this->db->query("update fm_tenant set
contact_phone='". $ticket['extra']['contact_phone']. "' where tenant_id='".
$ticket['extra']['tenant_id']. "'",__LINE__,__FILE__);
}
Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.soproject.inc.php 21 Jun 2003 19:27:35 -0000 1.19
--- class.soproject.inc.php 22 Jun 2003 11:10:44 -0000 1.20
***************
*** 334,344 ****
}
- function equipment_type($equipment_id)
- {
- $this->db->query("SELECT fm_equipment_type.name FROM
fm_equipment $this->join fm_equipment_type on fm_equipment.equipment_type_id=
fm_equipment_type.id where equipment_id='$equipment_id'");
- $this->db->next_record();
- return $this->db->f('name');
- }
-
function generate_id($equipment_type)
{
--- 334,337 ----
Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.botts.inc.php 21 Jun 2003 22:32:31 -0000 1.13
--- class.botts.inc.php 22 Jun 2003 11:10:44 -0000 1.14
***************
*** 48,52 ****
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.sotts');
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->solocation =
CreateObject($this->currentapp.'.solocation');
--- 48,51 ----
***************
*** 297,300 ****
--- 296,305 ----
for ($i=0; $i<count($tickets); $i++)
{
+
+ if($tickets[$i]['location_code'])
+ {
+ $tickets[$i]['location_data'] =
$this->solocation->read_single($tickets[$i]['location_code']);
+ }
+
$tickets[$i]['owner'] =
$GLOBALS['phpgw']->accounts->id2name($tickets[$i]['owner']);
$tickets[$i]['assignedto'] =
$GLOBALS['phpgw']->accounts->id2name($tickets[$i]['assignedto']);
***************
*** 327,337 ****
$ticket['group_lid'] =
$GLOBALS['phpgw']->accounts->id2name($ticket['group_id']);
! if($ticket['tenant_id'])
{
!
$tenant_data=$this->socommon->read_single_tenant($ticket['tenant_id']);
! $ticket['tenant_name']=
$tenant_data['last_name'] . ', ' . $tenant_data['first_name'];
! $ticket['contact_phone']=
$tenant_data['contact_phone'];
}
$history_values =
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
$ticket['timestampopened'] =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
--- 332,364 ----
$ticket['group_lid'] =
$GLOBALS['phpgw']->accounts->id2name($ticket['group_id']);
! if($ticket['location_code'])
! {
! $ticket['location_data'] =
$this->solocation->read_single($ticket['location_code']);
! }
!
! if($ticket['equipment_id'])
! {
! $ticket['location_data']['equipment_id'] =
$ticket['equipment_id'];
! $ticket['location_data']['equipment_type'] =
$this->bocommon->get_equipment_type($ticket['equipment_id']);
! }
!
!
! if($ticket['tenant_id']>0)
! {
!
$tenant_data=$this->bocommon->read_single_tenant($ticket['tenant_id']);
! $ticket['location_data']['tenant_id']=
$ticket['tenant_id'];
! $ticket['location_data']['contact_phone']=
$tenant_data['contact_phone'];
! $ticket['location_data']['last_name'] =
$tenant_data['last_name'];
! $ticket['location_data']['first_name'] =
$tenant_data['first_name'];
! }
! else
{
! unset($ticket['location_data']['tenant_id']);
!
unset($ticket['location_data']['contact_phone']);
! unset($ticket['location_data']['last_name']);
! unset($ticket['location_data']['first_name']);
}
+
$history_values =
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
$ticket['timestampopened'] =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$dateformat);
***************
*** 367,375 ****
$ticket['category_name']=ucfirst($this->cats->id2name($ticket['cat_id']));
- if($ticket['location_code'])
- {
- $ticket['location_data'] =
$this->solocation->read_single($ticket['location_code']);
- }
-
return $ticket;
}
--- 394,397 ----
***************
*** 459,463 ****
{
!
$ticket['location_code']=$this->bocommon->location_code($ticket['property_id'],$ticket['building_id'],$ticket['entrance_id'],$ticket['apartment_id']);
$receipt = $this->so->add($ticket);
--- 481,494 ----
{
! while (is_array($ticket['location']) && list(,$value) =
each($ticket['location']))
! {
! if($value)
! {
! $location[] = $value;
! }
! }
!
! $ticket['location_code']=implode("-", $location);
!
$receipt = $this->so->add($ticket);
Index: class.boproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.boproject.inc.php 21 Jun 2003 22:32:31 -0000 1.9
--- class.boproject.inc.php 22 Jun 2003 11:10:44 -0000 1.10
***************
*** 342,346 ****
{
$project['location_data']['equipment_id'] =
$project['equipment_id'];
! $project['location_data']['equipment_type'] =
$this->equipment_type($project['equipment_id']);
}
--- 342,346 ----
{
$project['location_data']['equipment_id'] =
$project['equipment_id'];
! $project['location_data']['equipment_type'] =
$this->bocommon->get_equipment_type($project['equipment_id']);
}
***************
*** 476,484 ****
return $this->so->add_request($add_request,$id);
- }
-
- function equipment_type($equipment_id)
- {
- return $this->so->equipment_type($equipment_id);
}
--- 476,479 ----
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.bolocation.inc.php 22 Jun 2003 09:23:03 -0000 1.15
--- class.bolocation.inc.php 22 Jun 2003 11:10:44 -0000 1.16
***************
*** 48,52 ****
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.solocation');
! // $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
--- 48,52 ----
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.solocation');
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
***************
*** 519,528 ****
if($extra['equipment_id'])
{
! $location_data['equipment_type'] =
$this->so->equipment_type($extra['equipment_id']);
unset($location_data['tenant_id']);
unset($location_data['last_name']);
unset($location_data['first_name']);
unset($location_data['contact_phone']);
}
--- 519,535 ----
if($extra['equipment_id'])
{
! $location_data['equipment_type'] =
$this->bocommon->get_equipment_type($extra['equipment_id']);
unset($location_data['tenant_id']);
unset($location_data['last_name']);
unset($location_data['first_name']);
unset($location_data['contact_phone']);
+ }
+ if(!$extra['tenant_id'])
+ {
+ unset($location_data['tenant_id']);
+ unset($location_data['last_name']);
+ unset($location_data['first_name']);
+ unset($location_data['contact_phone']);
}
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -r1.57 -r1.58
*** class.bocommon.inc.php 22 Jun 2003 09:23:03 -0000 1.57
--- class.bocommon.inc.php 22 Jun 2003 11:10:44 -0000 1.58
***************
*** 780,783 ****
--- 780,787 ----
}
+ function get_equipment_type($equipment_id)
+ {
+ return
$this->socommon->get_equipment_type($equipment_id);
+ }
function generate_sql($data)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.uiworkorder.inc.php,1.24,1.25 class.uiwo_hour.inc.php,1.27,1.28 class.uitts.inc.php,1.28,1.29 class.uiproject.inc.php,1.29,1.30 class.uiinvestment.inc.php,1.21,1.22 class.sotts.inc.php,1.18,1.19 class.soproject.inc.php,1.19,1.20 class.botts.inc.php,1.13,1.14 class.boproject.inc.php,1.9,1.10 class.bolocation.inc.php,1.15,1.16 class.bocommon.inc.php,1.57,1.58,
Sigurd Nes <address@hidden> <=