[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8901] Property: include tax in calkulation
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8901] Property: include tax in calkulation |
Date: |
Thu, 16 Feb 2012 13:41:35 +0000 |
Revision: 8901
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8901
Author: sigurdne
Date: 2012-02-16 13:41:34 +0000 (Thu, 16 Feb 2012)
Log Message:
-----------
Property: include tax in calkulation
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2012-02-16 12:53:24 UTC (rev
8900)
+++ trunk/property/inc/class.soproject.inc.php 2012-02-16 13:41:34 UTC (rev
8901)
@@ -1346,6 +1346,10 @@
}
}
+ $config = CreateObject('phpgwapi.config','property');
+ $config->read();
+ $tax = 1+(($config->config_data['fm_tax'])/100);
+
$sql = "SELECT EXTRACT(YEAR from
to_timestamp(start_date) ) as year, sum(calculation) as calculation,
sum(budget) as budget,"
. " sum(contract_sum) as contract_sum ,paid_percent"
. " FROM fm_workorder"
@@ -1354,6 +1358,7 @@
. " GROUP BY fm_workorder.id, paid_percent,
fm_workorder.start_date ORDER BY start_date ASC";
$this->db->query($sql,__LINE__,__FILE__);
+
while ($this->db->next_record())
{
$paid_percent =
(int)$this->db->f('paid_percent');
@@ -1365,7 +1370,7 @@
}
else if($this->db->f('calculation') > 0)
{
- $_sum = $this->db->f('calculation');
+ $_sum = $this->db->f('calculation') *
$tax;
}
else if($this->db->f('budget') > 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8901] Property: include tax in calkulation,
Sigurd Nes <=