[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc header.inc.php,1.10,1.11 class.fm_w
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc header.inc.php,1.10,1.11 class.fm_wrkorder.inc.php,1.5,1.6 |
Date: |
Wed, 18 Sep 2002 15:54:17 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv10860/inc
Modified Files:
header.inc.php class.fm_wrkorder.inc.php
Log Message:
no message
Index: header.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/header.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** header.inc.php 16 Sep 2002 16:05:43 -0000 1.10
--- header.inc.php 18 Sep 2002 19:54:14 -0000 1.11
***************
*** 189,192 ****
--- 189,194 ----
$t->set_var('sub_workorder_archive',$phpgw->link('/property/list_workorder.php','sub=p_workorder&status=Avsluttet'));
$t->set_var('sub_workorder_template',$phpgw->link('/property/list_wo_template.php','sub=p_workorder'));
+
$t->set_var('sub_workorder_project',$phpgw->link('/property/list_project.php','sub=p_workorder'));
+ $t->set_var('sublang_workorder_project',lang('Project'));
$t->set_var('sublang_workorder_list',lang('Workorder'));
$t->set_var('sublang_workorder_request',lang('Request'));
***************
*** 202,209 ****
--- 204,214 ----
$t->set_var('sub_workorder_request','');
$t->set_var('sub_workorder_archive','');
+ $t->set_var('sub_workorder_template','');
+ $t->set_var('sub_workorder_project','');
$t->set_var('sublang_workorder_list','');
$t->set_var('sublang_workorder_request','');
$t->set_var('sublang_workorder_archive','');
$t->set_var('sublang_workorder_template','');
+ $t->set_var('sublang_workorder_project','');
}
Index: class.fm_wrkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.fm_wrkorder.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.fm_wrkorder.inc.php 16 Sep 2002 16:05:43 -0000 1.5
--- class.fm_wrkorder.inc.php 18 Sep 2002 19:54:14 -0000 1.6
***************
*** 22,26 ****
$this->total_records = $this->db->num_rows();
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('fm_wrkorder');
! $this->fm_wrkorder =
$this->read_wrkorders($start, $limit, $query_location, $filter, $sort, $order,
$status, $cat_id, $coordinator_id,$query_vendor);
}
--- 22,26 ----
$this->total_records = $this->db->num_rows();
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('fm_wrkorder');
! $this->fm_wrkorder =
$this->read_wrkorders($start, $limit, $query_location, $filter, $sort, $order,
$status, $cat_id, $coordinator_id,$query_vendor,$query_location,$project_id);
}
***************
*** 31,35 ****
}
! function read_wrkorders( $start, $limit = True, $query_location
= '', $filter = '', $sort = '', $order = '', $status = 'active', $cat_id,
$coordinator_id = '',$query_vendor='')
{
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 31,35 ----
}
! function read_wrkorders( $start, $limit = True, $query_location
= '', $filter = '', $sort = '', $order = '', $status = 'active', $cat_id,
$coordinator_id = '',$query_vendor='',$query_location='',$project_id='')
{
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
***************
*** 130,142 ****
}
!
! if($coordinator_id)
! {
! $sql = "SELECT
p.id,p.num,p.access,p.category,p.entry_date,p.start_date,p.end_date,p.coordinator,org_name
as vendor,p.status, "
. "p.descr,p.title,p.budget,
p.account_id as budget_account,
p.objekt_id,p.property_name,p.bygg_id,p.building_name,p.seksjons_id,p.etasje,p.leie_id,p.street,a.account_lid,a.account_firstname,a.account_lastname
FROM "
. " fm_wo_wrkorders AS p $join
phpgw_addressbook ON p.vendor = phpgw_addressbook.id $join phpgw_accounts AS a
on a.account_id=p.coordinator $statussort $querymethod AND $filtermethod ";
--- 130,151 ----
}
+ if($coordinator_id || $project_id)
+ {
+ if ($project_id)
+ {
! $sql = "SELECT
p.id,p.num,p.access,p.category,p.entry_date,p.start_date,p.end_date,p.coordinator,org_name
as vendor,p.status, "
! . "p.descr,p.title,p.budget,
p.account_id as budget_account,
p.objekt_id,p.property_name,p.bygg_id,p.building_name,p.seksjons_id,p.etasje,p.leie_id,p.street,a.account_lid,a.account_firstname,a.account_lastname
FROM "
! . " fm_wo_wrkorders AS p $join
phpgw_addressbook ON p.vendor = phpgw_addressbook.id $join phpgw_accounts AS a
on a.account_id=p.coordinator $statussort and project_id='$project_id' ";
! }
! else
! {
! $sql = "SELECT
p.id,p.num,p.access,p.category,p.entry_date,p.start_date,p.end_date,p.coordinator,org_name
as vendor,p.status, "
. "p.descr,p.title,p.budget,
p.account_id as budget_account,
p.objekt_id,p.property_name,p.bygg_id,p.building_name,p.seksjons_id,p.etasje,p.leie_id,p.street,a.account_lid,a.account_firstname,a.account_lastname
FROM "
. " fm_wo_wrkorders AS p $join
phpgw_addressbook ON p.vendor = phpgw_addressbook.id $join phpgw_accounts AS a
on a.account_id=p.coordinator $statussort $querymethod AND $filtermethod ";
+ }
+ // echo 'sql: '.$sql .'<BR>';
***************
*** 656,664 ****
}
! //----------------------------branches-----------------------
function select_branches_list($wrkorder_id = '',$billable =
False)
{
- // global $GLOBALS['phpgw'],$GLOBALS['phpgw_info'];
$currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
--- 665,672 ----
}
! //----------------------------branches_workorder-----------------------
function select_branches_list($wrkorder_id = '',$billable =
False)
{
$currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
***************
*** 690,693 ****
--- 698,732 ----
//----------------------------end branches
+ //----------------------------branches_project-----------------------
+
+ function select_branches_p_list($project_id = '',$billable =
False)
+ {
+
+ $this->db2->query("SELECT branch_id from
fm_wo_projectbranch WHERE project_id='$project_id' ",__LINE__,__FILE__);
+ while ($this->db2->next_record())
+ {
+ $selected[] = array('branch_id' =>
$this->db2->f('branch_id'));
+ }
+
+ $this->db->query("SELECT id,descr FROM fm_wo_branch
ORDER BY descr asc");
+ while ($this->db->next_record())
+ {
+ $branches_list .= '<option value="' .
$this->db->f('id') . '"';
+ for ($i=0;$i<count($selected);$i++)
+ {
+ if($selected[$i]['branch_id'] ==
$this->db->f('id'))
+ {
+ $branches_list .= ' selected';
+ }
+ }
+ $branches_list .= '>' .
$GLOBALS['phpgw']->strip_html($this->db->f('descr'));
+
+
+ $branches_list .= '</option>' . "\n";
+ }
+ return $branches_list;
+ }
+
+ //----------------------------end branches
//---------------------------- branches_2 ----------------------
***************
*** 720,734 ****
! function select_key_location_list($wrkorder_id =
'',$location='')
{
- // global $GLOBALS['phpgw'],$GLOBALS['phpgw_info'];
- $currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
!
! $this->db2->query("SELECT $location from
fm_wo_wrkorders WHERE id='$wrkorder_id' ");
$this->db2->next_record();
$selected = $this->db2->f($location);
!
$this->db->query("SELECT id,descr FROM fm_wo_key_loc
ORDER BY descr asc");
--- 759,771 ----
! function select_key_location_list($key_location='')
{
! /* $this->db2->query("SELECT $location from
fm_wo_wrkorders WHERE id='$wrkorder_id' ");
$this->db2->next_record();
$selected = $this->db2->f($location);
! */
! $selected = $key_location;
$this->db->query("SELECT id,descr FROM fm_wo_key_loc
ORDER BY descr asc");
***************
*** 754,769 ****
! function select_key_responsible_list($wrkorder_id = '')
{
- // global $GLOBALS['phpgw'],$GLOBALS['phpgw_info'];
- $currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
! $this->db2->query("SELECT key_responsible from
fm_wo_wrkorders WHERE id='$wrkorder_id' ");
$this->db2->next_record();
$selected = $this->db2->f('key_responsible');
!
$this->db->query("SELECT id,descr FROM fm_wo_branch
ORDER BY descr asc");
while ($this->db->next_record())
--- 791,805 ----
! function select_key_responsible_list($key_responsible = '')
{
! /* $this->db2->query("SELECT key_responsible from
fm_wo_wrkorders WHERE id='$wrkorder_id' ");
$this->db2->next_record();
$selected = $this->db2->f('key_responsible');
! */
! $selected =$key_responsible;
$this->db->query("SELECT id,descr FROM fm_wo_branch
ORDER BY descr asc");
while ($this->db->next_record())
***************
*** 1048,1061 ****
! function select_status_list($wrkorder_id = '')
{
! // global $GLOBALS['phpgw'],$GLOBALS['phpgw_info'];
! $currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
!
!
! $this->db2->query("SELECT status from fm_wo_wrkorders
WHERE id='$wrkorder_id' ");
! $this->db2->next_record();
!
! $selected = $this->db2->f('status');
if (!$selected )
{
--- 1084,1090 ----
! function select_status_list($status = '')
{
! $selected = $status;
if (!$selected )
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc header.inc.php,1.10,1.11 class.fm_wrkorder.inc.php,1.5,1.6,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default header.tpl,1.6,1.7 form_workorder.tpl,1.2,1.3 view_workorder.tpl,1.1.1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.10,1.11 setup.inc.php,1.8,1.9 tables_update.inc.php,1.8,1.9
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default header.tpl,1.6,1.7 form_workorder.tpl,1.2,1.3 view_workorder.tpl,1.1.1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.10,1.11 setup.inc.php,1.8,1.9 tables_update.inc.php,1.8,1.9
- Index(es):