[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.10,1.42.2.5.2.11 class.soprojects.inc.php,1.34.2.6.2.9,1.34.2.6.2.10 class.uiprojects.inc.php,1.47.2.7.2.7,1.47.2.7.2.8 |
Date: |
Fri, 06 Jun 2003 20:21:41 -0400 |
Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv14771/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boprojects.inc.php class.soprojects.inc.php
class.uiprojects.inc.php
Log Message:
update
Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.42.2.5.2.10
retrieving revision 1.42.2.5.2.11
diff -C2 -r1.42.2.5.2.10 -r1.42.2.5.2.11
*** class.boprojects.inc.php 3 Jun 2003 13:15:14 -0000 1.42.2.5.2.10
--- class.boprojects.inc.php 7 Jun 2003 00:21:39 -0000 1.42.2.5.2.11
***************
*** 70,76 ****
function boprojects($session=False, $action = '')
{
! $this->soprojects =
CreateObject('projects.soprojects');
! $this->sohours =
CreateObject('projects.soprojecthours');
! $this->contacts =
CreateObject('phpgwapi.contacts');
if ($session)
--- 70,76 ----
function boprojects($session=False, $action = '')
{
! $this->so =
CreateObject('projects.soprojects');
! $this->sohours =
CreateObject('projects.soprojecthours');
! $this->contacts = CreateObject('phpgwapi.contacts');
if ($session)
***************
*** 193,197 ****
function return_value($action,$item)
{
! return $this->soprojects->return_value($action,$item);
}
--- 193,197 ----
function return_value($action,$item)
{
! return $this->so->return_value($action,$item);
}
***************
*** 294,299 ****
function read_admins($action, $type)
{
! $admins = $this->soprojects->return_admins($action,
$type);
! $this->total_records = $this->soprojects->total_records;
return $admins;
}
--- 294,299 ----
function read_admins($action, $type)
{
! $admins = $this->so->return_admins($action, $type);
! $this->total_records = $this->so->total_records;
return $admins;
}
***************
*** 354,358 ****
function edit_admins($action, $users, $groups)
{
! $this->soprojects->edit_admins($action, $users,
$groups);
}
--- 354,358 ----
function edit_admins($action, $users, $groups)
{
! $this->so->edit_admins($action, $users, $groups);
}
***************
*** 361,369 ****
if ($action == 'pad')
{
! $admin =
$this->soprojects->isprojectadmin($action);
}
else
{
! $admin =
$this->soprojects->isbookkeeper($action);
}
return $admin;
--- 361,369 ----
if ($action == 'pad')
{
! $admin = $this->so->isprojectadmin($action);
}
else
{
! $admin = $this->so->isbookkeeper($action);
}
return $admin;
***************
*** 372,383 ****
function list_projects($start, $limit, $query, $filter, $sort,
$order, $status, $cat_id, $type, $pro_parent)
{
! $pro_list = $this->soprojects->read_projects($start,
$limit, $query, $filter, $sort, $order, $status, $cat_id, $type, $pro_parent);
! $this->total_records = $this->soprojects->total_records;
! return $pro_list;
}
function read_single_project($project_id)
{
! $pro =
$this->soprojects->read_single_project($project_id);
$pro['utime'] =
$this->sohours->get_time_used($project_id);
--- 372,418 ----
function list_projects($start, $limit, $query, $filter, $sort,
$order, $status, $cat_id, $type, $pro_parent)
{
! $pro_list = $this->so->read_projects($start, $limit,
$query, $filter, $sort, $order, $status, $cat_id, $type, $pro_parent);
!
! while (is_array($pro_list) &&
list(,$pro)=each($pro_list))
! {
! $cached_data =
$this->cached_accounts($pro['coordinator']);
! $coordinatorout =
$GLOBALS['phpgw']->strip_html($cached_data[$pro['coordinator']]['account_lid']
! . ' [' .
$cached_data[$pro['coordinator']]['firstname'] . ' '
! .
$cached_data[$pro['coordinator']]['lastname'] . ' ]');
! if ($pro['customer'])
! {
! $customer =
$this->read_single_contact($pro['customer']);
! if ($customer[0]['org_name'] == '') { $customerout =
$customer[0]['n_given'] . ' ' . $customer[0]['n_family']; }
! else { $customerout = $customer[0]['org_name'] . ' [ '
. $customer[0]['n_given'] . ' ' . $customer[0]['n_family'] . ' ]'; }
! }
!
! $pro['sdate'] = $pro['sdate'] + (60*60) *
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'];
! $sdateout =
$GLOBALS['phpgw']->common->show_date($pro['sdate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!
! $projects[] = array
! (
! 'project_id' =>
$pro['project_id'],
! 'parent' =>
$pro['parent'],
! 'coordinator' =>
$pro['coordinator'],
! 'coordinatorout' =>
$coordinatorout,
! 'customerout' => $customerout,
! 'title' =>
$GLOBALS['phpgw']->strip_html($pro['title']),
! 'number' =>
$GLOBALS['phpgw']->strip_html($pro['number']),
! 'investment_nr' =>
$GLOBALS['phpgw']->strip_html($pro['investment_nr']),
! 'descr' =>
$GLOBALS['phpgw']->strip_html($pro['descr']),
! 'sdateout' =>
$sdateout,
! 'budget' =>
$pro['budget'],
! 'pcosts' =>
$pro['pcosts'],
! 'edate' =>
$pro['edate']
! );
! }
!
! $this->total_records = $this->so->total_records;
! return $projects;
}
function read_single_project($project_id)
{
! $pro = $this->so->read_single_project($project_id);
$pro['utime'] =
$this->sohours->get_time_used($project_id);
***************
*** 409,415 ****
}
function read_single_activity($activity_id)
{
! $single_act =
$this->soprojects->read_single_activity($activity_id);
return $single_act;
}
--- 444,455 ----
}
+ function sum_budget($action = 'budget')
+ {
+ return $this->so->sum_budget($action);
+ }
+
function read_single_activity($activity_id)
{
! $single_act =
$this->so->read_single_activity($activity_id);
return $single_act;
}
***************
*** 417,421 ****
function exists($action, $check, $num, $pa_id)
{
! $exists = $this->soprojects->exists($action, $check ,
$num, $pa_id);
if ($exists)
{
--- 457,461 ----
function exists($action, $check, $num, $pa_id)
{
! $exists = $this->so->exists($action, $check , $num,
$pa_id);
if ($exists)
{
***************
*** 430,435 ****
function list_activities($start, $limit, $query, $sort, $order,
$cat_id)
{
! $act_list = $this->soprojects->read_activities($start,
$limit, $query, $sort, $order, $cat_id);
! $this->total_records = $this->soprojects->total_records;
return $act_list;
}
--- 470,475 ----
function list_activities($start, $limit, $query, $sort, $order,
$cat_id)
{
! $act_list = $this->so->read_activities($start, $limit,
$query, $sort, $order, $cat_id);
! $this->total_records = $this->so->total_records;
return $act_list;
}
***************
*** 437,441 ****
function activities_list($project_id, $billable)
{
! $activities_list =
$this->soprojects->activities_list($project_id, $billable);
return $activities_list;
}
--- 477,481 ----
function activities_list($project_id, $billable)
{
! $activities_list =
$this->so->activities_list($project_id, $billable);
return $activities_list;
}
***************
*** 443,447 ****
function select_activities_list($project_id, $billable)
{
! $activities_list =
$this->soprojects->select_activities_list($project_id, $billable);
return $activities_list;
}
--- 483,487 ----
function select_activities_list($project_id, $billable)
{
! $activities_list =
$this->so->select_activities_list($project_id, $billable);
return $activities_list;
}
***************
*** 449,453 ****
function select_pro_activities($project_id, $pro_parent,
$billable)
{
! $activities_list =
$this->soprojects->select_pro_activities($project_id, $pro_parent, $billable);
return $activities_list;
}
--- 489,493 ----
function select_pro_activities($project_id, $pro_parent,
$billable)
{
! $activities_list =
$this->so->select_pro_activities($project_id, $pro_parent, $billable);
return $activities_list;
}
***************
*** 455,459 ****
function select_hours_activities($project_id, $act)
{
! $activities_list =
$this->soprojects->select_hours_activities($project_id, $act);
return $activities_list;
}
--- 495,499 ----
function select_hours_activities($project_id, $act)
{
! $activities_list =
$this->so->select_hours_activities($project_id, $act);
return $activities_list;
}
***************
*** 624,632 ****
if ($action == 'mains')
{
! $values['number'] =
$this->soprojects->create_projectid();
}
else
{
! $values['number'] =
$this->soprojects->create_jobid($values['parent']);
}
}
--- 664,672 ----
if ($action == 'mains')
{
! $values['number'] =
$this->so->create_projectid();
}
else
{
! $values['number'] =
$this->so->create_jobid($values['parent']);
}
}
***************
*** 646,649 ****
--- 686,694 ----
}
+ if (!$values['pcosts'])
+ {
+ $values['pcosts'] = 0;
+ }
+
$values['ptime'] = intval($values['ptime'])*60;
***************
*** 667,671 ****
if ($values['project_id'] != 0)
{
!
$this->soprojects->edit_project($values, $book_activities, $bill_activities);
return $values['project_id'];
}
--- 712,716 ----
if ($values['project_id'] != 0)
{
! $this->so->edit_project($values,
$book_activities, $bill_activities);
return $values['project_id'];
}
***************
*** 673,677 ****
else
{
! return $this->soprojects->add_project($values,
$book_activities, $bill_activities);
}
}
--- 718,722 ----
else
{
! return $this->so->add_project($values,
$book_activities, $bill_activities);
}
}
***************
*** 681,685 ****
if ($values['choose'])
{
! $values['number'] =
$this->soprojects->create_activityid();
}
--- 726,730 ----
if ($values['choose'])
{
! $values['number'] =
$this->so->create_activityid();
}
***************
*** 693,697 ****
if ($values['activity_id'] != 0)
{
!
$this->soprojects->edit_activity($values);
if ($values['minperae'])
--- 738,742 ----
if ($values['activity_id'] != 0)
{
! $this->so->edit_activity($values);
if ($values['minperae'])
***************
*** 704,708 ****
else
{
! $this->soprojects->add_activity($values);
}
}
--- 749,753 ----
else
{
! $this->so->add_activity($values);
}
}
***************
*** 710,714 ****
function select_project_list($type, $status, $project_id)
{
! $list = $this->soprojects->select_project_list($type,
$status, $project_id);
return $list;
}
--- 755,759 ----
function select_project_list($type, $status, $project_id)
{
! $list = $this->so->select_project_list($type, $status,
$project_id);
return $list;
}
***************
*** 718,726 ****
if ($action == 'account')
{
!
$this->soprojects->delete_account_project_data($pa_id);
}
else
{
! $this->soprojects->delete_pa($action, $pa_id,
$subs);
}
}
--- 763,771 ----
if ($action == 'account')
{
! $this->so->delete_account_project_data($pa_id);
}
else
{
! $this->so->delete_pa($action, $pa_id, $subs);
}
}
***************
*** 728,732 ****
function change_owner($old, $new)
{
! $this->soprojects->change_owner($old, $new);
}
}
--- 773,777 ----
function change_owner($old, $new)
{
! $this->so->change_owner($old, $new);
}
}
Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.34.2.6.2.9
retrieving revision 1.34.2.6.2.10
diff -C2 -r1.34.2.6.2.9 -r1.34.2.6.2.10
*** class.soprojects.inc.php 3 Jun 2003 13:15:15 -0000 1.34.2.6.2.9
--- class.soprojects.inc.php 7 Jun 2003 00:21:39 -0000 1.34.2.6.2.10
***************
*** 86,90 ****
'processor' =>
$this->db->f('processor'),
'udate' =>
$this->db->f('entry_date'),
! 'investment_nr' =>
$this->db->f('investment_nr')
);
}
--- 86,91 ----
'processor' =>
$this->db->f('processor'),
'udate' =>
$this->db->f('entry_date'),
! 'investment_nr' =>
$this->db->f('investment_nr'),
! 'pcosts' =>
$this->db->f('pcosts')
);
}
***************
*** 225,229 ****
'cdate' =>
$pro['cdate'],
'processor' =>
$pro['processor'],
! 'investment_nr' => $pro['investment_nr']
);
return $p;
--- 226,231 ----
'cdate' =>
$pro['cdate'],
'processor' =>
$pro['processor'],
! 'investment_nr' =>
$pro['investment_nr'],
! 'pcosts' =>
$pro['pcosts']
);
return $p;
***************
*** 267,276 ****
$this->db->query('INSERT into phpgw_p_projects
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
! .
'descr,title,budget,num,parent,time_planned,date_created,processor) VALUES (' .
$this->account
. ",'" .
$values['access'] . "'," . intval($values['cat']) . ',' . time() . ',' .
intval($values['sdate']) . ','
.
intval($values['edate']) . ',' . intval($values['coordinator']) . ',' .
intval($values['customer']) . ",'" . $values['status']
. "','" .
$values['descr'] . "','" . $values['title'] . "'," . $values['budget'] . ",'" .
$values['number'] . "',"
.
intval($values['parent']) . ',' . intval($values['ptime']) . ',' . time() . ','
. $this->account . ",'" . $values['investment_nr']
! .
"')",__LINE__,__FILE__);
/*$this->db->query("SELECT max(id) FROM
phpgw_p_projects");
--- 269,278 ----
$this->db->query('INSERT into phpgw_p_projects
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
! .
'descr,title,budget,num,parent,time_planned,date_created,processor,investment_nr,pcosts)
VALUES (' . $this->account
. ",'" .
$values['access'] . "'," . intval($values['cat']) . ',' . time() . ',' .
intval($values['sdate']) . ','
.
intval($values['edate']) . ',' . intval($values['coordinator']) . ',' .
intval($values['customer']) . ",'" . $values['status']
. "','" .
$values['descr'] . "','" . $values['title'] . "'," . $values['budget'] . ",'" .
$values['number'] . "',"
.
intval($values['parent']) . ',' . intval($values['ptime']) . ',' . time() . ','
. $this->account . ",'" . $values['investment_nr']
! . "'," .
$values['pcosts'] . ')',__LINE__,__FILE__);
/*$this->db->query("SELECT max(id) FROM
phpgw_p_projects");
***************
*** 320,324 ****
. $values['descr'] .
"', title='" . $values['title'] . "', budget=" . $values['budget'] . ", num='"
. $values['number'] .
"', time_planned=" . intval($values['ptime']) . ', processor=' . $this->account
. ", investment_nr='"
! .
$values['investment_nr'] . "' where id=" .
$values['project_id'],__LINE__,__FILE__);
if (is_array($book_activities))
--- 322,326 ----
. $values['descr'] .
"', title='" . $values['title'] . "', budget=" . $values['budget'] . ", num='"
. $values['number'] .
"', time_planned=" . intval($values['ptime']) . ', processor=' . $this->account
. ", investment_nr='"
! .
$values['investment_nr'] . "', pcosts=" . $values['pcosts'] . ' where id=' .
$values['project_id'],__LINE__,__FILE__);
if (is_array($book_activities))
***************
*** 488,491 ****
--- 490,494 ----
function return_value($action,$pro_id)
{
+ $pro_id = intval($pro_id);
if ($action == 'act')
{
***************
*** 1003,1006 ****
--- 1006,1018 ----
$this->db->query('UPDATE phpgw_p_projectmembers set
account_id=' . $new . ' where (account_id=' . $old
. "' AND
type='aa')",__LINE__,__FILE__);
+ }
+
+ function sum_budget($action = 'budget')
+ {
+ $this->db->query('SELECT SUM(' . $action . ") as
sumvalue from phpgw_p_projects where ( parent=0 AND status!='archive'
)",__LINE__,__FILE__);
+ if ($this->db->next_record())
+ {
+ return $this->db->f('sumvalue');
+ }
}
Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.47.2.7.2.7
retrieving revision 1.47.2.7.2.8
diff -C2 -r1.47.2.7.2.7 -r1.47.2.7.2.8
*** class.uiprojects.inc.php 3 Jun 2003 13:15:15 -0000 1.47.2.7.2.7
--- class.uiprojects.inc.php 7 Jun 2003 00:21:39 -0000 1.47.2.7.2.8
***************
*** 49,53 ****
'preferences' => True,
'archive' => True,
! 'accounts_popup' => True
);
--- 49,54 ----
'preferences' => True,
'archive' => True,
! 'accounts_popup' => True,
! 'list_budget' => True
[...1043 lines suppressed...]
+
$GLOBALS['phpgw']->template->set_var('lang_view_entry',lang('View'));
+
+
$GLOBALS['phpgw']->template->parse('list','projects_list',True);
+ }
+
+ // ------------------------- end record declaration ------------------------
+
+ // --------------- template declaration for sum --------------------------
+
+
$GLOBALS['phpgw']->template->set_var('lang_sum_pcosts',lang('sum pcosts'));
+
$GLOBALS['phpgw']->template->set_var('lang_sum_budget',lang('sum budget'));
+
$GLOBALS['phpgw']->template->set_var('sum_pcosts',$this->bo->sum_budget('pcosts'));
+
$GLOBALS['phpgw']->template->set_var('sum_budget',$this->bo->sum_budget());
+
+ // ----------------------- end sum declaration ----------------------------
+
+ $this->save_sessiondata($action);
+
$GLOBALS['phpgw']->template->pfp('out','projects_list_t',True);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.10,1.42.2.5.2.11 class.soprojects.inc.php,1.34.2.6.2.9,1.34.2.6.2.10 class.uiprojects.inc.php,1.47.2.7.2.7,1.47.2.7.2.8,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: projects/setup setup.inc.php,1.11.2.2.2.1,1.11.2.2.2.2 tables_current.inc.php,1.11.2.1.2.1,1.11.2.1.2.2 tables_update.inc.php,1.15.2.1.2.2,1.15.2.1.2.3
- Next by Date:
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.11,1.42.2.5.2.12 class.uibilling.inc.php,1.18.2.6.2.1,1.18.2.6.2.2 class.uideliveries.inc.php,1.21.2.3.2.1,1.21.2.3.2.2 class.uiprojects.inc.php,1.47.2.7.2.8,1.47.2.7.2.9 class.uistatistics.inc.php,1.10.2.2.2.1,1.10.2.2.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: projects/setup setup.inc.php,1.11.2.2.2.1,1.11.2.2.2.2 tables_current.inc.php,1.11.2.1.2.1,1.11.2.1.2.2 tables_update.inc.php,1.15.2.1.2.2,1.15.2.1.2.3
- Next by thread:
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.11,1.42.2.5.2.12 class.uibilling.inc.php,1.18.2.6.2.1,1.18.2.6.2.2 class.uideliveries.inc.php,1.21.2.3.2.1,1.21.2.3.2.2 class.uiprojects.inc.php,1.47.2.7.2.8,1.47.2.7.2.9 class.uistatistics.inc.php,1.10.2.2.2.1,1.10.2.2.2.2
- Index(es):