[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.sobudget.inc.php class.uibud...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.sobudget.inc.php class.uibud... |
Date: |
Fri, 05 May 2006 12:09:18 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/05/05 12:09:17
Modified files:
inc : class.sobudget.inc.php class.uibudget.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sobudget.inc.php.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uibudget.inc.php.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: property/inc/class.sobudget.inc.php
diff -u property/inc/class.sobudget.inc.php:1.13
property/inc/class.sobudget.inc.php:1.14
--- property/inc/class.sobudget.inc.php:1.13 Fri May 5 07:43:34 2006
+++ property/inc/class.sobudget.inc.php Fri May 5 12:09:17 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage budget
- * @version $Id: class.sobudget.inc.php,v 1.13 2006/05/05 07:43:34
sigurdne Exp $
+ * @version $Id: class.sobudget.inc.php,v 1.14 2006/05/05 12:09:17
sigurdne Exp $
*/
/**
@@ -419,6 +419,7 @@
$year = (isset($data['year'])?$data['year']:'');
$grouping =
(isset($data['grouping'])?$data['grouping']:'');
$revision =
(isset($data['revision'])?$data['revision']:'');
+ $year = (isset($data['year'])?$data['year']:'');
}
if ($order)
@@ -487,11 +488,33 @@
while ($this->db->next_record())
{
+ if($this->db->f('b_group')>0)
+ {
+ if(!$year)
+ {
+ $year = date("Y");
+ }
+
+ $this->db2->query("select max(revision)
as revision from fm_budget_basis where year='$year'",__LINE__,__FILE__);
+ $this->db2->next_record();
+ $revision = $this->db2->f('revision');
+
+ $this->db2->query("select budget_cost
from fm_budget_basis where year='$year' AND revision = '$revision' AND b_group
= '" . $this->db->f('b_group') ."' AND district_id = '" .
$this->db->f('district_id'). "'",__LINE__,__FILE__);
+ $this->db2->next_record();
+ $budget_cost =
$this->db2->f('budget_cost');
+
+ }
+ else
+ {
+ unset($budget_cost);
+ }
+
$obligations[] = array
(
+ 'budget_cost' => $budget_cost,
'grouping' =>
$this->db->f('b_group'),
'district_id' =>
$this->db->f('district_id'),
- 'budget_cost' =>
round($this->db->f('combined_cost')),
+ 'obligation' =>
round($this->db->f('combined_cost')),
'hits' =>
$this->db->f('hits')
);
}
Index: property/inc/class.uibudget.inc.php
diff -u property/inc/class.uibudget.inc.php:1.13
property/inc/class.uibudget.inc.php:1.14
--- property/inc/class.uibudget.inc.php:1.13 Fri May 5 09:50:52 2006
+++ property/inc/class.uibudget.inc.php Fri May 5 12:09:17 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage budget
- * @version $Id: class.uibudget.inc.php,v 1.13 2006/05/05 09:50:52
sigurdne Exp $
+ * @version $Id: class.uibudget.inc.php,v 1.14 2006/05/05 12:09:17
sigurdne Exp $
*/
/**
@@ -531,25 +531,29 @@
$content[] = array
(
+ 'budget_cost'
=> number_format($entry['budget_cost'], 0, ',', ' '),
'grouping'
=> $entry['grouping'],
'district_id'
=> $entry['district_id'],
- 'budget_cost'
=> number_format($entry['budget_cost'], 0, ',', ' '),
+ 'obligation'
=> number_format($entry['obligation'], 0, ',', ' '),
'hits'
=> number_format($entry['hits'], 0, ',', ' '),
'link_details'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.index&filter=all&status_id=Bestilt&district_id='
. $entry['district_id'] . '&b_group=' . $entry['grouping']),
'lang_details_text'
=> lang('obligation details'),
'text_details'
=> lang('details'),
);
- $sum = $sum + $entry['budget_cost'];
+ $sum_obligation = $sum_obligation +
$entry['obligation'];
$sum_hits = $sum_hits + $entry['hits'];
+ $sum_budget_cost = $sum_budget_cost +
$entry['budget_cost'];
}
}
- $sum = number_format($sum, 0, ',', ' ');
+ $sum_obligation = number_format($sum_obligation, 0,
',', ' ');
$sum_hits = number_format($sum_hits, 0, ',', ' ');
+ $sum_budget_cost = number_format($sum_budget_cost, 0,
',', ' ');
$table_header[] = array
(
- 'lang_budget_cost' => lang('obligations'),
+ 'lang_budget_cost' => lang('budget'),
+ 'lang_obligations' => lang('obligations'),
'lang_grouping' => lang('grouping'),
'lang_hits' => lang('hits'),
'lang_details' => lang('details'),
@@ -596,7 +600,7 @@
'allrows'=>$this->allrows)
)),
- 'sort_budget_cost' =>
$this->nextmatchs->show_sort_order(array
+ 'sort_obligations' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'combined_cost',
@@ -648,8 +652,9 @@
$data = array
(
- 'sum'
=> $sum,
+ 'sum_obligation'
=> $sum_obligation,
'sum_hits'
=> $sum_hits,
+ 'sum_budget_cost'
=> $sum_budget_cost,
'lang_sum'
=> lang('sum'),
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
'links'
=> $links,
@@ -678,6 +683,11 @@
'lang_no_grouping' =>
lang('no grouping'),
'lang_grouping_statustext' =>
lang('Select the grouping the selection belongs to'),
+ 'year_list' =>
$this->bo->get_year_filter_list($this->year,$basis=true),
+ 'lang_no_year' =>
lang('no year'),
+ 'lang_year_statustext' =>
lang('Select the year the selection belongs to'),
+
+
);
$this->save_sessiondata();
- [Phpgroupware-cvs] property/inc class.sobudget.inc.php class.uibud...,
Sigurd Nes <=