CVSROOT: /sources/phpgroupware Module name: property Changes by: Sigurd Nes <sigurdne> 07/09/25 10:30:15
Modified files: inc : class.soproject.inc.php Log message: project: budget and actual cost on front page CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soproject.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44 Patches: Index: class.soproject.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.soproject.inc.php,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- class.soproject.inc.php 21 Mar 2007 22:16:12 -0000 1.43 +++ class.soproject.inc.php 25 Sep 2007 10:30:15 -0000 1.44 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage project - * @version $Id: class.soproject.inc.php,v 1.43 2007/03/21 22:16:12 sigurdne Exp $ + * @version $Id: class.soproject.inc.php,v 1.44 2007/09/25 10:30:15 sigurdne Exp $ */ /** @@ -168,18 +168,40 @@ $uicols['descr'][] = lang('Coordinator'); $uicols['statustext'][] = lang('Project coordinator'); + $cols.= ",fm_project.budget"; + $cols_return[] = 'budget'; + $uicols['input_type'][] = 'text'; + $uicols['name'][] = 'budget'; + $uicols['descr'][] = lang('Project budget'); + $uicols['statustext'][] = lang('Project budget'); + + $cols .= ',sum(fm_workorder.combined_cost) as combined_cost'; + $cols_return[] = 'combined_cost'; + $uicols['input_type'][] = 'text'; + $uicols['name'][] = 'combined_cost'; + $uicols['descr'][] = lang('Sum workorder'); + $uicols['statustext'][] = lang('Cost - either budget or calculation'); + + $cols .= ',(sum(fm_workorder.act_mtrl_cost) + sum(fm_workorder.act_vendor_cost)) as actual_cost'; + $cols_return[] = 'actual_cost'; + $uicols['input_type'][] = 'text'; + $uicols['name'][] = 'actual_cost'; + $uicols['descr'][] = lang('Actual cost'); + $uicols['statustext'][] = lang('Actual cost - paid so far'); + + $cols.= ",$entity_table.user_id"; $joinmethod = " $this->join phpgw_accounts ON ($entity_table.coordinator = phpgw_accounts.account_id))"; $paranthesis ='('; + $joinmethod .= " $this->left_join fm_workorder ON ($entity_table.id = fm_workorder.project_id))"; + $paranthesis .='('; + //----- wo_hour_status if($wo_hour_cat_id) { - $joinmethod .= " $this->join fm_workorder ON ($entity_table.id = fm_workorder.project_id))"; - $paranthesis .='('; - $joinmethod .= " $this->join fm_wo_hours ON (fm_workorder.id = fm_wo_hours.workorder_id))"; $paranthesis .='('; @@ -241,11 +263,11 @@ { $filtermethod .= " $where fm_wo_hours_category.id=$wo_hour_cat_id "; $where= 'AND'; - $group_method = " group by fm_project.location_code,fm_project.id ,fm_project.start_date,fm_project.name,account_lid ,fm_project.user_id,fm_project.address"; + $group_method = ' GROUP BY fm_project.location_code,fm_project.id ,fm_project.start_date,fm_project.name,account_lid ,fm_project.user_id,fm_project.address,fm_project.budget'; } else { - $group_method = ''; + $group_method = ' GROUP BY fm_project.location_code,fm_project.id,fm_project.start_date,fm_project.name,phpgw_accounts.account_lid,fm_project.user_id,fm_project.address,fm_project.budget'; } if ($filter=='all') _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs