[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.bobudget.inc.php inc/class.m...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.bobudget.inc.php inc/class.m... |
Date: |
Mon, 10 Apr 2006 14:36:42 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/10 14:36:42
Modified files:
inc : class.bobudget.inc.php class.menu.inc.php
class.sobudget.inc.php class.uibudget.inc.php
setup : tables_current.inc.php tables_update.inc.php
templates/base : budget.xsl
Log message:
budget module
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.bobudget.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.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sobudget.inc.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uibudget.inc.php.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/setup/tables_current.inc.php.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/setup/tables_update.inc.php.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/templates/base/budget.xsl.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: property/inc/class.bobudget.inc.php
diff -u property/inc/class.bobudget.inc.php:1.3
property/inc/class.bobudget.inc.php:1.4
--- property/inc/class.bobudget.inc.php:1.3 Fri Apr 7 13:28:02 2006
+++ property/inc/class.bobudget.inc.php Mon Apr 10 14:36:42 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.bobudget.inc.php,v 1.3 2006/04/07 13:28:02
sigurdne Exp $
+ * @version $Id: class.bobudget.inc.php,v 1.4 2006/04/10 14:36:42
sigurdne Exp $
*/
/**
@@ -161,11 +161,32 @@
return $budget;
}
+ function read_basis()
+ {
+ $budget = $this->so->read_basis(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
+ 'filter' =>
$this->filter,'cat_id' => $this->cat_id,'allrows'=>$this->allrows,
+ 'district_id' =>
$this->district_id,'year' => $this->year,'grouping' =>
$this->grouping,'revision' => $this->revision,));
+
+ $this->total_records = $this->so->total_records;
+
+ for ($i=0; $i<count($budget); $i++)
+ {
+ $budget[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($budget[$i]['entry_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+ }
+ return $budget;
+ }
+
+
function read_single($budget_id)
{
return $this->so->read_single($budget_id);
}
+ function read_single_basis($budget_id)
+ {
+ return $this->so->read_single_basis($budget_id);
+ }
+
function read_budget_name($budget_id)
{
return $this->so->read_budget_name($budget_id);
@@ -189,6 +210,25 @@
return $receipt;
}
+
+ function save_basis($budget)
+ {
+
+ if ($budget['budget_id'])
+ {
+ if ($budget['budget_id'] != 0)
+ {
+ $budget_id = $budget['budget_id'];
+ $receipt=$this->so->edit_basis($budget);
+ }
+ }
+ else
+ {
+ $receipt = $this->so->add_basis($budget);
+ }
+ return $receipt;
+ }
+
function delete($params)
{
if (is_array($params))
@@ -201,54 +241,48 @@
}
}
- function resort($data)
+ function delete_basis($params)
{
- $this->so->resort($data);
- }
-
-
- function read_budget($budget_id,$allrows='')
- {
- if($allrows)
+ if (is_array($params))
{
- $this->allrows=$allrows;
+ $this->so->delete_basis($params[0]);
+ }
+ else
+ {
+ $this->so->delete_basis($params);
}
- $budget = $this->so->read_budget(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
-
'filter' => $this->filter,'budget_id' =>
$budget_id,'allrows'=>$this->allrows));
- $this->uicols = $this->so->uicols;
- $this->total_records = $this->so->total_records;
- return $budget;
}
-
+
+
function get_b_group_list($selected ='')
{
$b_group_list = $this->so->get_b_group_list();
return
$this->bocommon->select_list($selected,$b_group_list);
}
- function get_revision_list($selected ='',$year='')
+ function get_revision_list($selected ='',$year='',$basis = '')
{
- $revision_list = $this->so->get_revision_list($year);
+ $revision_list =
$this->so->get_revision_list($year,$basis);
return
$this->bocommon->select_list($selected,$revision_list);
}
- function get_year_filter_list($selected ='')
+ function get_year_filter_list($selected ='',$basis = '')
{
if(!isset($_GET['year']))
{
$selected = date(Y);
}
- $year_list = $this->so->get_year_filter_list();
+ $year_list = $this->so->get_year_filter_list($basis);
return
$this->bocommon->select_list($selected,$year_list);
}
- function get_revision_filter_list($selected ='')
+ function get_revision_filter_list($selected ='',$basis = '')
{
if(!isset($_GET['year']))
{
$year =
(isset($GET['year'])?$this->year:date(Y));
$this->year = $year;
- $selected = $this->so->get_max_revision($year);
+ $selected =
$this->so->get_max_revision($year,$basis);
$this->revision = $selected;
}
else
@@ -256,12 +290,12 @@
$year = $this->year;
}
- $revision_list =
$this->so->get_revision_filter_list($year);
+ $revision_list =
$this->so->get_revision_filter_list($year,$basis);
return
$this->bocommon->select_list($selected,$revision_list);
}
- function get_grouping_filter_list($selected ='')
+ function get_grouping_filter_list($selected ='',$basis = '')
{
if(!isset($_GET['year']))
{
@@ -271,25 +305,9 @@
{
$year = $this->year;
}
- $grouping_list =
$this->so->get_grouping_filter_list($year);
+ $grouping_list =
$this->so->get_grouping_filter_list($year,$basis);
return
$this->bocommon->select_list($selected,$grouping_list);
}
-/*
- 'period_list' =>
$this->bo->get_period_filter_list($this->period),
- 'lang_no_period' =>
lang('no period'),
- 'lang_year_statustext' =>
lang('Select the period the selection belongs to'),
-
- 'grouping_list' =>
$this->bo->get_grouping_filter_list($this->grouping),
- 'lang_no_grouping' =>
lang('no year'),
- 'lang_grouping_statustext' =>
lang('Select the year 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'),
-
-
-*/
-
}
?>
Index: property/inc/class.menu.inc.php
diff -u property/inc/class.menu.inc.php:1.21
property/inc/class.menu.inc.php:1.22
--- property/inc/class.menu.inc.php:1.21 Sun Apr 9 21:23:20 2006
+++ property/inc/class.menu.inc.php Mon Apr 10 14:36:42 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.21 2006/04/09 21:23:20 sigurdne
Exp $
+ * @version $Id: class.menu.inc.php,v 1.22 2006/04/10 14:36:42 sigurdne
Exp $
*/
/**
@@ -470,22 +470,22 @@
if ($sub == 'budget')
{
$i++;
- if($page=='budget')
+ if($page=='budget.basis')
{
$menu['sub_menu'][$i]['this']=True;
}
- $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uibudget.index');
- $menu['sub_menu'][$i]['name']
= lang('budget');
- $menu['sub_menu'][$i]['statustext']
= lang('budget');
+ $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=='budget.basis')
+ if($page=='budget')
{
$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');
+ $menu['sub_menu'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uibudget.index');
+ $menu['sub_menu'][$i]['name']
= lang('budget');
+ $menu['sub_menu'][$i]['statustext']
= lang('budget');
$i++;
if($page=='obligations')
Index: property/inc/class.sobudget.inc.php
diff -u property/inc/class.sobudget.inc.php:1.3
property/inc/class.sobudget.inc.php:1.4
--- property/inc/class.sobudget.inc.php:1.3 Fri Apr 7 13:28:02 2006
+++ property/inc/class.sobudget.inc.php Mon Apr 10 14:36:42 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.3 2006/04/07 13:28:02
sigurdne Exp $
+ * @version $Id: class.sobudget.inc.php,v 1.4 2006/04/10 14:36:42
sigurdne Exp $
*/
/**
@@ -41,7 +41,6 @@
$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);
$allrows =
(isset($data['allrows'])?$data['allrows']:'');
$district_id =
(isset($data['district_id'])?$data['district_id']:'');
$year = (isset($data['year'])?$data['year']:'');
@@ -60,12 +59,6 @@
$where = 'WHERE';
- if ($cat_id > 0)
- {
- $filtermethod .= " $where category='$cat_id' ";
- $where = 'AND';
-
- }
if ($district_id > 0)
{
@@ -134,9 +127,102 @@
return $budget;
}
- function read_single($budget_id)
+ function read_basis($data)
{
- $this->db->query("select * from fm_budget where
id='$budget_id'",__LINE__,__FILE__);
+ if(is_array($data))
+ {
+ $start =
(isset($data['start'])?$data['start']:0);
+ $filter =
(isset($data['filter'])?$data['filter']:'none');
+ $query =
(isset($data['query'])?$data['query']:'');
+ $sort =
(isset($data['sort'])?$data['sort']:'DESC');
+ $order =
(isset($data['order'])?$data['order']:'');
+ $allrows =
(isset($data['allrows'])?$data['allrows']:'');
+ $district_id =
(isset($data['district_id'])?$data['district_id']:'');
+ $year = (isset($data['year'])?$data['year']:'');
+ $grouping =
(isset($data['grouping'])?$data['grouping']:'');
+ $revision =
(isset($data['revision'])?$data['revision']:'');
+ }
+
+ if ($order)
+ {
+ $ordermethod = " order by $order $sort";
+ }
+ else
+ {
+ $ordermethod = ' order by id DESC';
+ }
+
+
+ $where = 'WHERE';
+
+ if ($district_id > 0)
+ {
+ $filtermethod .= " $where
district_id='$district_id' ";
+ $where = 'AND';
+
+ }
+ if ($year > 0)
+ {
+ $filtermethod .= " $where year='$year' ";
+ $where = 'AND';
+
+ }
+ if ($grouping > 0)
+ {
+ $filtermethod .= " $where b_group='$grouping' ";
+ $where = 'AND';
+
+ }
+ if ($revision > 0)
+ {
+ $filtermethod .= " $where revision='$revision'
";
+ $where = 'AND';
+
+ }
+
+ if($query)
+ {
+ $query = ereg_replace("'",'',$query);
+ $query = ereg_replace('"','',$query);
+
+ $querymethod = " $where ( descr $this->like
'%$query%')";
+ }
+
+
+ $sql = "SELECT * FROM fm_budget_basis $filtermethod
$querymethod";
+
+ $this->db2->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db2->num_rows();
+
+ if(!$allrows)
+ {
+ $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ }
+ else
+ {
+ $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
+ }
+
+ while ($this->db->next_record())
+ {
+ $budget[] = array
+ (
+ 'budget_id' =>
$this->db->f('id'),
+ 'year' =>
$this->db->f('year'),
+ 'grouping' =>
$this->db->f('b_group'),
+ 'district_id' =>
$this->db->f('district_id'),
+ 'revision' =>
$this->db->f('revision'),
+ 'budget_cost' =>
$this->db->f('budget_cost'),
+ 'entry_date' =>
$this->db->f('entry_date'),
+ 'user' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('user_id'))
+ );
+ }
+ return $budget;
+ }
+
+ function read_single_basis($budget_id)
+ {
+ $this->db->query("select * from fm_budget_basis where
id='$budget_id'",__LINE__,__FILE__);
if ($this->db->next_record())
{
@@ -144,7 +230,7 @@
$budget['year'] =
$this->db->f('year');
$budget['district_id'] =
$this->db->f('district_id');
$budget['revision'] =
$this->db->f('revision');
- $budget['b_account_id'] =
$this->db->f('b_account_id');
+ $budget['b_group'] =
$this->db->f('b_group');
$budget['remark'] =
stripslashes($this->db->f('remark'));
$budget['budget_cost'] =
$this->db->f('budget_cost');
$budget['entry_date'] =
$this->db->f('entry_date');
@@ -153,16 +239,17 @@
return $budget;
}
- function add($budget)
+
+ function add_basis($budget)
{
$budget['remark'] =
$this->db->db_addslashes($budget['remark']);
$this->db->transaction_begin();
- $id = $this->bocommon->next_id('fm_budget');
+ $id = $this->bocommon->next_id('fm_budget_basis');
- $this->db->query("INSERT INTO fm_budget
(id,entry_date,remark,user_id,year,revision,district_id,b_account_id,budget_cost)"
- . "VALUES ($id,'" . time() . "','" .
$budget['remark'] . "'," . $this->account . "," . $budget['year'] . "," .
$budget['revision'] . "," . $budget['district_id'] . "," .
$budget['b_account_id'] . "," . $budget['budget_cost'] . ")",__LINE__,__FILE__);
+ $this->db->query("INSERT INTO fm_budget_basis
(id,entry_date,remark,user_id,year,revision,district_id,b_group,budget_cost)"
+ . "VALUES ($id,'" . time() . "','" .
$budget['remark'] . "'," . $this->account . "," . $budget['year'] . "," .
$budget['revision'] . "," . $budget['district_id'] . "," . $budget['b_group'] .
"," . $budget['budget_cost'] . ")",__LINE__,__FILE__);
$receipt['budget_id']= $id;
@@ -173,7 +260,7 @@
return $receipt;
}
- function edit($budget)
+ function edit_basis($budget)
{
$budget['remark'] =
$this->db->db_addslashes($budget['remark']);
@@ -184,53 +271,58 @@
return $receipt;
}
- function read_budget($data)
+
+
+ function read_single($budget_id)
{
- if(is_array($data))
+ $this->db->query("select * from fm_budget where
id='$budget_id'",__LINE__,__FILE__);
+
+ if ($this->db->next_record())
{
- $start =
(isset($data['start'])?$data['start']:0);
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $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);
- $allrows =
(isset($data['allrows'])?$data['allrows']:'');
- $budget_id =
(isset($data['budget_id'])?$data['budget_id']:'');
+ $budget['id'] =
(int)$this->db->f('id');
+ $budget['year'] =
$this->db->f('year');
+ $budget['district_id'] =
$this->db->f('district_id');
+ $budget['revision'] =
$this->db->f('revision');
+ $budget['b_account_id'] =
$this->db->f('b_account_id');
+ $budget['remark'] =
stripslashes($this->db->f('remark'));
+ $budget['budget_cost'] =
$this->db->f('budget_cost');
+ $budget['entry_date'] =
$this->db->f('entry_date');
}
- $this->db->query("select sql_text from fm_budget where
id='$budget_id'",__LINE__,__FILE__);
- $this->db->next_record();
- $sql = stripslashes($this->db->f('sql_text'));
+ return $budget;
+ }
- $uicols = $this->read_cols($budget_id);
- $this->uicols = $uicols;
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
- if(!$allrows)
- {
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
- }
- else
- {
- $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
- }
+ function add($budget)
+ {
+ $budget['remark'] =
$this->db->db_addslashes($budget['remark']);
- $n=count($uicols);
- $j=0;
- while ($this->db->next_record())
- {
- for ($i=0;$i<$n;$i++)
- {
- $budget[$j][$uicols[$i]['name']] =
$this->db->f($uicols[$i]['name']);
- $budget[$j]['grants'] =
(int)$grants[$this->db->f('user_id')];
- }
- $j++;
- }
+ $this->db->transaction_begin();
-//_debug_array($budget);
- return $budget;
+ $id = $this->bocommon->next_id('fm_budget');
+
+ $this->db->query("INSERT INTO fm_budget
(id,entry_date,remark,user_id,year,revision,district_id,b_account_id,budget_cost)"
+ . "VALUES ($id,'" . time() . "','" .
$budget['remark'] . "'," . $this->account . "," . $budget['year'] . "," .
$budget['revision'] . "," . $budget['district_id'] . "," .
$budget['b_account_id'] . "," . $budget['budget_cost'] . ")",__LINE__,__FILE__);
+
+ $receipt['budget_id']= $id;
+
+
+ $this->db->transaction_commit();
+
+ $receipt['message'][] = array('msg'=>lang('budget %1
has been saved',$receipt['budget_id']));
+ return $receipt;
+ }
+
+ function edit($budget)
+ {
+ $budget['remark'] =
$this->db->db_addslashes($budget['remark']);
+
+ $this->db->query("UPDATE fm_budget set remark='" .
$budget['remark'] . "', entry_date='" . time() . "', budget_cost='" .
$budget['budget_cost'] . "' WHERE id=" .
intval($budget['budget_id']),__LINE__,__FILE__);
+
+ $receipt['budget_id']= $budget['budget_id'];
+ $receipt['message'][] = array('msg'=>lang('budget %1
has been edited',$budget['budget_id']));
+ return $receipt;
}
function get_b_group_list()
@@ -250,9 +342,11 @@
return $group_list;
}
- function get_revision_list($year='')
+ function get_revision_list($year='',$basis = '')
{
- $sql = "SELECT revision FROM fm_budget where year =" .
(int)$year;
+ $table = $basis?'fm_budget_basis':'fm_budget';
+
+ $sql = "SELECT revision FROM $table where year =" .
(int)$year;
$this->db->query($sql);
while ($this->db->next_record())
@@ -276,9 +370,10 @@
return $revision_list;
}
- function get_year_filter_list()
+ function get_year_filter_list($basis = '')
{
- $sql = "SELECT year FROM fm_budget group by year";
+ $table = $basis?'fm_budget_basis':'fm_budget';
+ $sql = "SELECT year FROM $table group by year";
$this->db->query($sql);
while ($this->db->next_record())
@@ -292,18 +387,20 @@
return $year_list;
}
- function get_max_revision($year ='')
+ function get_max_revision($year ='',$basis = '')
{
- $sql = "SELECT max(revision) as revision FROM fm_budget
WHERE year =". (int)$year;
+ $table = $basis?'fm_budget_basis':'fm_budget';
+ $sql = "SELECT max(revision) as revision FROM $table
WHERE year =". (int)$year;
$this->db->query($sql);
$this->db->next_record();
return $this->db->f('revision');
}
- function get_revision_filter_list($year ='')
+ function get_revision_filter_list($year ='',$basis = '')
{
- $sql = "SELECT revision FROM fm_budget WHERE year =".
(int)$year . " group by revision";
+ $table = $basis?'fm_budget_basis':'fm_budget';
+ $sql = "SELECT revision FROM $table WHERE year =".
(int)$year . " group by revision";
$this->db->query($sql);
while ($this->db->next_record())
@@ -317,9 +414,17 @@
return $revision_list;
}
- function get_grouping_filter_list($year ='')
+ function get_grouping_filter_list($year ='',$basis = '')
{
- $sql = "SELECT grouping FROM fm_budget $this->join
fm_b_account ON fm_budget.b_account_id = fm_b_account.id WHERE year =".
(int)$year . " group by grouping";
+ if($basis)
+ {
+ $sql = "SELECT b_group as grouping FROM
fm_budget_basis WHERE year =". (int)$year;
+ }
+ else
+ {
+ $sql = "SELECT grouping FROM fm_budget
$this->join fm_b_account ON fm_budget.b_account_id = fm_b_account.id WHERE year
=". (int)$year . " group by grouping";
+ }
+
$this->db->query($sql);
while ($this->db->next_record())
@@ -337,5 +442,11 @@
{
$this->db->query('DELETE FROM fm_budget WHERE id=' .
intval($budget_id),__LINE__,__FILE__);
}
+
+ function delete_basis($budget_id)
+ {
+ $this->db->query('DELETE FROM fm_budget_basis WHERE
id=' . intval($budget_id),__LINE__,__FILE__);
+ }
+
}
?>
Index: property/inc/class.uibudget.inc.php
diff -u property/inc/class.uibudget.inc.php:1.4
property/inc/class.uibudget.inc.php:1.5
--- property/inc/class.uibudget.inc.php:1.4 Sun Apr 9 21:23:20 2006
+++ property/inc/class.uibudget.inc.php Mon Apr 10 14:36:42 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.4 2006/04/09 21:23:20
sigurdne Exp $
+ * @version $Id: class.uibudget.inc.php,v 1.5 2006/04/10 14:36:42
sigurdne Exp $
*/
/**
@@ -33,8 +33,10 @@
'obligations' => True,
'view' => True,
'edit' => True,
+ 'edit_basis' => True,
'excel' => True,
- 'delete' => True
+ 'delete' => True,
+ 'delete_basis' => True
);
function uibudget()
@@ -299,7 +301,7 @@
$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
+ $revision_list =
$this->bo->get_revision_filter_list($this->revision,$basis=true); // reset year
$this->year = $this->bo->year;
$this->revision = $this->bo->revision;
@@ -316,10 +318,10 @@
$links = $this->menu->links('budget.basis');
- $receipt =
$GLOBALS['phpgw']->session->appsession('session_data','budget_receipt');
+ $receipt =
$GLOBALS['phpgw']->session->appsession('session_basis_data','budget_receipt');
$GLOBALS['phpgw']->session->appsession('session_data','budget_receipt','');
- $list = $this->bo->read();
+ $list = $this->bo->read_basis();
if (isset($list) AND is_array($list))
{
$sum = 0;
@@ -329,14 +331,12 @@
$content[] = array
(
'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']),
+ 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.edit_basis&budget_id='
. $entry['budget_id']),
+ 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.delete_basis&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'),
@@ -350,8 +350,6 @@
(
'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'),
@@ -423,13 +421,13 @@
(
'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_basis')
);
}
$link_data = array
(
- 'menuaction' =>
$this->currentapp.'.uibudget.index',
+ 'menuaction' =>
$this->currentapp.'.uibudget.basis',
'sort' =>$this->sort,
'order' =>$this->order,
'cat_id' =>$this->cat_id,
@@ -472,34 +470,32 @@
'lang_searchbutton_statustext'
=> lang('Submit the search string'),
'query'
=> $this->query,
'lang_search'
=> lang('search'),
- 'table_header_budget'
=> $table_header,
- 'values_budget'
=> $content,
+ 'table_header_budget_basis'
=> $table_header,
+ 'values_budget_basis'
=> $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),
+ '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'),
- 'grouping_list' =>
$this->bo->get_grouping_filter_list($this->grouping),
+ 'grouping_list' =>
$this->bo->get_grouping_filter_list($this->grouping,$basis=true),
'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),
+ 'revision_list' =>
$revision_list,
'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));
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_basis' => $data));
}
function obligations()
@@ -668,7 +664,143 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('budget') . ': ' . ($budget_id?lang('edit budget'):lang('add budget'));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
+
+ }
+
+ function edit_basis()
+ {
+
+ $acl2_location = '.budget';
+ $acl_add = $this->acl2->check($acl2_location,2);
+ $acl_edit = $this->acl2->check($acl2_location,4);
+
+ if(!$acl_add && !$acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=2&acl_location='
. $acl2_location);
+ }
+
+ $budget_id =
get_var('budget_id',array('POST','GET'));
+
+ $values = get_var('values',array('POST'));
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('budget'));
+
+ if ($values['save'] || $values['apply'])
+ {
+ if(!$values['b_group'] && !$budget_id)
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select a budget group !'));
+ }
+
+
+ if(!$values['district_id'] && !$budget_id)
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select a district !'));
+ }
+
+ if(!$values['budget_cost'])
+ {
+
$receipt['error'][]=array('msg'=>lang('Please enter a budget cost !'));
+ }
+
+ if(!$receipt['error'])
+ {
+ $values['budget_id'] = $budget_id;
+ $receipt =
$this->bo->save_basis($values);
+ $budget_id = $receipt['budget_id'];
+
+ if ($values['save'])
+ {
+
$GLOBALS['phpgw']->session->appsession('session_data','budget_basis_receipt',$receipt);
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uibudget.basis');
+ }
+ }
+ else
+ {
+ $year_selected = $values['year'];
+ $district_id = $values['district_id'];
+ $revision = $values['revision'];
+ $b_group = $values['b_group'];
+
+ unset ($values['year']);
+ unset ($values['district_id']);
+ unset ($values['revision']);
+ unset ($values['b_group']);
+ }
+ }
+
+ if ($values['cancel'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uibudget.basis');
+ }
+
+
+ if ($budget_id)
+ {
+ $values =
$this->bo->read_single_basis($budget_id);
+ }
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uibudget.edit_basis',
+ 'budget_id' => $budget_id
+ );
+
+ $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+ $year[0]['id'] = date(Y);
+ $year[1]['id'] = date(Y) +1;
+ $year[2]['id'] = date(Y) +2;
+ $year[3]['id'] = date(Y) +3;
+
+ $data = array
+ (
+ 'lang_revision' =>
lang('revision'),
+ 'lang_revision_statustext' =>
lang('Select revision'),
+ 'revision_list' =>
$this->bo->get_revision_list($revision),
+
+ 'lang_b_group' =>
lang('budget group'),
+ 'lang_b_group_statustext' =>
lang('Select budget group'),
+ 'b_group_list' =>
$this->bo->get_b_group_list($b_group),
+
+ 'lang_year' =>
lang('year'),
+ 'lang_year_statustext' =>
lang('Budget year'),
+ 'year' =>
$this->bocommon->select_list($year_selected,$year),
+
+ 'lang_district' =>
lang('District'),
+ 'lang_no_district' =>
lang('no district'),
+ 'lang_district_statustext' =>
lang('Select the district'),
+ 'select_district_name' =>
'values[district_id]',
+ 'district_list' =>
$this->bocommon->select_district_list('select',$district_id),
+
+ 'value_year' =>
$values['year'],
+ 'value_district_id' =>
$values['district_id'],
+ 'value_b_group' =>
$values['b_group'],
+ 'value_revision' =>
$values['revision'],
+
+ 'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+ 'edit_url' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'lang_budget_id' =>
lang('ID'),
+ 'value_budget_id' =>
$budget_id,
+ 'lang_budget_cost' =>
lang('budget cost'),
+ 'lang_remark' =>
lang('remark'),
+ 'lang_save' =>
lang('save'),
+ 'lang_cancel' =>
lang('cancel'),
+ 'lang_apply' =>
lang('apply'),
+ 'value_remark' =>
$values['remark'],
+ 'value_budget_cost' =>
$values['budget_cost'],
+ 'lang_name_statustext' =>
lang('Enter a name for the query'),
+ 'lang_remark_statustext' =>
lang('Enter a remark'),
+ 'lang_apply_statustext' =>
lang('Apply the values'),
+ 'lang_cancel_statustext' =>
lang('Leave the budget untouched and return to the list'),
+ 'lang_save_statustext' =>
lang('Save the budget and return to the list'),
+
+
+ );
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('budget') . ': ' . ($budget_id?lang('edit budget'):lang('add budget'));
+
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_basis' => $data));
+
}
@@ -707,7 +839,45 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
+
+ }
+
+ function delete_basis()
+ {
+ $budget_id =
get_var('budget_id',array('POST','GET'));
+ $delete = get_var('delete',array('POST'));
+ $confirm = get_var('confirm',array('POST'));
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uibudget.basis'
+ );
+
+ if (get_var('confirm',array('POST')))
+ {
+ $this->bo->delete_basis($budget_id);
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
+
$GLOBALS['phpgw']->xslttpl->add_file(array('app_delete'));
+
+ $data = array
+ (
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibudget.delete_basis&budget_id='
. $budget_id),
+ 'lang_confirm_msg' => lang('do you
really want to delete this entry'),
+ 'lang_yes' => lang('yes'),
+ 'lang_yes_statustext' => lang('Delete the
entry'),
+ 'lang_no_statustext' => lang('Back to the
list'),
+ 'lang_no' =>
lang('no')
+ );
+
+ $appname =
lang('budget');
+ $function_msg =
lang('delete budget');
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
+
}
Index: property/setup/tables_current.inc.php
diff -u property/setup/tables_current.inc.php:1.53
property/setup/tables_current.inc.php:1.54
--- property/setup/tables_current.inc.php:1.53 Fri Apr 7 13:27:49 2006
+++ property/setup/tables_current.inc.php Mon Apr 10 14:36:42 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage setup
- * @version $Id: tables_current.inc.php,v 1.53 2006/04/07 13:27:49
sigurdne Exp $
+ * @version $Id: tables_current.inc.php,v 1.54 2006/04/10 14:36:42
sigurdne Exp $
*/
$phpgw_baseline = array(
@@ -2156,11 +2156,11 @@
'ix' => array(),
'uc' => array()
),
- 'fm_budget' => array(
+ 'fm_budget_basis' => array(
'fd' => array(
'id' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
'year' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
- 'b_account_id' => array('type' =>
'varchar','precision' => '4','nullable' => False),
+ 'b_group' => array('type' =>
'varchar','precision' => '4','nullable' => False),
'district_id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
'revision' => array('type' => 'int',
'precision' => 4,'nullable' => False),
'access' => array('type' =>
'varchar','precision' => '7','nullable' => True),
@@ -2174,6 +2174,25 @@
'ix' => array(),
'uc' => array('year','b_group','district_id','revision')
),
+ ,
+ 'fm_budget' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
+ 'year' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
+ 'b_account_id' => array('type' =>
'varchar','precision' => '20','nullable' => False),
+ 'district_id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'revision' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'access' => array('type' =>
'varchar','precision' => '7','nullable' => True),
+ 'user_id' => array('type' => 'int', 'precision'
=> 4,'nullable' => True),
+ 'entry_date' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'budget_cost' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'remark' => array('type' => 'text','nullable'
=> True)
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(),
+ 'ix' => array(),
+ 'uc' =>
array('year','b_account_id','district_id','revision')
+ ),
'fm_budget_period' => array(
'fd' => array(
'year' => array('type' => 'int', 'precision' =>
4,'nullable' => False),
Index: property/setup/tables_update.inc.php
diff -u property/setup/tables_update.inc.php:1.38
property/setup/tables_update.inc.php:1.39
--- property/setup/tables_update.inc.php:1.38 Fri Apr 7 13:27:49 2006
+++ property/setup/tables_update.inc.php Mon Apr 10 14:36:42 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage setup
- * @version $Id: tables_update.inc.php,v 1.38 2006/04/07 13:27:49
sigurdne Exp $
+ * @version $Id: tables_update.inc.php,v 1.39 2006/04/10 14:36:42
sigurdne Exp $
*/
/**
@@ -1099,6 +1099,26 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_acl_location (id, descr) VALUES ('.budget.obligations', 'Obligations')");
$GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'fm_budget_basis', array(
+ 'fd' => array(
+ 'id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'year' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'b_group' => array('type' =>
'varchar','precision' => '4','nullable' => False),
+ 'district_id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'revision' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'access' => array('type' =>
'varchar','precision' => '7','nullable' => True),
+ 'user_id' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'entry_date' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'budget_cost' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'remark' => array('type' =>
'text','nullable' => True)
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(),
+ 'ix' => array(),
+ 'uc' =>
array('year','b_group','district_id','revision')
+ )
+ );
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
'fm_budget', array(
'fd' => array(
'id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
Index: property/templates/base/budget.xsl
diff -u property/templates/base/budget.xsl:1.4
property/templates/base/budget.xsl:1.5
--- property/templates/base/budget.xsl:1.4 Mon Apr 10 09:39:13 2006
+++ property/templates/base/budget.xsl Mon Apr 10 14:36:42 2006
@@ -6,12 +6,157 @@
<xsl:when test="view">
<xsl:apply-templates select="view"/>
</xsl:when>
+ <xsl:when test="list_basis">
+ <xsl:apply-templates select="list_basis"/>
+ </xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="list"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+ <xsl:template match="list_basis">
+ <xsl:call-template name="menu"/>
+ <table width="100%" cellpadding="2" cellspacing="2"
align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <tr>
+ <td align="left" colspan="3">
+ <xsl:call-template
name="msgbox"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <tr>
+ <td align="left">
+ <xsl:call-template name="filter_year"/>
+ </td>
+
+ <td align="left">
+ <xsl:call-template
name="filter_revision"/>
+ </td>
+
+ <td align="left">
+ <xsl:call-template
name="filter_district"/>
+ </td>
+
+ <td align="left">
+ <xsl:call-template
name="filter_grouping"/>
+ </td>
+
+ <td align="right">
+ <xsl:call-template name="search_field"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8" width="100%">
+ <xsl:call-template name="nextmatchs"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="2" cellspacing="2"
align="center">
+ <xsl:apply-templates
select="table_header_budget_basis"/>
+ <xsl:apply-templates
select="values_budget_basis"/>
+ <tr>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td class="th_text" align="right">
+ <xsl:value-of select="sum"/>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+
+ </tr>
+ <xsl:apply-templates select="table_add"/>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="table_header_budget_basis">
+ <xsl:variable name="sort_district_id"><xsl:value-of
select="sort_district_id"/></xsl:variable>
+ <xsl:variable name="sort_budget_cost"><xsl:value-of
select="sort_budget_cost"/></xsl:variable>
+ <xsl:variable name="sort_b_account"><xsl:value-of
select="sort_b_account"/></xsl:variable>
+ <xsl:variable name="sort_grouping"><xsl:value-of
select="sort_grouping"/></xsl:variable>
+ <tr class="th">
+ <td class="th_text" width="5%" align="left">
+ <xsl:value-of select="lang_year"/>
+ </td>
+ <td class="th_text" width="5%" align="left">
+ <xsl:value-of select="lang_revision"/>
+ </td>
+ <td class="th_text" width="10%" align="left">
+ <a href="{$sort_grouping}"><xsl:value-of
select="lang_grouping"/></a>
+ </td>
+
+ <td class="th_text" width="10%" align="left">
+ <a href="{$sort_district_id}"><xsl:value-of
select="lang_district_id"/></a>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <a href="{$sort_budget_cost}"><xsl:value-of
select="lang_budget_cost"/></a>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <xsl:value-of select="lang_edit"/>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <xsl:value-of select="lang_delete"/>
+ </td>
+ </tr>
+ </xsl:template>
+
+
+ <xsl:template match="values_budget_basis">
+ <xsl:variable name="lang_edit_text"><xsl:value-of
select="lang_edit_text"/></xsl:variable>
+ <xsl:variable name="lang_delete_text"><xsl:value-of
select="lang_delete_text"/></xsl:variable>
+ <tr>
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="@class">
+ <xsl:value-of
select="@class"/>
+ </xsl:when>
+ <xsl:when test="position() mod
2 = 0">
+
<xsl:text>row_off</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:text>row_on</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <td align="left">
+ <xsl:value-of select="year"/>
+ </td>
+ <td>
+ <xsl:value-of select="revision"/>
+ </td>
+ <td>
+ <xsl:value-of select="grouping"/>
+ </td>
+
+ <td>
+ <xsl:value-of select="district_id"/>
+ </td>
+ <td align = "right">
+ <xsl:value-of select="budget_cost"/>
+ </td>
+
+ <td align="center">
+ <xsl:variable
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
+ <a href="{$link_edit}"
onMouseover="window.status='{$lang_edit_text}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_edit"/></a>
+ </td>
+ <td align="center">
+ <xsl:variable
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
+ <a href="{$link_delete}"
onMouseover="window.status='{$lang_delete_text}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_delete"/></a>
+ </td>
+ </tr>
+ </xsl:template>
+
+
<xsl:template match="list">
<xsl:call-template name="menu"/>
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
@@ -194,6 +339,184 @@
<!-- add / edit -->
+ <xsl:template match="edit_basis">
+ <xsl:variable name="edit_url"><xsl:value-of
select="edit_url"/></xsl:variable>
+ <div align="left">
+ <form name="form" method="post" action="{$edit_url}">
+ <table cellpadding="2" cellspacing="2" width="50%"
align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <tr>
+ <td align="left" colspan="3">
+ <xsl:call-template
name="msgbox"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="value_budget_id!=''">
+ <tr >
+ <td width="25%" align="left">
+ <xsl:value-of
select="lang_budget_id"/>
+ </td>
+ <td width="75%" align="left">
+ <xsl:value-of
select="value_budget_id"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_year"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_year !=''">
+ <td>
+ <xsl:value-of
select="value_year"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_year_statustext"><xsl:value-of
select="lang_year_statustext"/></xsl:variable>
+ <select
name="values[year]" class="forms"
onMouseover="window.status='{$lang_year_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="year"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_revision"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_revision !=''">
+ <td>
+ <xsl:value-of
select="value_revision"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_revision_statustext"><xsl:value-of
select="lang_revision_statustext"/></xsl:variable>
+ <select
name="values[revision]" class="forms"
onMouseover="window.status='{$lang_revision_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="revision_list"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr >
+ <td align="left">
+ <xsl:value-of select="lang_district"/>
+ </td>
+
+ <xsl:choose>
+ <xsl:when test="value_district_id !=''">
+ <td>
+ <xsl:value-of
select="value_district_id"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td align="left">
+ <xsl:call-template
name="select_district"/>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_b_group"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="value_b_group !=''">
+ <td>
+ <xsl:value-of
select="value_b_group"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td valign="top">
+ <xsl:variable
name="lang_b_group_statustext"><xsl:value-of
select="lang_b_group_statustext"/></xsl:variable>
+ <select
name="values[b_group]" class="forms"
onMouseover="window.status='{$lang_b_group_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="b_group_list"/>
+ </select>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tr>
+
+ <tr align="left">
+ <td valign="top">
+ <xsl:value-of
select="lang_budget_cost"/>
+ </td>
+ <td align="left">
+ <input type="text"
name="values[budget_cost]" value="{value_budget_cost}"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_budget_cost_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ <tr align="left">
+ <td valign="top" >
+ <xsl:value-of select="lang_remark"/>
+ </td>
+ <td align="left">
+
+ <textarea cols="60" rows="6"
name="values[remark]" wrap="virtual" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_remark_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of
select="value_remark"/>
+ </textarea>
+ </td>
+ </tr>
+
+ <tr height="50">
+ <td valign="bottom">
+ <xsl:variable
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
+ <input type="submit"
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return
true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_save_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ <td valign="bottom">
+ <xsl:variable
name="lang_apply"><xsl:value-of select="lang_apply"/></xsl:variable>
+ <input type="submit"
name="values[apply]" value="{$lang_apply}" onMouseout="window.status='';return
true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_apply_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ <td align="right" valign="bottom">
+ <xsl:variable
name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
+ <input type="submit"
name="values[cancel]" value="{$lang_cancel}"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_cancel_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ </xsl:template>
+
<xsl:template match="edit">
<xsl:variable name="edit_url"><xsl:value-of
select="edit_url"/></xsl:variable>
<div align="left">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.bobudget.inc.php inc/class.m...,
Sigurd Nes <=