[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uiinvoice.inc.php class.soin...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.uiinvoice.inc.php class.soin... |
Date: |
Tue, 09 May 2006 13:41:25 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/05/09 13:41:25
Modified files:
inc : class.uiinvoice.inc.php class.soinvoice.inc.php
class.sobudget.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uiinvoice.inc.php.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soinvoice.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.17&tr2=1.18&r1=text&r2=text
Patches:
Index: property/inc/class.sobudget.inc.php
diff -u property/inc/class.sobudget.inc.php:1.17
property/inc/class.sobudget.inc.php:1.18
--- property/inc/class.sobudget.inc.php:1.17 Mon May 8 13:12:38 2006
+++ property/inc/class.sobudget.inc.php Tue May 9 13:41:25 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.17 2006/05/08 13:12:38
sigurdne Exp $
+ * @version $Id: class.sobudget.inc.php,v 1.18 2006/05/09 13:41:25
sigurdne Exp $
*/
/**
@@ -522,15 +522,17 @@
}
- $start_date =
date($this->bocommon->dateformat,mktime(2,0,0,1,1,$year));
+ $start_date1 =
date($this->bocommon->dateformat,mktime(2,0,0,3,1,$year));
+ $start_date2 =
date($this->bocommon->dateformat,mktime(2,0,0,1,1,$year));
$end_date =
date($this->bocommon->dateformat,mktime(2,0,0,12,31,$year));
$sql = "SELECT fm_b_account.category as b_group,
district_id, sum(godkjentbelop) as actual_cost FROM fm_ecobilagoverf"
. " $this->join fm_b_account ON
fm_ecobilagoverf.spbudact_code =fm_b_account.id "
. " $this->join fm_location1 ON
fm_ecobilagoverf.loc1 = fm_location1.loc1 "
. " $this->join fm_part_of_town ON
fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id"
- . " WHERE forfallsdato > '$start_date' AND
forfallsdato < '$end_date'"
- . " $filtermethod GROUP BY b_group,
district_id";
+ . " WHERE (forfallsdato > '$start_date1' AND
forfallsdato < '$end_date' $filtermethod)"
+ . " OR (forfallsdato > '$start_date2' AND
forfallsdato < '$end_date' AND periode < 3 $filtermethod)"
+ . " GROUP BY b_group, district_id";
//_debug_array($sql);
$this->db->query($sql,__LINE__,__FILE__);
Index: property/inc/class.soinvoice.inc.php
diff -u property/inc/class.soinvoice.inc.php:1.21
property/inc/class.soinvoice.inc.php:1.22
--- property/inc/class.soinvoice.inc.php:1.21 Tue May 9 09:26:58 2006
+++ property/inc/class.soinvoice.inc.php Tue May 9 13:41:25 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.soinvoice.inc.php,v 1.21 2006/05/09 09:26:58
sigurdne Exp $
+ * @version $Id: class.soinvoice.inc.php,v 1.22 2006/05/09 13:41:25
sigurdne Exp $
*/
/**
@@ -445,7 +445,7 @@
$end_date =
date($this->bocommon->dateformat,mktime(2,0,0,$emonth,$eday,$eyear));
- $where = 'WHERE';
+ $where = 'AND';
if($b_account_class)
{
@@ -490,13 +490,24 @@
$where= 'AND';
}
- $filtermethod .= " $where (forfallsdato >'$start_date')
AND (forfallsdato < '$end_date')";
+
+ $year = date("Y",strtotime($start_date));
+ $month = date("m",strtotime($start_date));
+ if($month < 3)
+ {
+ $start_date =
date($this->bocommon->dateformat,mktime(2,0,0,3,1,$year));
+ }
+
+ $start_date2 =
date($this->bocommon->dateformat,mktime(2,0,0,1,1,$year));
$sql = "SELECT district_id,periode,sum(godkjentbelop)
as consume $select_account_class "
. " FROM fm_ecobilagoverf $this->join
fm_location1 ON (fm_ecobilagoverf.loc1 = fm_location1.loc1) "
. " $this->join fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id) "
. " $this->join fm_b_account ON
(fm_ecobilagoverf.spbudact_code = fm_b_account.id) "
- . " $filtermethod group by district_id,periode
$group_account_class";
+ . " WHERE (forfallsdato >'$start_date' AND
forfallsdato < '$end_date' $filtermethod )"
+ . " OR (forfallsdato >'$start_date2' AND
forfallsdato < '$end_date' AND periode < 3 $filtermethod) "
+ . " GROUP BY district_id,periode
$group_account_class"
+ . " ORDER BY periode";
//echo $sql;
$this->db->query($sql,__LINE__,__FILE__);
@@ -507,7 +518,7 @@
while ($this->db->next_record())
{
- $consume[$i]['consume']
= $this->db->f('consume');
+ $consume[$i]['consume']
= round($this->db->f('consume'));
$consume[$i]['period']
= $this->db->f('periode');
$consume[$i]['district_id']
= $this->db->f('district_id');
if(!$b_account_class)
Index: property/inc/class.uiinvoice.inc.php
diff -u property/inc/class.uiinvoice.inc.php:1.24
property/inc/class.uiinvoice.inc.php:1.25
--- property/inc/class.uiinvoice.inc.php:1.24 Mon Apr 17 11:36:05 2006
+++ property/inc/class.uiinvoice.inc.php Tue May 9 13:41:25 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.uiinvoice.inc.php,v 1.24 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.uiinvoice.inc.php,v 1.25 2006/05/09 13:41:25
sigurdne Exp $
*/
/**
@@ -738,7 +738,7 @@
while(each($content))
{
$sum=$sum+$content[$i]['consume'];
- $content[$i]['consume']
=number_format($content[$i]['consume'], 2, ',', '');
+ $content[$i]['consume']
=number_format($content[$i]['consume'], 0, ',', ' ');
$i++;
}
}
@@ -772,7 +772,7 @@
);
$data['lang_sum']
= lang('Sum');
- $data['sum']
= number_format($sum, 2, ',', '');
+ $data['sum']
= number_format($sum, 0, ',', ' ');
$data['overlib_source']
= './'.$this->currentapp.'/inc/overlib.js';
$data['links']
= $links;
$data['allow_allrows']
= false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uiinvoice.inc.php class.soin...,
Sigurd Nes <=