[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6495] merge 6492:6494 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6495] merge 6492:6494 from trunk |
Date: |
Mon, 18 Oct 2010 13:49:42 +0000 |
Revision: 6495
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6495
Author: sigurdne
Date: 2010-10-18 13:49:42 +0000 (Mon, 18 Oct 2010)
Log Message:
-----------
merge 6492:6494 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/property/inc/class.boproject.inc.php
branches/Version-1_0-branch/property/inc/class.soproject.inc.php
branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
branches/Version-1_0-branch/property/js/yahoo/project.edit.js
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494
Modified: branches/Version-1_0-branch/property/inc/class.boproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boproject.inc.php
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/inc/class.boproject.inc.php
2010-10-18 13:49:42 UTC (rev 6495)
@@ -402,6 +402,7 @@
$sum_workorder_calculation=
$sum_workorder_calculation+$workorder_data[$i]['calculation'];
$sum_workorder_actual_cost=
$sum_workorder_actual_cost+$workorder_data[$i]['act_mtrl_cost']+$workorder_data[$i]['act_vendor_cost'];
+
$values['workorder_budget'][$i]['title']=$workorder_data[$i]['title'];
$values['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
$values['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
2, ',', '');
$values['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
2, ',', '');
Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2010-10-18 13:49:42 UTC (rev 6495)
@@ -107,7 +107,7 @@
$query = (isset($data['query'])?$data['query']:'');
$sort = (isset($data['sort'])?$data['sort']:'DESC');
$order = (isset($data['order'])?$data['order']:'');
- $cat_id = (isset($data['cat_id'])?$data['cat_id']:0);
+ $cat_id = isset($data['cat_id']) && $data['cat_id'] ?
$data['cat_id'] : 0;
$status_id =
(isset($data['status_id'])?$data['status_id']:'');
$start_date = isset($data['start_date']) &&
$data['start_date'] ? (int)$data['start_date'] : 0;
$end_date = isset($data['end_date']) &&
$data['end_date'] ? (int)$data['end_date'] : 0;
@@ -338,7 +338,16 @@
if ($cat_id > 0)
{
- $filtermethod .= " $where
fm_project.category=$cat_id ";
+ $cats = CreateObject('phpgwapi.categories',
-1, 'property', '.project');
+ $cats->supress_info = true;
+ $cat_list_project =
$cats->return_sorted_array(0,$limit = false,$query = '',$sort = '',$order =
'',$globals = False, $parent_id = $cat_id, $use_acl = false);
+ $cat_filter = array($cat_id);
+ foreach ($cat_list_project as $_category)
+ {
+ $cat_filter[] = $_category['id'];
+ }
+ $filtermethod .= " {$where} fm_project.category
IN (" . implode(',', $cat_filter) .')';
+
$where= 'AND';
}
@@ -601,13 +610,14 @@
{
$project_id = (int) $project_id;
$budget = array();
- $this->db->query("SELECT act_mtrl_cost,
act_vendor_cost, budget, fm_workorder.id as workorder_id,"
+ $this->db->query("SELECT fm_workorder.title,
act_mtrl_cost, act_vendor_cost, budget, fm_workorder.id as workorder_id,"
." vendor_id,
calculation,rig_addition,addition,deviation,charge_tenant,fm_workorder_status.descr
as status, fm_workorder.account_id as b_account_id"
." FROM fm_workorder $this->join fm_workorder_status ON
fm_workorder.status = fm_workorder_status.id WHERE project_id={$project_id}");
while ($this->db->next_record())
{
$budget[] = array(
'workorder_id' =>
$this->db->f('workorder_id'),
+ 'title' =>
$this->db->f('title',true),
'budget' =>
(int)$this->db->f('budget'),
'deviation' =>
$this->db->f('deviation'),
'calculation' =>
$this->db->f('calculation'),
Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2010-10-18 13:49:42 UTC (rev 6495)
@@ -368,7 +368,16 @@
if ($cat_id > 0)
{
- $filtermethod .= " $where
fm_project.category=$cat_id ";
+ $cats = CreateObject('phpgwapi.categories',
-1, 'property', '.project');
+ $cats->supress_info = true;
+ $cat_list_project =
$cats->return_sorted_array(0,$limit = false,$query = '',$sort = '',$order =
'',$globals = False, $parent_id = $cat_id, $use_acl = false);
+ $cat_filter = array($cat_id);
+ foreach ($cat_list_project as $_category)
+ {
+ $cat_filter[] = $_category['id'];
+ }
+ $filtermethod .= " {$where} fm_project.category
IN (" . implode(',', $cat_filter) .')';
+
$where= 'AND';
}
Modified: branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2010-10-18 13:49:42 UTC (rev 6495)
@@ -1440,18 +1440,18 @@
}
$attrib_list =
$this->bo->read_attrib_group($entity_id,$cat_id);
- $uicols['name'][0] = 'name';
- $uicols['descr'][0] = lang('Name');
- $uicols['name'][1] = 'descr';
- $uicols['descr'][1] = lang('Descr');
- $uicols['name'][2] = 'group_sort';
- $uicols['descr'][2] = lang('sorting');
- $uicols['name'][3] = 'up';
- $uicols['descr'][3] = lang('up');
- $uicols['name'][4] = 'down';
- $uicols['descr'][4] = lang('down');
- $uicols['name'][5] = 'id';
- $uicols['descr'][5] = lang('id');
+ $uicols['name'][0] = 'id';
+ $uicols['descr'][0] = lang('id');
+ $uicols['name'][1] = 'name';
+ $uicols['descr'][1] = lang('Name');
+ $uicols['name'][2] = 'descr';
+ $uicols['descr'][2] = lang('Descr');
+ $uicols['name'][3] = 'group_sort';
+ $uicols['descr'][3] = lang('sorting');
+ $uicols['name'][4] = 'up';
+ $uicols['descr'][4] = lang('up');
+ $uicols['name'][5] = 'down';
+ $uicols['descr'][5] = lang('down');
$j = 0;
$count_uicols_name = count($uicols['name']);
@@ -1577,10 +1577,6 @@
$datatable['headers']['header'][$i]['text'] =
$uicols['descr'][$i];
$datatable['headers']['header'][$i]['visible'] = true;
$datatable['headers']['header'][$i]['sortable'] = false;
- if($uicols['name'][$i]=='id')
- {
-
$datatable['headers']['header'][$i]['visible'] = false;
- }
if($uicols['name'][$i]=='name')
{
Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2010-10-18 13:49:42 UTC (rev 6495)
@@ -1260,6 +1260,7 @@
$table_header_workorder_budget[] = array
(
'lang_workorder_id' => lang('Workorder'),
+ 'lang_title' => lang('title'),
'lang_budget' => lang('Budget'),
'lang_calculation' => lang('Calculation'),
'lang_vendor' => lang('Vendor'),
@@ -1489,6 +1490,7 @@
(
'name' => "0",
'values' => json_encode(array(
array('key' =>
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
+
array('key' =>
'title','label'=>lang('title'),'sortable'=>true,'resizeable'=>true),
array('key' => 'b_account_id','label'=>lang('Budget
account'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
array('key' =>
'budget','label'=>lang('Budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
array('key' =>
'calculation','label'=>lang('Calculation'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
Modified: branches/Version-1_0-branch/property/js/yahoo/project.edit.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/project.edit.js
2010-10-18 13:39:55 UTC (rev 6494)
+++ branches/Version-1_0-branch/property/js/yahoo/project.edit.js
2010-10-18 13:49:42 UTC (rev 6495)
@@ -23,7 +23,7 @@
{
//call getSumPerPage(name of column) in property.js
tmp_sum1 = getSumPerPage('budget',2,paginator,datatable);
- tmp_sum2 = getSumPerPage('calculation',2,paginator,datatable);
+ tmp_sum2 = getSumPerPage('calculation',2,paginator,datatable);
tmp_sum3 = getSumPerPage('actual_cost',2,paginator,datatable);
if(typeof(tableYUI)=='undefined')
@@ -40,9 +40,9 @@
newTR = document.createElement('tr');
td_sum('Sum');
- td_empty(1);
+ td_empty(2);
td_sum(tmp_sum1);
- td_sum(tmp_sum2);
+ td_sum(tmp_sum2);
td_sum(tmp_sum3);
td_empty(3);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6495] merge 6492:6494 from trunk,
Sigurd Nes <=