[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.14,1.15 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.14,1.15 class.boequipment.inc.php,1.2,1.3 class.boinvoice.inc.php,1.9,1.10 class.soequipment.inc.php,1.2,1.3 class.soinvoice.inc.php,1.11,1.12 class.sostandard_2.inc.php,1.4,1.5class.sostandard_entity.inc.php,1.6,1.7 class.uiequipment.inc.php,1.2,1.3class.uiinvestment.inc.php,1.7,1.8 class.uiinvoice.inc.php,1.11,1.12class.uistandard_entity.inc.php,1.5,1.6 class.uitts.inc.php,1.9,1.10 hook_admin.inc.php,1.15,1.16 |
Date: |
Sat, 15 Feb 2003 14:51:43 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv5594/inc
Modified Files:
class.bocommon.inc.php class.boequipment.inc.php
class.boinvoice.inc.php class.soequipment.inc.php
class.soinvoice.inc.php class.sostandard_2.inc.php
class.sostandard_entity.inc.php class.uiequipment.inc.php
class.uiinvestment.inc.php class.uiinvoice.inc.php
class.uistandard_entity.inc.php class.uitts.inc.php
hook_admin.inc.php
Log Message:
no message
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.bocommon.inc.php 12 Feb 2003 19:33:36 -0000 1.14
--- class.bocommon.inc.php 15 Feb 2003 19:51:39 -0000 1.15
***************
*** 203,206 ****
--- 203,215 ----
//_debug_array($data);
+
+ if($data['form'])
+ {
+
$GLOBALS['phpgw']->xslttpl->add_file(array('location_form'));
+ }
+ else
+ {
+
$GLOBALS['phpgw']->xslttpl->add_file(array('location_view'));
+ }
if($data['equipment'])
{
***************
*** 263,266 ****
--- 272,293 ----
}
+
+ function initiate_ui_vendorlookup($data)
+ {
+ //_debug_array($data);
+
+
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_form'));
+ $vendor['value_vendor_id']
= $data['vendor_id'];
+ $vendor['value_vendor_name'] =
$data['vendor_name'];
+ $vendor['vendor_link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook');
+ $vendor['lang_vendor']
= lang('Vendor');
+ $vendor['lang_select_vendor_help'] =
lang('Klick this link to select vendor');
+ $vendor['lang_vendor_name']
= lang('Vendor Name');
+
+ //_debug_array($vendor);
+ return $vendor;
+
+ }
+
function list_methods($_type='xmlrpc')
{
***************
*** 545,548 ****
--- 572,610 ----
return $menu;
}
+
+
+ function add_leading_zero($num)
+ {
+ echo 'num ' .$num .'<br>' ;
+ $id_type = "hex";
+
+ // global $id_type;
+
+ if ($id_type == "hex")
+ {
+ $num = hexdec($num);
+ $num++;
+ $num = dechex($num);
+ }
+ else
+ {
+ $num++;
+ }
+
+ if (strlen($num) == 4)
+ $return = $num;
+ if (strlen($num) == 3)
+ $return = "0$num";
+ if (strlen($num) == 2)
+ $return = "00$num";
+ if (strlen($num) == 1)
+ $return = "000$num";
+ if (strlen($num) == 0)
+ $return = "0001";
+
+ return strtoupper($return);
+ }
+
+
function
location_code($property_id='',$building_id='',$entrance_id='',$apartment='')
Index: class.boequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boequipment.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.boequipment.inc.php 12 Feb 2003 19:33:37 -0000 1.2
--- class.boequipment.inc.php 15 Feb 2003 19:51:39 -0000 1.3
***************
*** 94,97 ****
--- 94,138 ----
}
+ function select_status_list($format='',$selected='')
+ {
+ switch($format)
+ {
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('status_select'));
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('status_filter'));
+ break;
+ }
+
+ $status_entries= $this->so->select_status_list();
+
+ while (is_array($status_entries) && list(,$status) =
each($status_entries))
+ {
+ $sel_status = '';
+ if ($status['id']==$selected)
+ {
+ $sel_status = 'selected';
+ }
+
+ $status_list[] = array
+ (
+ 'id' => $status['id'],
+ 'name' => $status['name'],
+ 'selected' => $sel_status
+ );
+ }
+
+ for ($i=0;$i<count($status_list);$i++)
+ {
+ if ($status_list[$i]['selected'] != 'selected')
+ {
+ unset($status_list[$i]['selected']);
+ }
+ }
+
+ return $status_list;
+ }
+
function filter($selected='')
{
***************
*** 140,146 ****
}
! function read_single($property_id,$equipment_id)
{
! return
$this->so->read_single($property_id,$equipment_id);
}
--- 181,190 ----
}
! function read_single($equipment_id)
{
! $equipment = $this->so->read_single($equipment_id);
! $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
! $equipment['date'] =
$GLOBALS['phpgw']->common->show_date($equipment['date'],$dateformat);
! return $equipment;
}
***************
*** 150,169 ****
}
! function save($equipment,$action='',$err='')
{
! if ($equipment['access'])
! {
! $equipment['access'] = 'private';
! }
! else
! {
! $equipment['access'] = 'public';
! }
! if ($action=='edit' && !$err)
{
if ($equipment['equipment_id'] != 0 )
{
! if
($this->socommon->check_equipment($equipment['property_id'],$equipment['equipment_id']))
{
$receipt =
$this->so->edit($equipment);
--- 194,208 ----
}
! function save($equipment,$action='')
{
! $date =
$this->bocommon->date_array($equipment['date']);
!
! $equipment['date'] = mktime
(2,0,0,$date['month'],$date['day'],$date['year']);
! if ($action=='edit')
{
if ($equipment['equipment_id'] != 0 )
{
! if
($this->socommon->check_equipment($equipment['equipment_id']))
{
$receipt =
$this->so->edit($equipment);
***************
*** 178,193 ****
{
!
if(!$this->socommon->check_property($equipment['property_id']))
{
!
$receipt['error'][]=array('msg'=>lang('This property ID does not exist!'));
! }
!
if($this->socommon->check_equipment($equipment['property_id'],$equipment['equipment_id']))
! {
!
$receipt['error'][]=array('msg'=>lang('This equipment is already registered!'));
}
if(!$receipt['error'])
{
!
$equipment['location_code']=$this->bocommon->location_code($equipment['property_id'],$equipment['equipment_id']);
$receipt = $this->so->add($equipment);
}
--- 217,228 ----
{
!
if($this->so->check_equipment($equipment['equipment_id']))
{
!
$receipt['error'][]=array('msg'=>lang('This Equipment ID already exists!'));
}
if(!$receipt['error'])
{
!
$equipment['location_code']=$this->bocommon->location_code($equipment['property_id'],$equipment['building_id'],$equipment['entrance_id'],$equipment['apartment_id']);
$receipt = $this->so->add($equipment);
}
***************
*** 196,202 ****
}
! function delete($property_id,$equipment_id)
{
! $this->so->delete($property_id,$equipment_id);
}
}
--- 231,238 ----
}
!
! function delete($equipment_id)
{
! $this->so->delete($equipment_id);
}
}
Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.boinvoice.inc.php 27 Jan 2003 10:40:30 -0000 1.9
--- class.boinvoice.inc.php 15 Feb 2003 19:51:39 -0000 1.10
***************
*** 483,490 ****
}
! function check_vendor($abid)
{
! return $this->so->check_vendor($abid);
}
--- 483,490 ----
}
! function check_vendor($vendor_id)
{
! return $this->so->check_vendor($vendor_id);
}
Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.soequipment.inc.php 12 Feb 2003 19:33:37 -0000 1.2
--- class.soequipment.inc.php 15 Feb 2003 19:51:39 -0000 1.3
***************
*** 14,21 ****
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
! $this->db = $GLOBALS['phpgw']->db;
! $this->db2 = $this->db;
! $this->grants =
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 14,22 ----
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
! $this->db = $GLOBALS['phpgw']->db;
! $this->db2 = $this->db;
! $this->grants =
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
***************
*** 29,32 ****
--- 30,49 ----
}
+
+ function select_status_list()
+ {
+
+ $this->db->query("SELECT id, descr FROM
fm_equipment_status ORDER BY id ");
+
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $status_entries[$i]['id']
= $this->db->f('id');
+ $status_entries[$i]['name']
= stripslashes($this->db->f('descr'));
+ $i++;
+ }
+ return $status_entries;
+ }
+
function get_filter_list($cat_id='')
{
***************
*** 112,118 ****
}
! $sql = "SELECT equipment_id,fm_equipment.descr,
boei_objekt.navn,fm_equipment.objekt_id,bygg_id,seksjons_id,etasje,leie_id,street,
fm_equipment_type.name as category"
. " FROM fm_equipment $this->join"
! . " boei_objekt ON fm_equipment.objekt_id =
boei_objekt.objekt_id $this->join"
. " boei_bydel ON boei_objekt.bydel_id =
boei_bydel.bydel_id $this->join"
. " fm_equipment_type ON fm_equipment.equipment_type_id
= fm_equipment_type.id "
--- 129,135 ----
}
! $sql = "SELECT equipment_id,fm_equipment.descr,
boei_objekt.navn,fm_equipment.property_id,building_id,entrance_id,floor,apartment_id,street_name,street_number,
fm_equipment_type.name as category"
. " FROM fm_equipment $this->join"
! . " boei_objekt ON fm_equipment.property_id =
boei_objekt.objekt_id $this->join"
. " boei_bydel ON boei_objekt.bydel_id =
boei_bydel.bydel_id $this->join"
. " fm_equipment_type ON fm_equipment.equipment_type_id
= fm_equipment_type.id "
***************
*** 127,137 ****
(
'equipment_id' =>
$this->db->f('equipment_id'),
! 'property_id' =>
$this->db->f('objekt_id'),
'property_name' => $this->db->f('navn'),
! 'building_id' =>
$this->db->f('bygg_id'),
! 'entrance_id' =>
$this->db->f('seksjons_id'),
! 'floor' =>
$this->db->f('etasje'),
! 'apartment_id' =>
$this->db->f('leie_id'),
! 'street' =>
$this->db->f('street'),
'category' =>
$this->db->f('category'),
'descr' =>
$this->db->f('descr'),
--- 144,156 ----
(
'equipment_id' =>
$this->db->f('equipment_id'),
! 'property_id' =>
$this->db->f('property_id'),
'property_name' => $this->db->f('navn'),
! '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' =>
$this->db->f('street_name') .' ' . $this->db->f('street_number'),
! 'street_name' =>
$this->db->f('street_name'),
! 'street_number' =>
$this->db->f('street_number'),
'category' =>
$this->db->f('category'),
'descr' =>
$this->db->f('descr'),
***************
*** 166,169 ****
--- 185,190 ----
'apartment_id' =>
$equipment['apartment_id'],
'street'
=> $equipment['street'],
+ 'street_name' =>
$equipment['street_name'],
+ 'street_number' =>
$equipment['street_number'],
'category'
=> $equipment['category'],
'descr'
=> $equipment['descr'],
***************
*** 182,188 ****
}
! function read_single($property_id,$equipment_id)
{
! $sql = "SELECT * FROM boei_bygg where
objekt_id='$property_id' and bygg_id='$equipment_id'";
$this->db->query($sql,__LINE__,__FILE__);
--- 203,211 ----
}
! function read_single($equipment_id)
{
! $sql = "SELECT
property_id,property_name,building_id,entrance_id,floor,apartment_id,street_name,street_number,"
! . " equipment_type_id, descr,lifetime,
org_name,vendor_id , e.status as status, e.date as date,cost from "
! . " fm_equipment as e $this->join phpgw_addressbook as
a on e.vendor_id=a.id where equipment_id='$equipment_id'";
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 190,219 ****
if ($this->db->next_record())
{
! $equipment['property_id'] =
(int)$this->db->f('objekt_id');
! $equipment['equipment_id'] =
(int)$this->db->f('bygg_id');
$equipment['owner']
= $this->db->f('owner');
! $equipment['name']
= stripslashes($this->db->f('byggnavn'));
! $equipment['generaladdress'] =
stripslashes($this->db->f('generelladresse'));
! $equipment['access']
= $this->db->f('access');
! $equipment['date']
= $this->db->f('entry_date');
! $equipment['cat_id']
= (int)$this->db->f('fm_equipment.equipment_type_id');
! $equipment['omraade_id']
= $this->db->f('omraade_id');
! $equipment['part_of_town'] =
$this->db->f('bydel');
! $equipment['equipment_type_id'] =
$this->db->f('equipment_type_id');
! $equipment['location_code'] =
$this->db->f('location_code');
return $equipment;
}
}
! function add($equipment)
{
! $this->db->query("INSERT INTO boei_bygg (location_code,
objekt_id,bygg_id,owner,access,entry_date,byggnavn,generelladresse,equipment_type_id)
"
! . "VALUES ('" . $equipment['location_code'].
"','" . $equipment['property_id'] . "','" . $equipment['equipment_id'] . "','"
. $this->account . "','" . $equipment['access'] . "','" . time() . "','" .
$equipment['name']
! . "','" . $equipment['generaladdress'] ."','" .
$equipment['cat_id']. "')",__LINE__,__FILE__);
! $ids['equipment_id'] = $equipment['equipment_id'];
! $ids['property_id'] = $equipment['property_id'];
$receipt['message'][] = array('msg'=>lang('equipment
has been saved'));
--- 213,298 ----
if ($this->db->next_record())
{
! $equipment['equipment_id'] =
$equipment_id;
! $equipment['property_id'] =
$this->db->f('property_id');
! $equipment['property_name'] =
$this->db->f('property_name');
! $equipment['building_id'] =
$this->db->f('building_id');
! $equipment['entrance_id'] =
$this->db->f('entrance_id');
! $equipment['apartment_id'] =
$this->db->f('apartment_id');
! $equipment['floor']
= $this->db->f('floor');
! $equipment['descr']
= $this->db->f('descr');
! $equipment['cost']
= $this->db->f('cost');
! $equipment['vendor_id'] =
$this->db->f('vendor_id');
! $equipment['vendor_name'] =
$this->db->f('org_name');
! $equipment['lifetime'] =
$this->db->f('lifetime');
! $equipment['street_name'] =
$this->db->f('street_name');
! $equipment['street_number'] =
$this->db->f('street_number');
$equipment['owner']
= $this->db->f('owner');
! $equipment['access'] =
$this->db->f('access');
! $equipment['date']
= $this->db->f('date');
! $equipment['cat_id'] =
$this->db->f('equipment_type_id');
+ _debug_array($equipment);
return $equipment;
}
}
! function check_equipment($equipment_id='')
! {
! $this->db->query("SELECT count(*) FROM fm_equipment
where equipment_id='$equipment_id'");
!
! $this->db->next_record();
!
! if ( $this->db->f(0))
! {
! return True;
! }
! }
!
!
! function generate_id($equipment_type)
{
+ $year =
$GLOBALS['phpgw']->common->show_date(time(),'Y');
! $this->db->query("select prefix from fm_equipment_type
where id='$equipment_type' ");
! $this->db->next_record();
! $prefix = $this->db->f('prefix');
!
! $prefix = $prefix . $year . '-';
! // $prefix = 'E-' . $year . '-';
! $pos = strlen($prefix);
! $this->db->query("select max(equipment_id) from
fm_equipment where equipment_id like ('$prefix%')");
! $this->db->next_record();
! //echo 'f ' .$this->db->f(0) .'<br>' ;
!
! $max =
$this->bocommon->add_leading_zero(substr($this->db->f(0),$pos));
!
! return $prefix . $max;
! }
!
! function add($equipment)
! {
! $equipment['descr'] =
$this->db->db_addslashes($equipment['descr']);
! _debug_array($equipment);
! $this->db->query("INSERT INTO fm_equipment
(equipment_id,lifetime,status,equipment_type_id,cost,date,descr,location_code,
property_id,property_name,building_id,entrance_id,floor,apartment_id,street_name,street_number,vendor_id,owner)
"
! . "VALUES ('"
! . $equipment['equipment_id']. "','"
! . $equipment['lifetime']. "','"
! . $equipment['status']. "','"
! . $equipment['cat_id']. "','"
! . $equipment['cost']. "','"
! . $equipment['date']. "','"
! . $equipment['descr']. "','"
! . $equipment['location_code']. "','"
! . $equipment['property_id']. "','"
! . $equipment['property_name']. "','"
! . $equipment['building_id']. "','"
! . $equipment['entrance_id']. "','"
! . $equipment['floor']. "','"
! . $equipment['apartment_id'] . "','"
! . $equipment['street_name'] . "','"
! . $equipment['street_number'] . "','"
! . $equipment['vendor_id'] . "','"
! . $this->account. "')",__LINE__,__FILE__);
$receipt['message'][] = array('msg'=>lang('equipment
has been saved'));
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.soinvoice.inc.php 11 Feb 2003 10:01:57 -0000 1.11
--- class.soinvoice.inc.php 15 Feb 2003 19:51:39 -0000 1.12
***************
*** 702,709 ****
}
! function check_vendor($abid)
{
! $this->db->query("select count(*) from
phpgw_addressbook where id='$abid'");
$this->db->next_record();
return $this->db->f(0);
--- 702,709 ----
}
! function check_vendor($vendor_id)
{
! $this->db->query("select count(*) from
phpgw_addressbook where id='$vendor_id'");
$this->db->next_record();
return $this->db->f(0);
Index: class.sostandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.sostandard_2.inc.php 11 Feb 2003 10:01:57 -0000 1.4
--- class.sostandard_2.inc.php 15 Feb 2003 19:51:39 -0000 1.5
***************
*** 107,110 ****
--- 107,113 ----
$table='fm_request_status';
break;
+ case 'equipment_status':
+ $table='fm_equipment_status';
+ break;
case 'accounting':
$table='fm_wo_accounts';
Index: class.sostandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_entity.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.sostandard_entity.inc.php 12 Feb 2003 19:33:37 -0000 1.6
--- class.sostandard_entity.inc.php 15 Feb 2003 19:51:39 -0000 1.7
***************
*** 82,85 ****
--- 82,86 ----
'id' => $this->db->f('id'),
'name' => $this->db->f('name'),
+ 'prefix'=> $this->db->f('prefix'),
'descr' => $this->db->f('descr')
);
***************
*** 136,139 ****
--- 137,141 ----
$standard['name'] =
$this->db->f('name');
$standard['descr'] =
$this->db->f('descr');
+ $standard['prefix'] =
$this->db->f('prefix');
return $standard;
***************
*** 158,163 ****
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
! $this->db->query("INSERT INTO $table (id, name,
descr) "
! . "VALUES ('" . $standard['id'] . "','"
. $standard['name'] . "','" . $standard['descr']. "')",__LINE__,__FILE__);
$receipt = array(
--- 160,165 ----
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
! $this->db->query("INSERT INTO $table (id, name,
descr, prefix) "
! . "VALUES ('" . $standard['id'] . "','"
. $standard['name'] . "','" . $standard['descr'] . "','" . $standard['prefix'].
"')",__LINE__,__FILE__);
$receipt = array(
***************
*** 194,199 ****
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
! $this->db->query("UPDATE $table set descr='" .
$standard['descr'] . "', name='". $standard['name']
! . "' WHERE id='" .
$standard['id']. "'",__LINE__,__FILE__);
--- 196,201 ----
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
! $this->db->query("UPDATE $table set descr='" .
$standard['descr'] . "', name='". $standard['name'] . "', prefix='".
$standard['prefix']
! . "' WHERE id='" . $standard['id'].
"'",__LINE__,__FILE__);
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.uiequipment.inc.php 12 Feb 2003 19:33:37 -0000 1.2
--- class.uiequipment.inc.php 15 Feb 2003 19:51:39 -0000 1.3
***************
*** 37,40 ****
--- 37,41 ----
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->bo =
CreateObject($this->currentapp.'.boequipment',True);
+ $this->so =
CreateObject($this->currentapp.'.soequipment',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
***************
*** 100,104 ****
'link_attribute'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.attribute&equipment_id='
. $equipment['equipment_id']),
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.view&equipment_id='
. $equipment['equipment_id']),
! 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.edit&equipment_id='
. $equipment['equipment_id']),
'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&equipment_id='
. $equipment['equipment_id']),
'lang_attribute_statustext' =>
lang('view the attributes for this selection'),
--- 101,105 ----
'link_attribute'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.attribute&equipment_id='
. $equipment['equipment_id']),
'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.view&equipment_id='
. $equipment['equipment_id']),
! 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.edit&id='
. $equipment['equipment_id']),
'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.delete&equipment_id='
. $equipment['equipment_id']),
'lang_attribute_statustext' =>
lang('view the attributes for this selection'),
***************
*** 228,285 ****
function edit()
{
! $property_id = get_var('property_id',array('GET'));
! $equipment_id =
get_var('equipment_id',array('POST','GET'));
$err = get_var('err',array('POST','GET'));
$values = get_var('values',array('POST','GET'));
-
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
if ($values['save'])
{
! if($equipment_id)
{
! if(!$err)
! {
!
$values['property_id']=$property_id;
! }
! $values['equipment_id']=$equipment_id;
$action='edit';
}
else
{
! $property_id = $values['property_id'];
! $equipment_id = $values['equipment_id'];
}
//_debug_array($values);
$receipt =
$this->bo->save($values,$action,$err);
! }
! else
! {
! $values['property_id']= $property_id;
! $values['equipment_id']= $equipment_id;
!
! }
!
! if ($equipment_id && !$err)
! {
! $equipment =
$this->bo->read_single($property_id,$equipment_id);
$function_msg = lang('edit equipment');
}
else
{
! $function_msg = lang('add equipment');
! }
!
! if ($equipment['cat_id'] > 0)
! {
! $this->cat_id = $equipment['cat_id'];
}
! if ($equipment['part_of_town_id'] > 0)
{
! $this->part_of_town_id =
$equipment['part_of_town_id'];
}
if($receipt['error'] && !$action=='edit')
{
--- 229,305 ----
function edit()
{
! $id = get_var('id',array('POST','GET'));
$err = get_var('err',array('POST','GET'));
$values = get_var('values',array('POST','GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
+ $values['equipment_id'] =
get_var('equipment_idd',array('POST'));
+ $values['property_id'] =
get_var('property_id',array('POST'));
+ $values['property_name'] =
get_var('property_name',array('POST'));
+ $values['building_id'] =
get_var('building_id',array('POST'));
+ $values['entrance_id'] =
get_var('entrance_id',array('POST'));
+ $values['floor'] =
get_var('floor',array('POST'));
+ $values['apartment_id'] =
get_var('apartment_id',array('POST'));
+ $values['street_name'] =
get_var('street_name',array('POST'));
+ $values['street_number'] =
get_var('street_number',array('POST'));
+ $values['vendor_id'] =
get_var('vendor_id',array('POST'));
+ $values['vendor_name'] =
get_var('vendor_name',array('POST'));
+ $values['date'] =
get_var('date',array('POST'));
+
if ($values['save'])
{
! if($id)
{
! $values['equipment_id']=$id;
$action='edit';
}
else
{
! if ($values['generate_id'])
! {
!
$values['equipment_id']=$this->so->generate_id($equipment['cat_id']);
! }
}
//_debug_array($values);
$receipt =
$this->bo->save($values,$action,$err);
! $id = $values['equipment_id'];
$function_msg = lang('edit equipment');
}
else
{
! if ($id)
! {
! $values = $this->bo->read_single($id);
! $function_msg = lang('edit equipment');
! }
! else
! {
! $function_msg = lang('add equipment');
! }
}
! if ($values['cat_id'] > 0)
{
! $this->cat_id = $values['cat_id'];
}
+
$location_data=$this->bocommon->initiate_ui_location(array(
+ 'form' => true,
+ 'equipment' =>
false,
+ 'tenant' =>
false,
+ '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']));
+
+
$vendor_data=$this->bocommon->initiate_ui_vendorlookup(array(
+ 'vendor_id' =>
$values['vendor_id'],
+ 'vendor_name' =>
$values['vendor_name']));
+
if($receipt['error'] && !$action=='edit')
{
***************
*** 290,301 ****
(
'menuaction' =>
$this->currentapp.'.uiequipment.edit',
! 'property_id' => $property_id,
! 'equipment_id' => $equipment_id,
'err' => $err
);
//_debug_array($link_data);
$data = array
(
'appname'
=> lang('equipment'),
'function_msg'
=> $function_msg,
--- 310,344 ----
(
'menuaction' =>
$this->currentapp.'.uiequipment.edit',
! 'id' => $id,
'err' => $err
);
//_debug_array($link_data);
+ $dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+ $sep = '/';
+ $dlarr[strpos($dateformat,'y')] = 'yyyy';
+ $dlarr[strpos($dateformat,'m')] = 'MM';
+ $dlarr[strpos($dateformat,'d')] = 'DD';
+ ksort($dlarr);
+
+ $dateformat= (implode($sep,$dlarr));
+
+
$data = array
(
+ 'link_calendar_date' =>
'setDateField(document.form.date);top.newWin=window.open('."'.".'/'.$this->currentapp.'/inc/calendar.html'."'".','."'".'cal'."'".','."'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes'".')',
+ 'calendar_gif'
=> './'.$this->currentapp.'/templates/default/images/calendar.gif',
+ 'calendar_source'
=> './'.$this->currentapp.'/inc/calendar.js',
+ 'dateformat'
=> $dateformat,
+ 'lang_popup_calendar' =>
lang('Popup Calendar'),
+ 'lang_date_statustext' =>
lang('insert the date for the acquisition'),
+ 'lang_date'
=> lang('Acquisition date'),
+ 'value_date'
=> $values['date'],
+
+ 'lang_generate_id'
=> lang('Generate ID ?'),
+ 'lang_generate_id_statustext' => lang('Choose
Generate ID to automaticly assign new ID based on type-prefix'),
+ 'vendor_data'
=> $vendor_data,
+ 'location_data'
=> $location_data,
+ 'location_type'
=> 'form',
'appname'
=> lang('equipment'),
'function_msg'
=> $function_msg,
***************
*** 303,346 ****
'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'lang_property_id'
=> lang('Property ID'),
! 'lang_equipment_id'
=> lang('equipment ID'),
! 'lang_name'
=> lang('name'),
! 'lang_generaladdress' =>
lang('General Address'),
! 'lang_generellinfo'
=> lang('General Info'),
'lang_category'
=> lang('category'),
- 'lang_access'
=> lang('private'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
! 'value_property_id'
=> $values['property_id'],
! 'value_equipment_id'
=> $values['equipment_id'],
'value_name'
=> $equipment['name'],
- 'value_generaladdress' =>
$equipment['generaladdress'],
- 'value_access'
=> $equipment['access'],
'value_cat'
=> $equipment['cat'],
'error'
=> $receipt['error'],
'message'
=> $receipt['message'],
! 'lang_name_statustext' =>
lang('Enter the name of the equipment'),
! 'lang_property_id_statustext' => lang('Enter
Property ID'),
! 'lang_equipment_id_statustext' => lang('Enter
equipment ID'),
! 'lang_generaladdress_statustext'=> lang('Enter
the general address'),
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the equipment'),
- 'lang_access_off_statustext' => lang('The
equipment is public. If the equipment should be private, check this box'),
- 'lang_access_on_statustext' =>
lang('The equipment is private. If the equipment should be public, uncheck this
box'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the equipment belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'values[cat_id]',
! 'lang_town_statustext' =>
lang('Select the part of town the equipment belongs to. To do not use a part of
town - select NO PART OF TOWN'),
! 'lang_part_of_town'
=> lang('Part of town'),
! 'lang_no_part_of_town' =>
lang('No part of town'),
! 'cat_list'
=>
$this->bocommon->select_category_building_list('select',$this->cat_id),
! 'part_of_town_list'
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
! 'select_name_part_of_town' =>
'values[part_of_town_id]',
! 'omraade_id'
=> $equipment['omraade_id'],
! 'part_of_town'
=> $equipment['part_of_town'],
'equipment_type_id'
=> $equipment['equipment_type_id'],
! 'location_code'
=> $equipment['location_code'],
! 'value_generellinfo' =>
$equipment['generellinfo']
!
!
);
--- 346,383 ----
'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'),
'lang_save'
=> lang('save'),
'lang_done'
=> lang('done'),
! 'lang_equipment_id'
=> lang('equipment ID'),
! 'value_equipment_id' =>
$values['equipment_id'],
! 'lang_equipment_id_statustext' => lang('Enter
equipment ID'),
! 'lang_lifetime' =>
lang('Longevity'),
! 'lang_lifetime_statustext' =>
lang('Enter the expected longevity in years'),
! 'value_lifetime'
=> $values['lifetime'],
!
'value_name'
=> $equipment['name'],
'value_cat'
=> $equipment['cat'],
'error'
=> $receipt['error'],
'message'
=> $receipt['message'],
! 'lang_descr_statustext' =>
lang('Enter a description of the equipment'),
! 'lang_descr'
=> lang('Description'),
! 'value_descr'
=> $values['descr'],
'lang_done_statustext' =>
lang('Back to the list'),
'lang_save_statustext' =>
lang('Save the equipment'),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext' =>
lang('Select the category the equipment belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'values[cat_id]',
! 'cat_list'
=>
$this->bocommon->select_category_equipment_list('select',$values['cat_id']),
! 'status_list'
=> $this->bo->select_status_list('select',$values['status_id']),
! 'select_status_name' =>
'values[status]',
! 'lang_no_status'
=> lang('Select status'),
! 'lang_status'
=> lang('Status'),
! 'lang_status_statustext' =>
lang('What is the current status of this equipment ?'),
! 'lang_cost'
=> lang('Purchase cost'),
! 'value_cost'
=> $values['cost'],
! 'lang_cost_statustext' =>
lang('Enter the purchase cost'),
'equipment_type_id'
=> $equipment['equipment_type_id'],
! 'currency'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['currency']
);
Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uiinvestment.inc.php 6 Feb 2003 09:03:45 -0000 1.7
--- class.uiinvestment.inc.php 15 Feb 2003 19:51:39 -0000 1.8
***************
*** 442,445 ****
--- 442,446 ----
$location_data=$this->bocommon->initiate_ui_location(array('equipment'
=> True,
+
'form'
=> true,
'tenant'
=> False,
'property_id'
=> $values['property_id'],
***************
*** 449,453 ****
'equipment_id'
=> $values['equipment_id']));
!
$GLOBALS['phpgw']->xslttpl->add_file(array('investment','location',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
if ($values['save'])
--- 450,454 ----
'equipment_id'
=> $values['equipment_id']));
!
$GLOBALS['phpgw']->xslttpl->add_file(array('investment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
if ($values['save'])
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uiinvoice.inc.php 11 Feb 2003 10:01:57 -0000 1.11
--- class.uiinvoice.inc.php 15 Feb 2003 19:51:39 -0000 1.12
***************
*** 85,89 ****
$end_date =
get_var('end_date',array('POST','GET'));
$submit_search =
get_var('submit_search',array('POST','GET'));
! $vendor_id =
get_var('abid',array('POST','GET'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
$property_id =
get_var('property_id',array('POST','GET'));
--- 85,89 ----
$end_date =
get_var('end_date',array('POST','GET'));
$submit_search =
get_var('submit_search',array('POST','GET'));
! $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'));
***************
*** 559,563 ****
$end_date =
get_var('end_date',array('POST','GET'));
$submit_search =
get_var('submit_search',array('POST','GET'));
! $vendor_id =
get_var('abid',array('POST','GET'));
$vendor_name =
get_var('vendor_name',array('POST','GET'));
--- 559,563 ----
$end_date =
get_var('end_date',array('POST','GET'));
$submit_search =
get_var('submit_search',array('POST','GET'));
! $vendor_id =
get_var('vendor_id',array('POST','GET'));
$vendor_name =
get_var('vendor_name',array('POST','GET'));
Index: class.uistandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uistandard_entity.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uistandard_entity.inc.php 12 Feb 2003 19:33:37 -0000 1.5
--- class.uistandard_entity.inc.php 15 Feb 2003 19:51:39 -0000 1.6
***************
*** 78,81 ****
--- 78,82 ----
'id'
=> $standard['id'],
'name'
=> $standard['name'],
+ 'prefix'
=> $standard['prefix'],
'first'
=> $first,
'link_attribute'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_entity.list_attribute&type_id='
. $standard['id'].'&type='.$type),
***************
*** 98,101 ****
--- 99,103 ----
'lang_descr' => lang('Descr'),
+ 'lang_prefix' => lang('prefix'),
'lang_attribute' => lang('Attributes'),
'lang_edit' => lang('edit'),
***************
*** 176,179 ****
--- 178,182 ----
$standard['name'] =
$values['name'];
$standard['descr'] =
$values['descr'];
+ $standard['prefix'] =
$values['prefix'];
}
***************
*** 209,212 ****
--- 212,219 ----
$data = array
(
+ 'lang_prefix'
=> lang('Standard prefix'),
+ 'lang_prefix_standardtext' =>
lang('Enter a standard prefix for the id of the equipments'),
+ 'lang_name_standardtext' =>
lang('Enter a name of the standard'),
+
'appname'
=> lang($type),
'function_msg'
=> $function_msg,
***************
*** 219,227 ****
'lang_done'
=> lang('done'),
'value_id'
=> $id,
! 'value_name'
=> $standard['name'],
'message'
=> $receipt['message'],
'error'
=> $receipt['error'],
'lang_id_standardtext' =>
lang('Enter the standard ID'),
! 'lang_descr_standardtext' =>
lang('Enter a description the standard'),
'lang_done_standardtext' =>
lang('Back to the list'),
'lang_save_standardtext' =>
lang('Save the standard'),
--- 226,235 ----
'lang_done'
=> lang('done'),
'value_id'
=> $id,
! 'value_name'
=> $standard['name'],
! 'value_prefix'
=> $standard['prefix'],
'message'
=> $receipt['message'],
'error'
=> $receipt['error'],
'lang_id_standardtext' =>
lang('Enter the standard ID'),
! 'lang_descr_standardtext' =>
lang('Enter a description of the standard'),
'lang_done_standardtext' =>
lang('Back to the list'),
'lang_save_standardtext' =>
lang('Save the standard'),
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.uitts.inc.php 11 Feb 2003 20:41:19 -0000 1.9
--- class.uitts.inc.php 15 Feb 2003 19:51:39 -0000 1.10
***************
*** 245,249 ****
{
!
$GLOBALS['phpgw']->xslttpl->add_file(array('tts','location',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
$values = get_var('values',array('POST'));
--- 245,249 ----
{
!
$GLOBALS['phpgw']->xslttpl->add_file(array('tts',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
$values = get_var('values',array('POST'));
***************
*** 263,280 ****
$values['tenant_phone'] =
get_var('tenant_phone',array('POST'));
!
$location_data=$this->bocommon->initiate_ui_location(array('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'],
!
'tenant_phone'
=> $values['tenant_phone'],
!
'equipment_id'
=> $values['equipment_id']));
--- 263,282 ----
$values['tenant_phone'] =
get_var('tenant_phone',array('POST'));
!
$location_data=$this->bocommon->initiate_ui_location(array(
!
'form' => true,
!
'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'],
!
'tenant_phone' => $values['tenant_phone'],
!
'equipment_id' => $values['equipment_id']));
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** hook_admin.inc.php 11 Feb 2003 20:41:19 -0000 1.15
--- hook_admin.inc.php 15 Feb 2003 19:51:39 -0000 1.16
***************
*** 36,39 ****
--- 36,40 ----
'Permissions'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.list_perm'),
'Workorders status'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=workorder_status'),
+ 'Equipment status'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=equipment_status'),
'Request status'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_status'),
'Request type'=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_type'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.14,1.15 class.boequipment.inc.php,1.2,1.3 class.boinvoice.inc.php,1.9,1.10 class.soequipment.inc.php,1.2,1.3 class.soinvoice.inc.php,1.11,1.12 class.sostandard_2.inc.php,1.4,1.5class.sostandard_entity.inc.php,1.6,1.7 class.uiequipment.inc.php,1.2,1.3class.uiinvestment.inc.php,1.7,1.8 class.uiinvoice.inc.php,1.11,1.12class.uistandard_entity.inc.php,1.5,1.6 class.uitts.inc.php,1.9,1.10 hook_admin.inc.php,1.15,1.16,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php,1.6,1.7 setup.inc.php,1.19,1.20 tables_current.inc.php,1.32,1.33
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default equipment.xsl,1.2,1.3 investment.xsl,1.5,1.6 invoice.xsl,1.15,1.16 lookup.xsl,1.10,1.11 standard_entity.xsl,1.5,1.6 tts.xsl,1.3,1.4
- Previous by thread:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php,1.6,1.7 setup.inc.php,1.19,1.20 tables_current.inc.php,1.32,1.33
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default equipment.xsl,1.2,1.3 investment.xsl,1.5,1.6 invoice.xsl,1.15,1.16 lookup.xsl,1.10,1.11 standard_entity.xsl,1.5,1.6 tts.xsl,1.3,1.4
- Index(es):