[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11489] property: condition survey import
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11489] property: condition survey import |
Date: |
Mon, 25 Nov 2013 15:22:00 +0000 |
Revision: 11489
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11489
Author: sigurdne
Date: 2013-11-25 15:21:59 +0000 (Mon, 25 Nov 2013)
Log Message:
-----------
property: condition survey import
Modified Paths:
--------------
trunk/property/inc/class.socondition_survey.inc.php
trunk/property/inc/class.sorequest.inc.php
Modified: trunk/property/inc/class.socondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.socondition_survey.inc.php 2013-11-25 13:18:06 UTC
(rev 11488)
+++ trunk/property/inc/class.socondition_survey.inc.php 2013-11-25 15:21:59 UTC
(rev 11489)
@@ -357,7 +357,7 @@
}
else
{
- throw new
Exception('property_socondition_survey::import - condition survey obsolete
status not configured');
+// throw new
Exception('property_socondition_survey::import - condition survey obsolete
status not configured');
}
$cats = CreateObject('phpgwapi.categories', -1,
'property', '.project');
@@ -410,6 +410,7 @@
$entry['amount_potential_grants'] = (int)
str_replace(array(' ', ','),array('','.'),$entry['amount_potential_grants']);
$entry['import_type']
= (int) $entry['import_type'];
$entry['condition_degree']
= (int) $entry['condition_degree'];
+ $entry['amount']
= $entry['amount_investment'] + $entry['amount_operation'] +
$entry['amount_potential_grants'];
}
@@ -421,7 +422,8 @@
$origin_id =
$GLOBALS['phpgw']->locations->get_id('property', '.project.condition_survey');
foreach ($import_data as $entry)
{
- if( $entry['condition_degree'] > 0 &&
$entry['building_part'] && $entry['import_type'] > 0)
+ //if( $entry['condition_degree'] > 0 &&
$entry['building_part'] && $entry['import_type'] > 0)
+ if( $entry['amount'] && $entry['building_part']
&& $entry['import_type'] > 0)
{
$request = array();
@@ -457,6 +459,7 @@
$request['condition_survey_id']
= $survey['id'];
+ $request['multiplier']
= $survey['multiplier'];
$request['street_name']
= $location_data['street_name'];
$request['street_number']
= $location_data['street_number'];
$request['location']
= $location;
Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php 2013-11-25 13:18:06 UTC (rev
11488)
+++ trunk/property/inc/class.sorequest.inc.php 2013-11-25 15:21:59 UTC (rev
11489)
@@ -1041,6 +1041,8 @@
$value_set['condition_survey_id'] =
$request['condition_survey_id'];
$value_set['responsible_unit'] =
$request['responsible_unit'];
$value_set['recommended_year'] = (int)
$request['recommended_year'];
+ $value_set['multiplier']
= $request['multiplier'] ? (float)$request['multiplier'] : 1;
+
$cols = implode(',', array_keys($value_set));
$values =
$this->_db->validate_insert(array_values($value_set));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11489] property: condition survey import,
Sigurd Nes <=