[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.32,1.33 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.32,1.33 class.botts.inc.php,1.7,1.8 class.soproject.inc.php,1.6,1.7 class.sotts.inc.php,1.11,1.12 class.soworkorder.inc.php,1.12,1.13 class.uiproject.inc.php,1.8,1.9 class.uitts.inc.php,1.14,1.15 class.uiwo_hour.inc.php,1.11,1.12class.uiworkorder.inc.php,1.11,1.12 |
Date: |
Thu, 10 Apr 2003 06:14:29 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv12855/inc
Modified Files:
class.bocommon.inc.php class.botts.inc.php
class.soproject.inc.php class.sotts.inc.php
class.soworkorder.inc.php class.uiproject.inc.php
class.uitts.inc.php class.uiwo_hour.inc.php
class.uiworkorder.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.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** class.bocommon.inc.php 8 Apr 2003 12:38:09 -0000 1.32
--- class.bocommon.inc.php 10 Apr 2003 10:14:27 -0000 1.33
***************
*** 720,723 ****
--- 720,737 ----
}
+
+
+ function read_location_data($location_code)
+ {
+ return
$this->socommon->read_location_data($location_code);
+ }
+
+ function read_single_tenant($tenant_id)
+ {
+ return $this->socommon->read_single_tenant($tenant_id);
+ }
+
+
+
function select_part_of_town($format='',$selected='')
{
Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.botts.inc.php 7 Apr 2003 09:01:58 -0000 1.7
--- class.botts.inc.php 10 Apr 2003 10:14:27 -0000 1.8
***************
*** 98,102 ****
{
$format =
(isset($data['format'])?$data['format']:'');
! $selected =
(isset($data['filter'])?$data['filter']:'');
}
--- 98,102 ----
{
$format =
(isset($data['format'])?$data['format']:'');
! $selected =
(isset($data['filter'])?$data['filter']:$data['default']);
}
***************
*** 105,110 ****
$filters[0][id]='closed';
$filters[0][name]=lang('Closed');
! $filters[1][id]='open';
! $filters[1][name]=lang('Open');
while (is_array($filters) && list(,$filter) =
each($filters))
--- 105,110 ----
$filters[0][id]='closed';
$filters[0][name]=lang('Closed');
! $filters[1][id]='all';
! $filters[1][name]=lang('All');
while (is_array($filters) && list(,$filter) =
each($filters))
***************
*** 261,264 ****
--- 261,265 ----
$tenant_data=$this->socommon->read_single_tenant($ticket['tenant_id']);
$ticket['tenant_name']=
$tenant_data['last_name'] . ', ' . $tenant_data['first_name'];
+ $ticket['tenant_phone']=
$tenant_data['tenant_phone'];
}
***************
*** 295,298 ****
--- 296,303 ----
$ticket['owner_lid']=$GLOBALS['phpgw']->accounts->id2name($ticket['owner_id']);
$ticket['category_name']=ucfirst($this->cats->id2name($ticket['cat_id']));
+
+
$location_data=$this->socommon->read_location_data($ticket['location_code']);
+
+ $ticket=$ticket + $location_data;
return $ticket;
Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.soproject.inc.php 9 Apr 2003 20:14:11 -0000 1.6
--- class.soproject.inc.php 10 Apr 2003 10:14:27 -0000 1.7
***************
*** 205,209 ****
$project['equipment_id'] =
$this->db->f('equipment_id');
$project['location_code'] =
$this->db->f('location_code');
- $project['contact_phone'] =
$this->db->f('contact_phone');
$project['key_fetch'] =
$this->db->f('key_fetch');
$project['key_deliver'] =
$this->db->f('key_deliver');
--- 205,208 ----
Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.sotts.inc.php 7 Apr 2003 09:01:58 -0000 1.11
--- class.sotts.inc.php 10 Apr 2003 10:14:27 -0000 1.12
***************
*** 30,35 ****
$this->join = " LEFT JOIN ";
}
-
-
}
--- 30,33 ----
***************
*** 46,50 ****
$start=0;
}
! $filter =
(isset($data['filter'])?$data['filter']:'all');
$query =
(isset($data['query'])?$data['query']:'');
$sort =
(isset($data['sort'])?$data['sort']:'DESC');
--- 44,48 ----
$start=0;
}
! $filter =
(isset($data['filter'])?$data['filter']:'open');
$query =
(isset($data['query'])?$data['query']:'');
$sort =
(isset($data['sort'])?$data['sort']:'DESC');
***************
*** 60,67 ****
else
{
! $ordermethod = ' order by property_id DESC';
}
-
if ($filter == 'open')
{
--- 58,64 ----
else
{
! $ordermethod = ' order by id DESC';
}
if ($filter == 'open')
{
***************
*** 103,107 ****
$query = ereg_replace('"','',$query);
! $querymethod = " AND (subject LIKE '%$query%'
or street LIKE '%$query%' or location_code LIKE '%$query%')";
}
--- 100,104 ----
$query = ereg_replace('"','',$query);
! $querymethod = " AND (subject LIKE '%$query%'
or address LIKE '%$query%' or location_code LIKE '%$query%')";
}
***************
*** 123,127 ****
$tickets[$i]['location_code'] =
$this->db->f('location_code');
$tickets[$i]['owner'] =
$this->db->f('owner');
! $tickets[$i]['address'] =
$this->db->f('street_name') . ' ' . $this->db->f('street_number');
$tickets[$i]['assignedto'] =
$this->db->f('assignedto');
$tickets[$i]['status'] =
$this->db->f('status');
--- 120,124 ----
$tickets[$i]['location_code'] =
$this->db->f('location_code');
$tickets[$i]['owner'] =
$this->db->f('owner');
! $tickets[$i]['address'] =
$this->db->f('address');
$tickets[$i]['assignedto'] =
$this->db->f('assignedto');
$tickets[$i]['status'] =
$this->db->f('status');
***************
*** 161,171 ****
$ticket['location_code'] =
$this->db->f('location_code');
$ticket['equipment_id'] =
$this->db->f('equipment_id');
- $ticket['property_id'] =
$this->db->f('property_id');
- $ticket['property_name'] =
$this->db->f('property_name');
- $ticket['building_id'] =
$this->db->f('building_id');
- $ticket['entrance_id'] =
$this->db->f('entrance_id');
$ticket['floor'] =
$this->db->f('floor');
! $ticket['apartment_id'] =
$this->db->f('apartment_id');
! $ticket['contact_phone'] =
$this->db->f('contact_phone');
$ticket['street_name'] =
$this->db->f('street_name');
$ticket['street_number'] =
$this->db->f('street_number');
--- 158,163 ----
$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');
$ticket['street_number'] =
$this->db->f('street_number');
***************
*** 181,188 ****
//_debug_array($ticket);
-
return $ticket;
-
-
}
--- 173,177 ----
***************
*** 199,211 ****
.
$GLOBALS['phpgw_info']['user']['account_id'] . "','" . time() .
"')",__LINE__,__FILE__);
}
-
}
function add($ticket)
{
$this->db->query("insert into fm_tts_tickets
(priority,owner,"
.
"assignedto,subject,cat_id,status,details,location_code,"
! .
"property_id,property_name,building_id,entrance_id,floor,apartment_id,street_name,street_number,tenant_id,tenant_name,contact_phone)
values ('"
. $ticket['priority'] . "','"
. $GLOBALS['phpgw_info']['user']['account_id']
. "','"
--- 188,207 ----
.
$GLOBALS['phpgw_info']['user']['account_id'] . "','" . time() .
"')",__LINE__,__FILE__);
}
}
function add($ticket)
{
+ if($ticket['street_number'])
+ {
+ $address= $ticket['street_name'] . ' ' .
$ticket['street_number'];
+ }
+ else
+ {
+ $address= $ticket['street_name'];
+ }
$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']
. "','"
***************
*** 215,249 ****
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
- . $ticket['property_id'] . "','"
- . $ticket['property_name'] . "','"
- . $ticket['building_id'] . "','"
- . $ticket['entrance_id'] . "','"
. $ticket['floor'] . "','"
! . $ticket['apartment_id'] . "','"
! . $ticket['street_name'] . "','"
! . $ticket['street_number'] . "','"
! . $ticket['tenant_id'] . "','"
! . $ticket['tenant_name'] . "','"
! . $ticket['tenant_phone'] .
"')",__LINE__,__FILE__);
$id =
$this->db->get_last_insert_id('fm_tts_tickets','id');
$this->historylog->add('O',$id,mktime(),'');
$receipt['message'][0]=array('msg'=>lang('Ticket has
been saved'));
$receipt['id'] = $id;
return $receipt;
- }
-
- function edit($ticket)
- {
- $ticket['content'] =
$this->db->db_addslashes($ticket['content']);
-
- $this->db->query("UPDATE fm_building set
building_name='" . $building['name'] . "', entry_date='" . time()
- . "', cat_id='" .
$building['cat_id'] . "', general_address='" . $building['general_address'] .
"', access='" . $building['access']
- . "' WHERE property_id= '" .
$building['property_id']
- . "' AND building_id=" .
$building['building_id'],__LINE__,__FILE__);
-
- $message = lang('Building has been edited');
- return $message;
}
--- 211,229 ----
. $this->db->db_addslashes($ticket['details'])
. "','"
. $ticket['location_code'] . "','"
. $ticket['floor'] . "','"
! . $address . "','"
! . $ticket['tenant_id'] .
"')",__LINE__,__FILE__);
$id =
$this->db->get_last_insert_id('fm_tts_tickets','id');
$this->historylog->add('O',$id,mktime(),'');
+ if($ticket['tenant_phone'])
+ {
+ $this->db->query("update fm_tenant set
contact_phone='". $ticket['tenant_phone']. "' where tenant_id='".
$ticket['tenant_id']. "'",__LINE__,__FILE__);
+ }
+
$receipt['message'][0]=array('msg'=>lang('Ticket has
been saved'));
$receipt['id'] = $id;
return $receipt;
}
Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.soworkorder.inc.php 31 Mar 2003 21:14:14 -0000 1.12
--- class.soworkorder.inc.php 10 Apr 2003 10:14:27 -0000 1.13
***************
*** 168,177 ****
$query = ereg_replace('"','',$query);
! $querymethod = " AND fm_wo_wrkorders.title LIKE
'%$query%' or fm_wo_wrkorders.descr LIKE '%$query%' or
fm_wo_project.street_name LIKE '%$query%' or fm_wo_project.location_code LIKE
'%$query%'";
}
! $sql = "SELECT fm_wo_project.id as
project_id,fm_wo_wrkorders.id,fm_wo_wrkorders.entry_date,fm_wo_wrkorders.status,fm_wo_project.property_id,"
! . "
fm_wo_project.building_id,fm_wo_project.entrance_id,fm_wo_project.floor,fm_wo_project.apartment_id,"
! . "
fm_wo_project.street_name,fm_wo_project.street_number,fm_wo_wrkorders.title,fm_wo_wrkorders.owner
"
. " FROM fm_wo_wrkorders $this->join
fm_wo_project ON fm_wo_project.id = fm_wo_wrkorders.project_id WHERE
$filtermethod $querymethod";
--- 168,176 ----
$query = ereg_replace('"','',$query);
! $querymethod = " AND fm_wo_wrkorders.title LIKE
'%$query%' or fm_wo_wrkorders.descr LIKE '%$query%' or fm_wo_project.address
LIKE '%$query%' or fm_wo_project.location_code LIKE '%$query%'";
}
! $sql = "SELECT fm_wo_project.id as
project_id,fm_wo_wrkorders.id,fm_wo_wrkorders.entry_date,fm_wo_wrkorders.status,fm_wo_project.location_code,"
! . "
fm_wo_project.floor,fm_wo_project.address,fm_wo_wrkorders.title,fm_wo_wrkorders.owner
"
. " FROM fm_wo_wrkorders $this->join
fm_wo_project ON fm_wo_project.id = fm_wo_wrkorders.project_id WHERE
$filtermethod $querymethod";
***************
*** 193,204 ****
'equipment_id' =>
$this->db->f('equipment_id'),
'location_code' =>
$this->db->f('location_code'),
- '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' =>
$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'),
'grants' => $ngrants
--- 192,197 ----
'equipment_id' =>
$this->db->f('equipment_id'),
'location_code' =>
$this->db->f('location_code'),
'floor' =>
$this->db->f('floor'),
! 'address' =>
$this->db->f('address'),
'category' =>
$this->db->f('category'),
'grants' => $ngrants
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uiproject.inc.php 9 Apr 2003 20:14:11 -0000 1.8
--- class.uiproject.inc.php 10 Apr 2003 10:14:27 -0000 1.9
***************
*** 246,252 ****
$bypass =
get_var('bypass',array('POST','GET'));
! if($values)
{
$values = $values +
$this->bocommon->get_location();
}
--- 246,273 ----
$bypass =
get_var('bypass',array('POST','GET'));
! if($values && !$bypass)
{
$values = $values +
$this->bocommon->get_location();
+ }
+ else
+ {
+ $location_code =
get_var('location_code',array('POST','GET'));
+ $values['tenant_id'] =
get_var('tenant_id',array('POST','GET'));
+ $values['equipment_id'] =
get_var('equipment_id',array('POST','GET'));
+
+ if($values['tenant_id'])
+ {
+
$tenant_data=$this->bocommon->read_single_tenant($values['tenant_id']);
+ $values['tenant_phone']=
$tenant_data['tenant_phone'];
+ $values['tenant_name']=
$tenant_data['last_name'] . ', ' . $tenant_data['first_name'];
+ }
+
+ if($location_code)
+ {
+
$location_data=$this->bocommon->read_location_data($location_code);
+
+ $values=$values + $location_data;
+ }
+
}
Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uitts.inc.php 8 Apr 2003 12:38:09 -0000 1.14
--- class.uitts.inc.php 10 Apr 2003 10:14:27 -0000 1.15
***************
*** 227,231 ****
'filter_name'
=> 'filter',
'filter_list'
=> $this->bo->filter(array('filter' => $this->filter,'default' => 'open')),
! 'lang_show_all'
=> lang('Show all'),
'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'),
--- 227,231 ----
'filter_name'
=> 'filter',
'filter_list'
=> $this->bo->filter(array('filter' => $this->filter,'default' => 'open')),
! 'lang_show_all'
=> lang('Open'),
'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'),
***************
*** 454,469 ****
'location_code' =>
$ticket['location_code'],
'equipment_id' =>
$ticket['equipment_id'],
! 'property_id' =>
$ticket['property_id'],
! 'property_name' =>
$ticket['property_name'],
! 'building_id' =>
$ticket['building_id'],
! 'building_name' =>
$ticket['building_name'],
! 'entrance_id' =>
$ticket['entrance_id'],
! 'floor' =>
$ticket['floor'],
! 'apartment_id' =>
$ticket['apartment_id'],
! 'street_name' =>
$ticket['street_name'],
! 'street_number' =>
$ticket['street_number'],
! 'tenant_id' =>
$ticket['tenant_id'],
! 'tenant_name' =>
$ticket['tenant_name'],
! 'tenant_phone' =>
$ticket['contact_phone']
);
--- 454,458 ----
'location_code' =>
$ticket['location_code'],
'equipment_id' =>
$ticket['equipment_id'],
! 'tenant_id' =>
$ticket['tenant_id']
);
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uiwo_hour.inc.php 7 Apr 2003 07:21:56 -0000 1.11
--- class.uiwo_hour.inc.php 10 Apr 2003 10:14:27 -0000 1.12
***************
*** 669,672 ****
--- 669,675 ----
}
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+ $date =
$GLOBALS['phpgw']->common->show_date('',$dateformat);
+
// don't want any warnings turning up in the pdf code
if the server is set to 'anal' mode.
//error_reporting(7);
***************
*** 684,687 ****
--- 687,691 ----
$this->pdf->addText(50,823,6,lang('Chapter') . ' '
.$common_data['workorder']['chapter_id'] . ' ' .
$common_data['workorder']['chapter'] );
$this->pdf->addText(50,34,6,'BBB');
+ $this->pdf->addText(300,34,6,$date);
if($mark_draft)
{
Index: class.uiworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uiworkorder.inc.php 1 Apr 2003 16:37:37 -0000 1.11
--- class.uiworkorder.inc.php 10 Apr 2003 10:14:27 -0000 1.12
***************
*** 87,103 ****
while (is_array($workorder_list) && list(,$workorder) =
each($workorder_list))
{
$content[] = array
(
-
'title'
=> $workorder['title'],
'workorder_id'
=> $workorder['workorder_id'],
'project_id'
=> $workorder['project_id'],
'descr'
=> $workorder['descr'],
! 'property_id'
=> $workorder['property_id'],
! 'building_id'
=> $workorder['building_id'],
! 'entrance_id'
=> $workorder['entrance_id'],
'floor'
=> $workorder['floor'],
! 'apartment_id'
=> $workorder['apartment_id'],
! 'street'
=> $workorder['street'],
'entry_date'
=> $workorder['entry_date'],
'status'
=> $workorder['status'],
--- 87,104 ----
while (is_array($workorder_list) && list(,$workorder) =
each($workorder_list))
{
+ $location = split("-",
$workorder['location_code']);
+
$content[] = array
(
'title'
=> $workorder['title'],
'workorder_id'
=> $workorder['workorder_id'],
'project_id'
=> $workorder['project_id'],
'descr'
=> $workorder['descr'],
! 'property_id'
=> $location[0],
! 'building_id'
=> $location[1],
! 'entrance_id'
=> $location[2],
'floor'
=> $workorder['floor'],
! 'apartment_id'
=> $location[3],
! 'address'
=> $workorder['address'],
'entry_date'
=> $workorder['entry_date'],
'status'
=> $workorder['status'],
***************
*** 162,169 ****
'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.'.uiworkorder.index',
--- 163,170 ----
'lang_floor' => lang('Floor'),
'lang_apartment' => lang('Apartment'),
! 'sort_address' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'address',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiworkorder.index',
***************
*** 173,178 ****
'query'
=>$this->query)
)),
! 'lang_street_name' => lang('Street Name'),
! 'lang_street_num' => lang('Num'),
'lang_entry_date' => lang('Entry date'),
'lang_user' => lang('User'),
--- 174,178 ----
'query'
=>$this->query)
)),
! 'lang_address' => lang('Address'),
'lang_entry_date' => lang('Entry date'),
'lang_user' => lang('User'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.32,1.33 class.botts.inc.php,1.7,1.8 class.soproject.inc.php,1.6,1.7 class.sotts.inc.php,1.11,1.12 class.soworkorder.inc.php,1.12,1.13 class.uiproject.inc.php,1.8,1.9 class.uitts.inc.php,1.14,1.15 class.uiwo_hour.inc.php,1.11,1.12class.uiworkorder.inc.php,1.11,1.12,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.58,1.59
- Next by Date:
[Phpgroupware-cvs] CVS: bookmarks/setup setup.inc.php,1.7.2.2.2.2,1.7.2.2.2.3 tables_current.inc.php,1.5.4.2,1.5.4.3 tables_update.inc.php,1.1.2.2,1.1.2.3
- Previous by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.58,1.59
- Next by thread:
[Phpgroupware-cvs] CVS: bookmarks/setup setup.inc.php,1.7.2.2.2.2,1.7.2.2.2.3 tables_current.inc.php,1.5.4.2,1.5.4.3 tables_update.inc.php,1.1.2.2,1.1.2.3
- Index(es):