[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10966] property: budget handling
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10966] property: budget handling |
Date: |
Tue, 05 Mar 2013 11:14:49 +0000 |
Revision: 10966
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10966
Author: sigurdne
Date: 2013-03-05 11:14:49 +0000 (Tue, 05 Mar 2013)
Log Message:
-----------
property: budget handling
Modified Paths:
--------------
trunk/property/inc/class.soproject.inc.php
trunk/property/inc/class.soworkorder.inc.php
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2013-03-05 10:05:32 UTC (rev
10965)
+++ trunk/property/inc/class.soproject.inc.php 2013-03-05 11:14:49 UTC (rev
10966)
@@ -2877,7 +2877,10 @@
if( !abs( $last_budget ) > 0 )
{
- throw new
Exception('property_soproject::transfer_budget() - no budget to transfer for
this investment project: ' . $id);
+ $this->update_budget($id, $year,
$periodization_id, 0, true, 'update', true);
+ $this->db->transaction_commit();
+ return;
+ // throw new
Exception('property_soproject::transfer_budget() - no budget to transfer for
this investment project: ' . $id);
}
//paid last year
@@ -2927,7 +2930,7 @@
}
else if($project_type_id == 1)//operation
{
- if($budget['budget_amount'])
+ // if($budget['budget_amount'])
{
$this->update_budget($id, $year,
$periodization_id, (int)$budget['budget_amount'], true, 'update', true);
}
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2013-03-05 10:05:32 UTC
(rev 10965)
+++ trunk/property/inc/class.soworkorder.inc.php 2013-03-05 11:14:49 UTC
(rev 10966)
@@ -2191,7 +2191,10 @@
$last_budget = $this->db->f('budget');
if( !abs( $last_budget ) > 0 )
{
- throw new
Exception('property_workorder::transfer_budget() - no budget to transfer for
this investment order: ' . $id);
+ $this->_update_order_budget($id, $year,
$periodization_id, 0, 0, 0, 'update', true);
+ $this->db->transaction_commit();
+ return;
+// throw new
Exception('property_workorder::transfer_budget() - no budget to transfer for
this investment order: ' . $id);
}
//paid last year
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10966] property: budget handling,
Sigurd Nes <=