[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9706] property: calculation
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9706] property: calculation |
Date: |
Tue, 03 Jul 2012 07:21:49 +0000 |
Revision: 9706
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9706
Author: sigurdne
Date: 2012-07-03 07:21:48 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
property: calculation
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
trunk/property/setup/phpgw_no.lang
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2012-07-02 18:44:13 UTC (rev
9705)
+++ trunk/property/inc/class.soproject.inc.php 2012-07-03 07:21:48 UTC (rev
9706)
@@ -1588,15 +1588,15 @@
{
$year = date('Y');//$this->db->f('year');
- if($this->db->f('contract_sum') > 0)
+ if(abs($this->db->f('contract_sum')) > 0)
{
$_amount = $this->db->f('contract_sum')
* ( 1 + ((int)$this->db->f('addition')/100));
}
- else if($this->db->f('calculation') > 0)
+ else if(abs($this->db->f('calculation')) > 0)
{
$_amount = $this->db->f('calculation')
* $tax;
}
- else if($this->db->f('budget') > 0)
+ else if(abs($this->db->f('budget')) > 0)
{
$_amount = $this->db->f('budget');
}
@@ -1621,7 +1621,6 @@
$project_budget[$this->db->f('year')] =
(int)$this->db->f('budget');
}
-
foreach ($project_budget as $year => $budget)
{
if(isset($orders[$year]))
@@ -1634,7 +1633,7 @@
{
$_sum_orders +=
$order['amount'];
$_sum_orders -=
$order['actual_cost'];
-
+
if($budget > 0)
{
$_sum_orders =
$_sum_orders > 0 ? $_sum_orders : 0;
@@ -1667,14 +1666,13 @@
$sort_year[] = $year;
}
-
+
unset($order);
unset($order_id);
unset($year);
reset($orders);
-
//remaining
foreach ($orders as $year => $_orders)
{
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2012-07-02 18:44:13 UTC (rev 9705)
+++ trunk/property/setup/phpgw_no.lang 2012-07-03 07:21:48 UTC (rev 9706)
@@ -513,7 +513,7 @@
deviation has been added property no Avvik er lagt til
deviation has been edited property no Avvik er rettet
deviation id property no Avvik ID
-difference property no Differanse
+difference property no Rest
dim a property no Dim A
dim a is missing property no Dim A mangler
dima is missing from sub invoice in: property no Dim A mangler
fra underbilag i :
@@ -1666,7 +1666,7 @@
subject has been updated property no Overskrift er oppdatert
submit the search string property no Send søkestrengen
sum estimated cost property no Sum estimert kostnad
-sum orders property no Forpliktet, ikke betalt
+sum orders property no Forpliktet
sum property no Sum
sum calculation property no Sum kalkulasjon
sum deviation property no Sum avvik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9706] property: calculation,
Sigurd Nes <=