fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10641] Property: project types


From: Sigurd Nes
Subject: [Fmsystem-commits] [10641] Property: project types
Date: Thu, 03 Jan 2013 17:37:15 +0000

Revision: 10641
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10641
Author:   sigurdne
Date:     2013-01-03 17:37:14 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Property: project types

Modified Paths:
--------------
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/js/yahoo/project.edit.js
    trunk/property/setup/phpgw_no.lang

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2013-01-03 14:54:52 UTC (rev 
10640)
+++ trunk/property/inc/class.soproject.inc.php  2013-01-03 17:37:14 UTC (rev 
10641)
@@ -1314,7 +1314,7 @@
 
                                if(isset($project['transfer_amount']) && 
$project['transfer_amount'] && isset($project['transfer_target']) && 
$project['transfer_target'])
                                {
-                                       
$this->_update_buffer_budget($project['id'], date('Y',$project['start_date']), 
$project['transfer_amount'], null,$project['transfer_target']);
+                                       
$this->_update_buffer_budget($project['id'], date('Y'), 
$project['transfer_amount'], null,$project['transfer_target']);
                                }
                        }
                        else // investment or operation
@@ -1825,9 +1825,19 @@
                        $sql = "SELECT budget FROM fm_project_budget WHERE 
project_id = {$project_id} AND year = {$year} AND month = {$month}";
 
                        $this->db->query($sql,__LINE__,__FILE__);
-                       if ($this->db->next_record())
+                       if ($old_budget = $this->db->next_record())
                        {
-                               $sql = "UPDATE fm_project_budget SET budget = 
{$budget}, modified_date = {$now} WHERE project_id = {$project_id} AND year = 
{$year} AND month = {$month}";
+                               if($action == 'add')
+                               {
+                                       $new_budget = $old_budget + $budget;
+                               }
+                               else
+                               {
+                                       $new_budget = $budget;                  
        
+                               }
+                               
+                               $sql = "UPDATE fm_project_budget SET budget = 
{$new_budget}, modified_date = {$now} WHERE project_id = {$project_id} AND year 
= {$year} AND month = {$month}";                          
+                               
                                $this->db->query($sql,__LINE__,__FILE__);
                        }
                        else

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2013-01-03 14:54:52 UTC (rev 
10640)
+++ trunk/property/inc/class.uiproject.inc.php  2013-01-03 17:37:14 UTC (rev 
10641)
@@ -1750,9 +1750,9 @@
                                                                                
                array('key' => 
'year','label'=>lang('year'),'sortable'=>false,'resizeable'=>true),
                                                                                
                array('key' => 'entry_date','label'=>lang('entry 
date'),'sortable'=>true,'resizeable'=>true),
                                                                                
                array('key' => 'amount_in','label'=>lang('amount 
in'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterAmount0'),
-                                                                               
                array('key' => 'from_project','label'=>lang('from 
project'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                array('key' => 'from_project','label'=>lang('from 
project'),'sortable'=>true,'resizeable'=>true,'formatter'=>'project_link'),
                                                                                
                array('key' => 'amount_out','label'=>lang('amount 
out'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterAmount0'),
-                                                                               
                array('key' => 'to_project','label'=>lang('to 
project'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                array('key' => 'to_project','label'=>lang('to 
project'),'sortable'=>true,'resizeable'=>true,'formatter'=>'project_link'),
                                                                                
                array('key' => 
'user_name','label'=>lang('user'),'sortable'=>true,'resizeable'=>true)
                                                                                
        )
                                                                                
)

Modified: trunk/property/js/yahoo/project.edit.js
===================================================================
--- trunk/property/js/yahoo/project.edit.js     2013-01-03 14:54:52 UTC (rev 
10640)
+++ trunk/property/js/yahoo/project.edit.js     2013-01-03 17:37:14 UTC (rev 
10641)
@@ -60,6 +60,19 @@
        };
 
 
/********************************************************************************/
     
+
+       var oArgs_project = {menuaction:'property.uiproject.edit'};
+       var sUrl_project = phpGWLink('index.php', oArgs_project);
+
+       var project_link = function(elCell, oRecord, oColumn, oData)
+       {
+               if(oData > 0)
+               {
+                       elCell.innerHTML = "<a href="+sUrl_project + 
"&id="+oData+">" + oData + "</a>";
+               }
+       }       
+
+
        var FormatterRight = function(elCell, oRecord, oColumn, oData)
        {
                elCell.innerHTML = "<div align=\"right\">"+oData+"</div>";

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2013-01-03 14:54:52 UTC (rev 10640)
+++ trunk/property/setup/phpgw_no.lang  2013-01-03 17:37:14 UTC (rev 10641)
@@ -8,6 +8,10 @@
 expences       property        no      Utgifter
 income property        no      Inntekter
 about  common  no      Om
+amount in      property        no      Inn
+from project   property        no      Fra prosjekt
+amount out     property        no      Ut
+to project     property        no      Til prosjekt
 access error   property        no      Manglende tilgang
 accounting     property        no      Regnskap
 accounting categories  property        no      Kategorier regnskap




reply via email to

[Prev in Thread] Current Thread [Next in Thread]