[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uibudget.inc.php class.menu....
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.uibudget.inc.php class.menu.... |
Date: |
Sun, 09 Apr 2006 21:23:20 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/09 21:23:20
Modified files:
inc : class.uibudget.inc.php class.menu.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uibudget.inc.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.menu.inc.php.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
Patches:
Index: property/inc/class.menu.inc.php
diff -u property/inc/class.menu.inc.php:1.20
property/inc/class.menu.inc.php:1.21
--- property/inc/class.menu.inc.php:1.20 Tue Apr 4 13:46:30 2006
+++ property/inc/class.menu.inc.php Sun Apr 9 21:23:20 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.menu.inc.php,v 1.20 2006/04/04 13:46:30 sigurdne
Exp $
+ * @version $Id: class.menu.inc.php,v 1.21 2006/04/09 21:23:20 sigurdne
Exp $
*/
/**
@@ -479,6 +479,15 @@
$menu['sub_menu'][$i]['statustext']
= lang('budget');
$i++;
+ if($page=='budget.basis')
+ {
+
$menu['sub_menu'][$i]['this']=True;
+ }
+ $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uibudget.basis');
+ $menu['sub_menu'][$i]['name']
= lang('basis');
+ $menu['sub_menu'][$i]['statustext']
= lang('budget per group');
+
+ $i++;
if($page=='obligations')
{
$menu['sub_menu'][$i]['this']=True;
Index: property/inc/class.uibudget.inc.php
diff -u property/inc/class.uibudget.inc.php:1.3
property/inc/class.uibudget.inc.php:1.4
--- property/inc/class.uibudget.inc.php:1.3 Fri Apr 7 13:28:02 2006
+++ property/inc/class.uibudget.inc.php Sun Apr 9 21:23:20 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.3 2006/04/07 13:28:02
sigurdne Exp $
+ * @version $Id: class.uibudget.inc.php,v 1.4 2006/04/09 21:23:20
sigurdne Exp $
*/
/**
@@ -29,6 +29,7 @@
var $public_functions = array
(
'index' => True,
+ 'basis' => True,
'obligations' => True,
'view' => True,
'edit' => True,
@@ -290,13 +291,17 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
}
- function obligations()
+
+ function basis()
{
- $acl2_location = '.budget.obligations';
+ $acl2_location = '.budget';
$acl_read = $this->acl2->check($acl2_location,1);
$acl_add = $this->acl2->check($acl2_location,2);
$acl_edit = $this->acl2->check($acl2_location,4);
$acl_delete = $this->acl2->check($acl2_location,8);
+ $revision_list =
$this->bo->get_revision_filter_list($this->revision); // reset year
+ $this->year = $this->bo->year;
+ $this->revision = $this->bo->revision;
if(!$acl_read)
{
@@ -309,60 +314,131 @@
'search_field',
'nextmatchs'));
- $links = $this->menu->links('obligations');
+ $links = $this->menu->links('budget.basis');
$receipt =
$GLOBALS['phpgw']->session->appsession('session_data','budget_receipt');
$GLOBALS['phpgw']->session->appsession('session_data','budget_receipt','');
$list = $this->bo->read();
-
- if (isset($custom_function_list) AND
is_array($custom_function_list))
+ if (isset($list) AND is_array($list))
{
- foreach($custom_function_list as $entry)
+ $sum = 0;
+ foreach($list as $entry)
{
$content[] = array
(
- 'file_name'
=> $entry['file_name'],
- 'descr'
=> $entry['descr'],
- 'sorting'
=> $entry['sorting'],
- 'active'
=> $entry['active']?'X':'',
- 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.ui_custom.list_custom_function&resort=up&appname='
. $appname . '&location=' . $location . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_down'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.ui_custom.list_custom_function&resort=down&appname='
. $appname . '&location=' . $location . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.ui_custom.edit_custom_function&appname='
. $appname . '&location=' . $location . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.ui_custom.delete&appname='
. $appname . '&location=' . $location . '&custom_function_id=' . $entry['id']),
- 'lang_up_text'
=> lang('shift up'),
- 'lang_down_text'
=> lang('shift down'),
- 'lang_edit_text'
=> lang('edit the custom_function'),
- 'lang_delete_text'
=> lang('delete the custom_function'),
- 'text_custom_function'
=> lang('custom functions'),
- 'text_up'
=> lang('up'),
- 'text_down'
=> lang('down'),
- 'text_edit'
=> lang('edit'),
- 'text_delete'
=> lang('delete')
+ 'year'
=> $entry['year'],
+ 'b_account_id'
=> $entry['b_account_id'],
+ 'b_account_name'
=> $entry['b_account_name'],
+ 'grouping'
=> $entry['grouping'],
+ 'district_id'
=> $entry['district_id'],
+ 'revision'
=> $entry['revision'],
+ 'budget_cost'
=> $entry['budget_cost'],
+ 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.edit&budget_id='
. $entry['budget_id']),
+ 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.delete&budget_id='
. $entry['budget_id']),
+ 'lang_edit_text'
=> lang('edit the budget record'),
+ 'lang_delete_text'
=> lang('delete the budget record'),
+ 'text_edit'
=> lang('edit'),
+ 'text_delete'
=> lang('delete')
);
+ $sum = $sum + $entry['budget_cost'];
}
}
+ $table_header[] = array
+ (
+ 'lang_year' => lang('year'),
+ 'lang_revision' => lang('revision'),
+ 'lang_b_account' => lang('budget
account'),
+ 'lang_name' => lang('name'),
+ 'lang_budget_cost' => lang('budget_cost'),
+ 'lang_grouping' => lang('grouping'),
+ 'lang_edit' => lang('edit'),
+ 'lang_delete' => lang('delete'),
+ 'lang_district_id' => lang('district_id'),
+
+ 'sort_district_id' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'district_id',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uibudget.index',
+
'district_id'
=>$this->district_id,
+
'year' =>$this->year,
+
'period' =>$this->period,
+
'grouping'
=>$this->grouping,
+
'revision'
=>$this->revision,
+
'allrows'
=>$this->allrows)
+
)),
+
+ 'sort_b_account_id' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'b_account_id',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uibudget.index',
+
'district_id'
=>$this->district_id,
+
'year' =>$this->year,
+
'period' =>$this->period,
+
'grouping'
=>$this->grouping,
+
'revision'
=>$this->revision,
+
'allrows'=>$this->allrows)
+
)),
+
+ 'sort_grouping' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'grouping',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uibudget.index',
+
'district_id'
=>$this->district_id,
+
'year' =>$this->year,
+
'period' =>$this->period,
+
'grouping'
=>$this->grouping,
+
'revision'
=>$this->revision,
+
'allrows'=>$this->allrows)
+
)),
+
+ 'sort_budget_cost' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'budget_cost',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uibudget.index',
+
'district_id'
=>$this->district_id,
+
'year' =>$this->year,
+
'period' =>$this->period,
+
'grouping'
=>$this->grouping,
+
'revision'
=>$this->revision,
+
'allrows'=>$this->allrows)
+
)),
+ );
+
+
if($acl_add)
{
$table_add = array
(
- 'lang_add'
=> lang('add'),
+ 'lang_add' => lang('add'),
'lang_add_statustext' => lang('add a
budget query'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.edit')
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.edit')
);
}
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uibudget.index',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->filter,
- 'query'
=>$this->query
+ 'sort' =>$this->sort,
+ 'order' =>$this->order,
+ 'cat_id' =>$this->cat_id,
+ 'filter' =>$this->filter,
+ 'query' =>$this->query,
+ 'district_id'
=>$this->district_id,
+ 'year' =>$this->year,
+ 'grouping'
=>$this->grouping,
+ 'revision'
=>$this->revision
);
if(!$this->allrows)
@@ -374,35 +450,79 @@
$record_limit = $this->bo->total_records;
}
+
$msgbox_data = $this->bocommon->msgbox_data($receipt);
$data = array
(
+ 'sum'
=> $sum,
+ 'lang_sum'
=> lang('sum'),
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'links'
=> $links,
+ 'links'
=> $links,
'allow_allrows'
=> true,
- 'allrows'
=> $this->allrows,
+ 'allrows'
=> $this->allrows,
'start_record'
=> $this->start,
'record_limit'
=> $record_limit,
'num_records'
=> count($list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
- 'lang_searchbutton_statustext' => lang('Submit
the search string'),
- 'query'
=> $this->query,
+ 'lang_searchfield_statustext'
=> lang('Enter the search string. To show all entries, empty this field and
press the SUBMIT button again'),
+ 'lang_searchbutton_statustext'
=> lang('Submit the search string'),
+ 'query'
=> $this->query,
'lang_search'
=> lang('search'),
- 'table_header'
=> $table_header,
- 'values'
=> $content,
- 'table_add'
=> $table_add
+ 'table_header_budget'
=> $table_header,
+ 'values_budget'
=> $content,
+ 'table_add'
=> $table_add,
+ 'district_list'
=> $this->bocommon->select_district_list('filter',$this->district_id),
+ 'lang_no_district'
=> lang('no district'),
+ 'lang_district_statustext' =>
lang('Select the district the selection belongs to. To do not use a district
select NO DISTRICT'),
+ 'select_district_name' =>
'district_id',
+
+ 'year_list' =>
$this->bo->get_year_filter_list($this->year),
+ 'lang_no_year' =>
lang('no year'),
+ 'lang_year_statustext' =>
lang('Select the year the selection belongs to'),
+
+ 'grouping_list' =>
$this->bo->get_grouping_filter_list($this->grouping),
+ 'lang_no_grouping' =>
lang('no grouping'),
+ 'lang_grouping_statustext' =>
lang('Select the grouping the selection belongs to'),
+
+ 'revision_list' =>
$this->bo->get_revision_filter_list($this->revision),
+ 'lang_no_revision' =>
lang('no revision'),
+ 'lang_revision_statustext' =>
lang('Select the revision the selection belongs to'),
+
);
+
+
+
$this->save_sessiondata();
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('budget') . ': ' . lang('list budget');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
}
+ function obligations()
+ {
+ $acl2_location = '.budget.obligations';
+ $acl_read = $this->acl2->check($acl2_location,1);
+ $acl_add = $this->acl2->check($acl2_location,2);
+ $acl_edit = $this->acl2->check($acl2_location,4);
+ $acl_delete = $this->acl2->check($acl2_location,8);
+
+ if(!$acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $acl2_location);
+ }
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('budget',
+
'menu',
+
'receipt',
+
'search_field',
+
'nextmatchs'));
+
+ }
+
function edit()
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uibudget.inc.php class.menu....,
Sigurd Nes <=