[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uientity.inc.php, 1.10, 1.11 class
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] property/inc class.uientity.inc.php, 1.10, 1.11 class.soentity.inc.php, 1.11, 1.12 class.soadmin_entity.inc.php, 1.11, 1.12 class.bocommon.inc.php, 1.92, 1.93 class.uiadmin_entity.inc.php, 1.9, 1.10 class.boadmin_entity.inc.php, 1.8, 1.9 class.soproject.inc.php, 1.45, 1.46 class.boproject.inc.php, 1.20, 1.21 class.uiproject.inc.php, 1.54, 1.55 class.socommon.inc.php, 1.38, 1.39 class.uirequest.inc.php, 1.30, 1.31 class.sorequest.inc.php, 1.20, 1.21 class.borequest.inc.php, 1.10, 1.11 |
Date: |
Thu, 06 Nov 2003 18:51:05 +0000 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv7209/inc
Modified Files:
class.uientity.inc.php class.soentity.inc.php
class.soadmin_entity.inc.php class.bocommon.inc.php
class.uiadmin_entity.inc.php class.boadmin_entity.inc.php
class.soproject.inc.php class.boproject.inc.php
class.uiproject.inc.php class.socommon.inc.php
class.uirequest.inc.php class.sorequest.inc.php
class.borequest.inc.php
Log Message:
no message
Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** class.soproject.inc.php 3 Nov 2003 18:01:12 -0000 1.45
--- class.soproject.inc.php 6 Nov 2003 18:51:02 -0000 1.46
***************
*** 322,325 ****
--- 322,328 ----
$project['cat_id']
= $this->db->f('category');
$project['grants']
= (int)$this->grants[$this->db->f('user_id')];
+ $project['p_num']
= $this->db->f('p_num');
+ $project['p_entity_id'] =
$this->db->f('p_entity_id');
+ $project['p_cat_id'] =
$this->db->f('p_cat_id');
$project['power_meter'] =
$this->get_power_meter($this->db->f('location_code'));
Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** class.socommon.inc.php 28 Oct 2003 15:14:41 -0000 1.38
--- class.socommon.inc.php 6 Nov 2003 18:51:02 -0000 1.39
***************
*** 288,291 ****
--- 288,307 ----
}
+ function get_lookup_entity($location)
+ {
+ $this->db->query("SELECT entity_id,name FROM
fm_entity_lookup $this->join fm_entity on
fm_entity_lookup.entity_id=fm_entity.id where location='$location' ");
+
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $entity[$i]['id']
= $this->db->f('entity_id');
+ $entity[$i]['name']
= $this->db->f('name');
+ $i++;
+ }
+ return $entity;
+ }
+
+
+
}
?>
Index: class.boproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.boproject.inc.php 29 Oct 2003 17:28:43 -0000 1.20
--- class.boproject.inc.php 6 Nov 2003 18:51:02 -0000 1.21
***************
*** 349,353 ****
$project['location_data']
=$this->solocation->read_single($project['location_code']);
}
!
if($project['equipment_id'])
{
--- 349,353 ----
$project['location_data']
=$this->solocation->read_single($project['location_code']);
}
! /*
if($project['equipment_id'])
{
***************
*** 355,359 ****
$project['location_data']['equipment_type'] =
$this->bocommon->get_equipment_type($project['equipment_id']);
}
!
if($project['tenant_id']>0)
{
--- 355,359 ----
$project['location_data']['equipment_type'] =
$this->bocommon->get_equipment_type($project['equipment_id']);
}
! */
if($project['tenant_id']>0)
{
***************
*** 371,374 ****
--- 371,386 ----
unset($project['location_data']['first_name']);
}
+
+ if($project['p_num'])
+ {
+ $soadmin_entity =
CreateObject($this->currentapp.'.soadmin_entity');
+ $category =
$soadmin_entity->read_single_category($project['p_entity_id'],$project['p_cat_id']);
+
+
$project['p'][$project['p_entity_id']]['p_num']=$project['p_num'];
+
$project['p'][$project['p_entity_id']]['p_entity_id']=$project['p_entity_id'];
+
$project['p'][$project['p_entity_id']]['p_cat_id']=$project['p_cat_id'];
+
$project['p'][$project['p_entity_id']]['p_cat_name'] = $category['name'];
+ }
+
//_debug_array($project);
Index: class.sorequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sorequest.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.sorequest.inc.php 29 Aug 2003 16:17:55 -0000 1.20
--- class.sorequest.inc.php 6 Nov 2003 18:51:02 -0000 1.21
***************
*** 349,352 ****
--- 349,355 ----
$request['authorities_demands']
= $this->db->f('authorities_demands');
$request['score']
= $this->db->f('score');
+ $request['p_num']
= $this->db->f('p_num');
+ $request['p_entity_id']
= $this->db->f('p_entity_id');
+ $request['p_cat_id']
= $this->db->f('p_cat_id');
$request['power_meter'] =
$this->soproject->get_power_meter($this->db->f('location_code'));
Index: class.borequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.borequest.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.borequest.inc.php 26 Aug 2003 19:16:30 -0000 1.10
--- class.borequest.inc.php 6 Nov 2003 18:51:02 -0000 1.11
***************
*** 409,418 ****
}
- if($request['equipment_id'])
- {
- $request['location_data']['equipment_id'] =
$request['equipment_id'];
- $request['location_data']['equipment_type'] =
$this->bocommon->get_equipment_type($request['equipment_id']);
- }
-
if($request['tenant_id']>0)
{
--- 409,412 ----
***************
*** 431,434 ****
--- 425,438 ----
}
+ if($request['p_num'])
+ {
+ $soadmin_entity =
CreateObject($this->currentapp.'.soadmin_entity');
+ $category =
$soadmin_entity->read_single_category($request['p_entity_id'],$request['p_cat_id']);
+
+
$request['p'][$request['p_entity_id']]['p_num']=$request['p_num'];
+
$request['p'][$request['p_entity_id']]['p_entity_id']=$request['p_entity_id'];
+
$request['p'][$request['p_entity_id']]['p_cat_id']=$request['p_cat_id'];
+
$request['p'][$request['p_entity_id']]['p_cat_name'] = $category['name'];
+ }
return $request;
}
Index: class.soentity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** class.soentity.inc.php 5 Nov 2003 21:15:46 -0000 1.11
--- class.soentity.inc.php 6 Nov 2003 18:51:02 -0000 1.12
***************
*** 363,369 ****
$entity['id']
= $id;
$entity['num']
= $this->db->f('num');
! $entity['p_num'] =
$this->db->f('p_num');
! $entity['p_entity_id']=
$this->db->f('p_entity_id');
! $entity['p_cat_id'] =
$this->db->f('p_cat_id');
$entity['location_code'] =
$this->db->f('location_code');
$entity['vendor_id'] =
$this->db->f('vendor_id');
--- 363,369 ----
$entity['id']
= $id;
$entity['num']
= $this->db->f('num');
! $entity['p_num']
= $this->db->f('p_num');
! $entity['p_entity_id'] =
$this->db->f('p_entity_id');
! $entity['p_cat_id']
= $this->db->f('p_cat_id');
$entity['location_code'] =
$this->db->f('location_code');
$entity['vendor_id'] =
$this->db->f('vendor_id');
Index: class.uiadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.uiadmin_entity.inc.php 3 Nov 2003 18:01:13 -0000 1.9
--- class.uiadmin_entity.inc.php 6 Nov 2003 18:51:02 -0000 1.10
***************
*** 503,506 ****
--- 503,507 ----
$include_list =
$this->bo->get_entity_list($values['lookup_entity']);
+ $include_list_2 =
$this->bo->get_entity_list_2($values['include_entity_for']);
$link_data = array
***************
*** 538,541 ****
--- 539,545 ----
'include_list'
=> $include_list,
'lang_include_statustext' =>
lang('Which entity type is to show up in location forms'),
+ 'lang_include_this_entity' =>
lang('include this entity'),
+ 'include_list_2'
=> $include_list_2,
+ 'lang_include_2_statustext' =>
lang('Let this entity show up in location form'),
'lang_select'
=> lang('select'),
);
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** class.bocommon.inc.php 3 Nov 2003 18:01:12 -0000 1.92
--- class.bocommon.inc.php 6 Nov 2003 18:51:02 -0000 1.93
***************
*** 96,99 ****
--- 96,103 ----
}
+ function get_lookup_entity($location='')
+ {
+ return $this->socommon->get_lookup_entity($location);
+ }
function msgbox_data($receipt)
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** class.uiproject.inc.php 29 Oct 2003 17:28:43 -0000 1.54
--- class.uiproject.inc.php 6 Nov 2003 18:51:02 -0000 1.55
***************
*** 493,497 ****
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
! //_debug_array($insert_record);
$GLOBALS['phpgw']->xslttpl->add_file(array('project'));
--- 493,502 ----
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
! $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
!
! for ($j=0;$j<count($insert_record_entity);$j++)
! {
!
$insert_record['extra'][$insert_record_entity[$j]] =
$insert_record_entity[$j];
! }
$GLOBALS['phpgw']->xslttpl->add_file(array('project'));
***************
*** 514,522 ****
}
! while (is_array($insert_record['extra']) &&
list($key,) = each($insert_record['extra']))
{
if($_POST[$key])
{
! $values['extra'][$key] =
$_POST[$key];
}
}
--- 519,527 ----
}
! while (is_array($insert_record['extra']) &&
list($key,$column) = each($insert_record['extra']))
{
if($_POST[$key])
{
! $values['extra'][$column]
= $_POST[$key];
}
}
***************
*** 529,538 ****
else
{
! $location_code =
get_var('location_code',array('POST','GET'));
! $tenant_id
= get_var('tenant_id',array('POST','GET'));
! $equipment_id =
get_var('equipment_id',array('POST','GET'));
! $values['descr'] =
get_var('descr',array('POST','GET'));
! $ticket_id
= get_var('ticket_id',array('POST','GET'));
$request_id =
get_var('request_id',array('POST','GET'));
if($ticket_id)
--- 534,554 ----
else
{
! $location_code =
get_var('location_code',array('POST','GET'));
! $tenant_id =
get_var('tenant_id',array('POST','GET'));
! $values['descr'] =
get_var('descr',array('POST','GET'));
! $ticket_id =
get_var('ticket_id',array('POST','GET'));
$request_id =
get_var('request_id',array('POST','GET'));
+ $p_entity_id =
get_var('p_entity_id',array('POST','GET'));
+ $p_cat_id =
get_var('p_cat_id',array('POST','GET'));
+ $values['p'][$p_entity_id]['p_entity_id']
= $p_entity_id;
+ $values['p'][$p_entity_id]['p_cat_id']
= $p_cat_id;
+ $values['p'][$p_entity_id]['p_num']
= get_var('p_num',array('POST','GET'));
+
+ if($p_entity_id && $p_cat_id)
+ {
+ $boadmin_entity =
CreateObject($this->currentapp.'.boadmin_entity');
+ $entity_category =
$boadmin_entity->read_single_category($p_entity_id,$p_cat_id);
+
$values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name'];
+ }
if($ticket_id)
***************
*** 666,669 ****
--- 682,694 ----
$values['location_data'] =
$bolocation->read_single($location_code,$values['extra']);
}
+
+ if($values['extra']['p_num'])
+ {
+
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+ }
+
}
}
***************
*** 726,730 ****
$lookup_type='form';
!
$location_data=$bolocation->initiate_ui_location(array(
'values' =>
$values['location_data'],
--- 751,755 ----
$lookup_type='form';
! //_debug_array($values);
$location_data=$bolocation->initiate_ui_location(array(
'values' =>
$values['location_data'],
***************
*** 732,737 ****
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' => True,
! 'equipment' => True,
! 'lookup_type' => $lookup_type
));
--- 757,763 ----
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' => True,
! 'lookup_type' => $lookup_type,
! 'lookup_entity' =>
$this->bocommon->get_lookup_entity('project'),
! 'entity_data' => $values['p']
));
***************
*** 1028,1033 ****
'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'
));
--- 1054,1060 ----
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$values['location_data']['tenant_id'],
! 'lookup_type' => 'view',
! 'lookup_entity' =>
$this->bocommon->get_lookup_entity('project'),
! 'entity_data' => $values['p']
));
Index: class.boadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin_entity.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** class.boadmin_entity.inc.php 3 Nov 2003 18:01:12 -0000 1.8
--- class.boadmin_entity.inc.php 6 Nov 2003 18:51:02 -0000 1.9
***************
*** 158,163 ****
}
!
!
function read()
--- 158,177 ----
}
! function get_entity_list_2($selected='')
! {
! $list[0]['id']='project';
! $list[0]['name']='project';
! $list[1]['id']='ticket';
! $list[1]['name']='ticket';
! $list[2]['id']='document';
! $list[2]['name']='document';
! $list[3]['id']='drawing';
! $list[3]['name']='drawing';
! $list[4]['id']='meter';
! $list[4]['name']='meter';
! $list[5]['id']='request';
! $list[5]['name']='request';
! return
$this->bocommon->select_multi_list($selected,$list);
! }
function read()
Index: class.uirequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** class.uirequest.inc.php 28 Oct 2003 15:14:41 -0000 1.30
--- class.uirequest.inc.php 6 Nov 2003 18:51:02 -0000 1.31
***************
*** 428,433 ****
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
- //_debug_array($insert_record);
$GLOBALS['phpgw']->xslttpl->add_file(array('request'));
--- 428,438 ----
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
+ $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
+
+ for ($j=0;$j<count($insert_record_entity);$j++)
+ {
+
$insert_record['extra'][$insert_record_entity[$j]] =
$insert_record_entity[$j];
+ }
$GLOBALS['phpgw']->xslttpl->add_file(array('request'));
***************
*** 444,452 ****
}
! while (is_array($insert_record['extra']) &&
list($key,) = each($insert_record['extra']))
{
if($_POST[$key])
{
! $values['extra'][$key] =
$_POST[$key];
}
}
--- 449,457 ----
}
! while (is_array($insert_record['extra']) &&
list($key,$column) = each($insert_record['extra']))
{
if($_POST[$key])
{
! $values['extra'][$column]
= $_POST[$key];
}
}
***************
*** 460,466 ****
$location_code =
get_var('location_code',array('POST','GET'));
$tenant_id
= get_var('tenant_id',array('POST','GET'));
- $equipment_id =
get_var('equipment_id',array('POST','GET'));
$ticket_id
= get_var('ticket_id',array('POST','GET'));
if($ticket_id)
{
--- 465,483 ----
$location_code =
get_var('location_code',array('POST','GET'));
$tenant_id
= get_var('tenant_id',array('POST','GET'));
$ticket_id
= get_var('ticket_id',array('POST','GET'));
+ $p_entity_id =
get_var('p_entity_id',array('POST','GET'));
+ $p_cat_id =
get_var('p_cat_id',array('POST','GET'));
+ $values['p'][$p_entity_id]['p_entity_id']
= $p_entity_id;
+ $values['p'][$p_entity_id]['p_cat_id']
= $p_cat_id;
+ $values['p'][$p_entity_id]['p_num']
= get_var('p_num',array('POST','GET'));
+
+ if($p_entity_id && $p_cat_id)
+ {
+ $boadmin_entity =
CreateObject($this->currentapp.'.boadmin_entity');
+ $entity_category =
$boadmin_entity->read_single_category($p_entity_id,$p_cat_id);
+
$values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name'];
+ }
+
if($ticket_id)
{
***************
*** 573,576 ****
--- 590,601 ----
$values['location_data'] =
$this->bolocation->read_single($location_code,$values['extra']);
}
+
+ if($values['extra']['p_num'])
+ {
+
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
+
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
+ }
}
}
***************
*** 610,615 ****
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' => True,
! 'equipment' => True,
! 'lookup_type' => $lookup_type
));
--- 635,641 ----
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' => True,
! 'lookup_type' => $lookup_type,
! 'lookup_entity' =>
$this->bocommon->get_lookup_entity('request'),
! 'entity_data' => $values['p']
));
***************
*** 736,740 ****
'lang_generate_project_statustext' =>
lang('Generate a project from this request'),
'location_code'
=> $values['location_code'],
! 'equipment_id'
=> $values['equipment_id'],
'tenant_id'
=> $values['tenant_id'],
--- 762,768 ----
'lang_generate_project_statustext' =>
lang('Generate a project from this request'),
'location_code'
=> $values['location_code'],
! 'p_num'
=> $values['p_num'],
! 'p_entity_id'
=> $values['p_entity_id'],
! 'p_cat_id'
=> $values['p_cat_id'],
'tenant_id'
=> $values['tenant_id'],
***************
*** 907,911 ****
}
-
$location_data=$this->bolocation->initiate_ui_location(array(
'values' =>
$values['location_data'],
--- 935,938 ----
***************
*** 913,918 ****
'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'
));
--- 940,946 ----
'no_link' =>
False, // disable lookup links for location type less than type_id
'tenant' =>
$values['location_data']['tenant_id'],
! 'lookup_type' => 'view',
! 'lookup_entity' =>
$this->bocommon->get_lookup_entity('project'),
! 'entity_data' => $values['p']
));
Index: class.uientity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.uientity.inc.php 5 Nov 2003 21:15:47 -0000 1.10
--- class.uientity.inc.php 6 Nov 2003 18:51:01 -0000 1.11
***************
*** 433,443 ****
$values =
get_var('values',array('POST','GET'));
$values_attribute =
get_var('values_attribute',array('POST','GET'));
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
$insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
- //_debug_array($insert_record);
- //_debug_array($insert_record_entity);
-
for ($j=0;$j<count($insert_record_entity);$j++)
{
--- 433,441 ----
$values =
get_var('values',array('POST','GET'));
$values_attribute =
get_var('values_attribute',array('POST','GET'));
+ $bypass =
get_var('bypass',array('POST','GET'));
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
$insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
for ($j=0;$j<count($insert_record_entity);$j++)
{
***************
*** 451,455 ****
$values['date'] =
get_var('date',array('POST'));
! if ($values['save'])
{
--- 449,454 ----
$values['date'] =
get_var('date',array('POST'));
! // if ($values['save'])
! if($_POST && !$bypass)
{
***************
*** 462,471 ****
}
- //_debug_array($_POST);
- //_debug_array($insert_record['extra']);
while (is_array($insert_record['extra']) &&
list($key,$column) = each($insert_record['extra']))
{
- //_debug_array($key);
-
if($_POST[$key])
{
--- 461,466 ----
***************
*** 478,481 ****
--- 473,519 ----
$values['location_name'] = $_POST['loc'
. (count($values['location'])).'_name']; // if not address - get the parent
name as address
+ }
+ else
+ {
+ $location_code =
get_var('location_code',array('POST','GET'));
+ $tenant_id =
get_var('tenant_id',array('POST','GET'));
+ $values['descr'] =
get_var('descr',array('POST','GET'));
+ $ticket_id =
get_var('ticket_id',array('POST','GET'));
+ $request_id =
get_var('request_id',array('POST','GET'));
+ $p_entity_id =
get_var('p_entity_id',array('POST','GET'));
+ $p_cat_id =
get_var('p_cat_id',array('POST','GET'));
+ $values['p'][$p_entity_id]['p_entity_id']
= $p_entity_id;
+ $values['p'][$p_entity_id]['p_cat_id']
= $p_cat_id;
+ $values['p'][$p_entity_id]['p_num']
= get_var('p_num',array('POST','GET'));
+
+ if($p_entity_id && $p_cat_id)
+ {
+ $entity_category =
$this->boadmin_entity->read_single_category($p_entity_id,$p_cat_id);
+
$values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name'];
+ }
+
+ if($ticket_id)
+ {
+ $values['ticket_id'][0]['id']=
$ticket_id;
+ $values['origin']= 'ticket';
+ $values['origin_id']= $ticket_id;
+ }
+
+ if($request_id)
+ {
+ $values['request_id'][0]['id']=
$request_id;
+ $values['origin']= 'request';
+ $values['origin_id']= $request_id;
+ }
+
+ if($location_code)
+ {
+ $values['location_data'] =
$bolocation->read_single($location_code,array('tenant_id'=>$tenant_id,'equipment_id'=>$equipment_id));
+ }
+
+ }
+
+ if ($values['save'])
+ {
if(!$values['location'])
{
***************
*** 519,523 ****
{
$location_code=implode("-",
$values['location']);
! $values['location_data'] =
$bolocation->read_single($location_code);
}
}
--- 557,568 ----
{
$location_code=implode("-",
$values['location']);
! $values['location_data'] =
$bolocation->read_single($location_code,$values['extra']);
! }
! if($values['extra']['p_num'])
! {
!
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
!
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
!
$values['p'][$values['extra']['p_entity_id']]['p_cat_id']=$values['extra']['p_cat_id'];
!
$values['p'][$values['extra']['p_entity_id']]['p_cat_name']=$_POST['entity_cat_name_'.$values['extra']['p_entity_id']];
}
}
***************
*** 573,577 ****
}
! if($category['lookup_vendor'])
{
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
--- 618,622 ----
}
! /* if($category['lookup_vendor'])
{
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
***************
*** 579,583 ****
'vendor_name' =>
$values['vendor_name']));
}
!
$attributes_header[] = array(
--- 624,628 ----
'vendor_name' =>
$values['vendor_name']));
}
! */
$attributes_header[] = array(
***************
*** 741,744 ****
--- 786,803 ----
}
+ $entity =
$this->boadmin_entity->read_single($this->entity_id,false);
+ $category =
$this->boadmin_entity->read_single_category($this->entity_id,$this->cat_id);
+
+ if (isset($entity['lookup_entity']) &&
is_array($entity['lookup_entity']))
+ { for
($i=0;$i<count($entity['lookup_entity']);$i++)
+ {
+
if($values['p'][$entity['lookup_entity'][$i]])
+ {
+ $lookup_entity[$i]['id'] =
$entity['lookup_entity'][$i];
+ $entity_lookup =
$this->boadmin_entity->read_single($entity['lookup_entity'][$i],false);
+ $lookup_entity[$i]['name'] =
$entity_lookup['name'];
+ }
+ }
+ }
$location_data=$bolocation->initiate_ui_location(array(
***************
*** 746,759 ****
'type_id' =>
count(explode('-',$values['location_data']['location_code'])),
'no_link' =>
False, // disable lookup links for location type less than type_id
! 'lookup_type' => $lookup_type
));
- $entity =
$this->boadmin_entity->read_single($this->entity_id,false);
- $category =
$this->boadmin_entity->read_single_category($this->entity_id,$this->cat_id);
-
$appname = $entity['name'];
$function_msg = lang('view') . ' ' .
$category['name'];
! if($category['lookup_vendor'])
{
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
--- 805,817 ----
'type_id' =>
count(explode('-',$values['location_data']['location_code'])),
'no_link' =>
False, // disable lookup links for location type less than type_id
! 'lookup_type' => $lookup_type,
! 'lookup_entity' =>
$lookup_entity,
! 'entity_data' => $values['p']
));
$appname = $entity['name'];
$function_msg = lang('view') . ' ' .
$category['name'];
! /* if($category['lookup_vendor'])
{
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
***************
*** 761,765 ****
'vendor_name' =>
$values['vendor_name']));
}
!
$attributes_values=$values['attributes'];
--- 819,823 ----
'vendor_name' =>
$values['vendor_name']));
}
! */
$attributes_values=$values['attributes'];
Index: class.soadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_entity.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** class.soadmin_entity.inc.php 5 Nov 2003 21:15:47 -0000 1.11
--- class.soadmin_entity.inc.php 6 Nov 2003 18:51:02 -0000 1.12
***************
*** 239,244 ****
$entity['lookup_entity'] =
unserialize($this->db->f('lookup_entity'));
- return $entity;
}
}
--- 239,254 ----
$entity['lookup_entity'] =
unserialize($this->db->f('lookup_entity'));
}
+
+ $sql = "SELECT location FROM fm_entity_lookup where
entity_id='$id'";
+
+ $this->db->query($sql,__LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+ $entity['include_entity_for'][] =
$this->db->f('location');
+ }
+
+ return $entity;
}
***************
*** 521,524 ****
--- 531,536 ----
$value_set =
$this->bocommon->validate_db_update($value_set);
+ $this->db->transaction_begin();
+
$this->db->query("UPDATE $table set $value_set
WHERE id=" . $entity['id'],__LINE__,__FILE__);
***************
*** 530,533 ****
--- 542,559 ----
$this->db->query("UPDATE fm_acl_location set
$value_set_acl WHERE id='.entity." . $entity['id']. "'",__LINE__,__FILE__);
+
+
+ if (isset($entity['include_entity_for']) AND
is_array($entity['include_entity_for']))
+ {
+ $this->db->query("DELETE FROM
fm_entity_lookup WHERE entity_id=" . $entity['id'],__LINE__,__FILE__);
+
+ foreach($entity['include_entity_for']
as $location)
+ {
+ $this->db->query("INSERT INTO
fm_entity_lookup (entity_id,location)"
+ . "VALUES (" .$entity['id'] .
",'$location' )",__LINE__,__FILE__);
+ }
+ }
+
+ $this->db->transaction_commit();
$receipt['message'][] = array('msg'=>
lang('entity has been edited'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uientity.inc.php, 1.10, 1.11 class.soentity.inc.php, 1.11, 1.12 class.soadmin_entity.inc.php, 1.11, 1.12 class.bocommon.inc.php, 1.92, 1.93 class.uiadmin_entity.inc.php, 1.9, 1.10 class.boadmin_entity.inc.php, 1.8, 1.9 class.soproject.inc.php, 1.45, 1.46 class.boproject.inc.php, 1.20, 1.21 class.uiproject.inc.php, 1.54, 1.55 class.socommon.inc.php, 1.38, 1.39 class.uirequest.inc.php, 1.30, 1.31 class.sorequest.inc.php, 1.20, 1.21 class.borequest.inc.php, 1.10, 1.11,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] property/setup tables_current.inc.php, 1.142, 1.143 setup.inc.php, 1.61, 1.62
- Next by Date:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.51, 1.52
- Previous by thread:
[Phpgroupware-cvs] property/setup tables_current.inc.php, 1.142, 1.143 setup.inc.php, 1.61, 1.62
- Next by thread:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.51, 1.52
- Index(es):