[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6878] Merge 6875:6877 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6878] Merge 6875:6877 from trunk |
Date: |
Mon, 31 Jan 2011 07:55:15 +0000 |
Revision: 6878
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6878
Author: sigurdne
Date: 2011-01-31 07:55:15 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
Merge 6875:6877 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.botts.inc.php
branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.sotts.inc.php
branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.uitts.inc.php
branches/Version-1_0-branch/property/js/yahoo/invoice.index.js
branches/Version-1_0-branch/property/js/yahoo/invoice.paid.index.js
branches/Version-1_0-branch/property/js/yahoo/tts.index.js
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
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,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877
Modified: branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -34,6 +34,9 @@
class property_boinvoice
{
+ public $total_records = 0;
+ public $sum_amount = 0;
+
function property_boinvoice($session=false)
{
$this->so =
CreateObject('property.soinvoice',true);
@@ -144,7 +147,7 @@
}
$this->total_records = $this->so->total_records;
-
+ $this->sum_amount = $this->so->sum_amount;
return $invoice;
}
Modified: branches/Version-1_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.botts.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.botts.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -49,7 +49,9 @@
var $user_id;
var $part_of_town_id;
var $district_id;
- var $total_records;
+ public $total_records = 0;
+ public $sum_budget = 0;
+ public $sum_actual_cost = 0;
var $public_functions = array
(
@@ -304,7 +306,11 @@
'start_date'=>$start_date,'end_date'=>$end_date,
'allrows'=>$this->allrows,'user_id' =>
$this->user_id,'external'=>$external, 'dry_run' => $dry_run,
'location_code' => $this->location_code,
'p_num' => $this->p_num));
+
$this->total_records = $this->so->total_records;
+ $this->sum_budget = $this->so->sum_budget;
+ $this->sum_actual_cost = $this->so->sum_actual_cost;
+
if(!$external)
{
$entity = $this->get_origin_entity_type();
Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -34,8 +34,9 @@
class property_soinvoice
{
- var $total_records = 0;
- var $role = array();
+ public $total_records = 0;
+ public $sum_amount = 0;
+ public $role = array();
protected $invoice_approval = 2;
function __construct()
@@ -189,6 +190,12 @@
$this->db->query($sql2,__LINE__,__FILE__);
$this->total_records = $this->db->num_rows();
+ $sql3 = "SELECT sum(belop) as sum_amount FROM $table
$join_tables $filtermethod $querymethod";
+ $this->db->query($sql3,__LINE__,__FILE__);
+ $this->db->next_record();
+ $this->sum_amount =
$this->db->f('sum_amount');
+
+
if(!$allrows)
{
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -38,6 +38,9 @@
{
var $uicols_related = array();
var $acl_location = '.ticket';
+ public $total_records = 0;
+ public $sum_budget = 0;
+ public $sum_actual_cost = 0;
public $soap_functions = array
(
@@ -393,10 +396,12 @@
//_debug_array($sql);
- $sql2 = "SELECT count(*) as cnt FROM ({$sql}) as t";
+ $sql2 = "SELECT count(*) as cnt, sum(budget) as
sum_budget, sum(actual_cost) as sum_actual_cost FROM ({$sql}) as t";
$this->db->query($sql2,__LINE__,__FILE__);
$this->db->next_record();
- $this->total_records = $this->db->f('cnt');
+ $this->total_records = $this->db->f('cnt');
+ $this->sum_budget =
$this->db->f('sum_budget');
+ $this->sum_actual_cost =
$this->db->f('sum_actual_cost');
unset($sql2);
$tickets = array();
Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -1026,7 +1026,8 @@
'sort' =>
$datatable['sorting']['order'],
'dir' =>
$datatable['sorting']['sort'],
'currentPage' =>
$datatable['sorting']['currentPage'],
- 'records' =>
array()
+ 'records' =>
array(),
+ 'sum_amount' =>
$this->bo->sum_amount
);
// values for datatable
if(isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row']))
Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2011-01-31 07:55:15 UTC (rev 6878)
@@ -1055,12 +1055,19 @@
);
}
+
+ $uicols_formatter = array
+ (
+ 'estimate' => 'FormatterRight',
+ 'actual_cost' => 'FormatterRight'
+ );
+
unset($parameters);
for ($i=0;$i<$count_uicols_name;$i++)
{
// if($uicols['input_type'][$i]!='hidden')
{
-
$datatable['headers']['header'][$i]['formatter'] =
!isset($uicols['formatter'][$i]) || $uicols['formatter'][$i]==''? '""' :
$uicols['formatter'][$i];
+
$datatable['headers']['header'][$i]['formatter'] =
isset($uicols_formatter[$uicols['name'][$i]]) &&
$uicols_formatter[$uicols['name'][$i]] ? $uicols_formatter[$uicols['name'][$i]]
: '""';
$datatable['headers']['header'][$i]['name'] =
$uicols['name'][$i];
$datatable['headers']['header'][$i]['text'] =
$uicols['descr'][$i];
$datatable['headers']['header'][$i]['visible'] = true;
@@ -1119,7 +1126,10 @@
'startIndex' =>
$datatable['pagination']['records_start'],
'sort' =>
$datatable['sorting']['order'],
'dir' =>
$datatable['sorting']['sort'],
- 'records' =>
array()
+ 'records' =>
array(),
+ 'show_sum' =>
$this->acl->check('.ticket.order', PHPGW_ACL_READ, 'property'),
+ 'sum_budget' =>
$this->bo->sum_budget,
+ 'sum_actual_cost' =>
$this->bo->sum_actual_cost
);
// values for datatable
Modified: branches/Version-1_0-branch/property/js/yahoo/invoice.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/invoice.index.js
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/js/yahoo/invoice.index.js
2011-01-31 07:55:15 UTC (rev 6878)
@@ -280,11 +280,13 @@
this.addFooterDatatable = function()
{
//call getSumPerPage(name of column) in property.js
- tmp_sum = getSumPerPage('amount_lnk',2);
+// tmp_sum = getSumPerPage('amount_lnk',2);
+ tmp_sum = YAHOO.util.Number.format(values_ds.sum_amount,
{decimalPlaces:2, decimalSeparator:",", thousandsSeparator:" "});
//Create ROW
newTR = document.createElement('tr');
- td_empty(15);
+ td_empty(14);
+ td_sum('Total');
td_sum(tmp_sum);
td_empty(7);
//RowChecked
Modified: branches/Version-1_0-branch/property/js/yahoo/invoice.paid.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/invoice.paid.index.js
2011-01-30 13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/js/yahoo/invoice.paid.index.js
2011-01-31 07:55:15 UTC (rev 6878)
@@ -49,6 +49,8 @@
{
elCell.innerHTML = YAHOO.util.Number.format(oData,
{decimalPlaces:2, decimalSeparator:",", thousandsSeparator:" "});
}
+
+ var tableYUI;
/********************************************************************************
* Delete all message un DIV 'message'
*/
@@ -56,6 +58,10 @@
{
if(flag_particular_setting=='init')
{
+
+ tableYUI =
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
+ tableYUI.setAttribute("id","tableYUI");
+
//necesary for don't show any records in
datatable
oMenuButton_1.set("label", ("<em>All</em>"));
oMenuButton_1.set("value", 'all');
@@ -76,10 +82,35 @@
*/
this.myParticularRenderEvent = function()
{
- //nothing don't delete
+ tableYUI.deleteTFoot();
+ addFooterDatatable();
}
+
/********************************************************************************
+ *
+ */
+ this.addFooterDatatable = function()
+ {
+ //call getSumPerPage(name of column) in property.js
+// tmp_sum = getSumPerPage('amount_lnk',2);
+ tmp_sum = YAHOO.util.Number.format(values_ds.sum_amount,
{decimalPlaces:2, decimalSeparator:",", thousandsSeparator:" "});
+ //Create ROW
+ newTR = document.createElement('tr');
+ td_empty(14);
+ td_sum('Total');
+ td_sum(tmp_sum);
+ td_empty(12);
+
+ //Add to Table
+ myfoot = tableYUI.createTFoot();
+ myfoot.setAttribute("id","myfoot");
+ myfoot.appendChild(newTR.cloneNode(true));
+ //clean value for values_ds.message
+ values_ds.message = null;
+ }
+
+
//----------------------------------------------------------
YAHOO.util.Event.addListener(window, "load", function()
{
Modified: branches/Version-1_0-branch/property/js/yahoo/tts.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/tts.index.js 2011-01-30
13:41:51 UTC (rev 6877)
+++ branches/Version-1_0-branch/property/js/yahoo/tts.index.js 2011-01-31
07:55:15 UTC (rev 6878)
@@ -39,7 +39,13 @@
date_search : 1 //if search has link "Data search"
}
+ var tableYUI;
+ var FormatterRight = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<P align=\"right\">"+oData+"</p>";
+ }
+
this.onChangeSelect = function()
{
var myselect=document.getElementById("sel_user_id");
@@ -59,6 +65,9 @@
{
if(flag_particular_setting=='init')
{
+ tableYUI =
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
+ tableYUI.setAttribute("id","tableYUI");
+
//category
index =
locate_in_array_options(0,"value",path_values.cat_id);
if(index)
@@ -100,9 +109,46 @@
this.myParticularRenderEvent = function()
{
- //nothing
+ if(values_ds.show_sum)
+ {
+ tableYUI.deleteTFoot();
+ addFooterDatatable();
+ }
}
+ this.addFooterDatatable = function()
+ {
+ tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget,
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
+ tmp_sum_actual_cost =
YAHOO.util.Number.format(values_ds.sum_actual_cost, {decimalPlaces:2,
decimalSeparator:",", thousandsSeparator:" "});
+
+ count_empty = 0;
+ for(i=0;i<myColumnDefs.length;i++)
+ {
+ if (myColumnDefs[i].key == 'estimate')
+ {
+ count_empty = i;
+ break;
+ }
+ }
+
+ count_empty_end = myColumnDefs.length - count_empty - 2;
+
+ //Create ROW
+ newTR = document.createElement('tr');
+ td_empty(count_empty);
+ td_sum(tmp_sum_budget);
+ td_sum(tmp_sum_actual_cost);
+ td_empty(count_empty_end);
+ //Add to Table
+ myfoot = tableYUI.createTFoot();
+ myfoot.setAttribute("id","myfoot");
+ myfoot.appendChild(newTR.cloneNode(true));
+
+ //clean value for values_ds.message
+ //values_ds.message = null;
+ }
+
+
/****************************************************************************************/
//----------------------------------------------------------
Modified:
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
===================================================================
---
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
2011-01-30 13:41:51 UTC (rev 6877)
+++
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
2011-01-31 07:55:15 UTC (rev 6878)
@@ -54,8 +54,8 @@
# * @var string PHP, PHPTAR
# * Download: http://httpd.apache.org/
# */
-PHPTAR="php-5.3.4.tar.bz2"
-PHP="php-5.3.4"
+PHPTAR="php-5.3.5.tar.bz2"
+PHP="php-5.3.5"
#/**
# * Name of the EACCELERATOR tarball e.g eaccelerator-0.9.5.tar.bz2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6878] Merge 6875:6877 from trunk,
Sigurd Nes <=