[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: |
Thu, 20 Apr 2006 13:56:11 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/20 13:56:11
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.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uibudget.inc.php.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: property/inc/class.sobudget.inc.php
diff -u property/inc/class.sobudget.inc.php:1.10
property/inc/class.sobudget.inc.php:1.11
--- property/inc/class.sobudget.inc.php:1.10 Thu Apr 20 09:07:43 2006
+++ property/inc/class.sobudget.inc.php Thu Apr 20 13:56:10 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.10 2006/04/20 09:07:43
sigurdne Exp $
+ * @version $Id: class.sobudget.inc.php,v 1.11 2006/04/20 13:56:10
sigurdne Exp $
*/
/**
@@ -424,7 +424,11 @@
{
$table = $basis?'fm_budget_basis':'fm_budget';
- $sql = "SELECT revision FROM $table where year =" .
(int)$year;
+ if(!$year)
+ {
+ $year = date("Y");
+ }
+ $sql = "SELECT revision FROM $table where year =" .
(int)$year . " GROUP BY revision";
$this->db->query($sql,__LINE__,__FILE__);
while ($this->db->next_record())
@@ -441,8 +445,14 @@
$revision_list[] = array
(
- 'id' => $i+1,
- 'name' => $i+1
+ 'id' => $i++,
+ 'name' => $i
+ );
+
+ $revision_list[] = array
+ (
+ 'id' => $i++,
+ 'name' => $i
);
return $revision_list;
@@ -604,9 +614,17 @@
}
+ $this->db->query("SELECT id FROM fm_b_account
where category=" . (int)$basis['b_group'],__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ $b_account[] = $this->db->f('id');
+ }
+
$sql = "DELETE FROM fm_budget WHERE year = " .
(int)$basis['year']
. " AND district_id = " .
(int)$basis['district_id']
- . " AND revision = " .
(int)$basis['revision'];
+ . " AND revision = " .
(int)$basis['revision']
+ . " AND b_account_id in (" .
implode(",",$b_account) . ")";
+
$this->db->query($sql,__LINE__,__FILE__);
if(is_array($budget))
Index: property/inc/class.uibudget.inc.php
diff -u property/inc/class.uibudget.inc.php:1.8
property/inc/class.uibudget.inc.php:1.9
--- property/inc/class.uibudget.inc.php:1.8 Thu Apr 20 09:07:43 2006
+++ property/inc/class.uibudget.inc.php Thu Apr 20 13:56:11 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.8 2006/04/20 09:07:43
sigurdne Exp $
+ * @version $Id: class.uibudget.inc.php,v 1.9 2006/04/20 13:56:11
sigurdne Exp $
*/
/**
@@ -180,7 +180,7 @@
'sort_grouping' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
-
'var' => 'grouping',
+
'var' => 'category',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uibudget.index',
'district_id'
=>$this->district_id,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.sobudget.inc.php class.uibud...,
Sigurd Nes <=