[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11132] property: more on condition survey
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11132] property: more on condition survey |
Date: |
Fri, 24 May 2013 13:38:00 +0000 |
Revision: 11132
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11132
Author: sigurdne
Date: 2013-05-24 13:37:49 +0000 (Fri, 24 May 2013)
Log Message:
-----------
property: more on condition survey
Modified Paths:
--------------
trunk/property/inc/class.socondition_survey.inc.php
trunk/property/inc/hook_config.inc.php
trunk/property/templates/base/config.tpl
Modified: trunk/property/inc/class.socondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.socondition_survey.inc.php 2013-05-24 13:15:23 UTC
(rev 11131)
+++ trunk/property/inc/class.socondition_survey.inc.php 2013-05-24 13:37:49 UTC
(rev 11132)
@@ -325,8 +325,8 @@
*/
if(isset($config->config_data['condition_survey_obsolete_status']) &&
$config->config_data['condition_survey_obsolete_status'])
{
- $this->_db->query("UPDATE_ fm_request SET
status = '{$config->config_data['condition_survey_obsolete_status']}'"
- . "WHERE location_code {$this->_db->like}
'{$survey['location_code']}%'",__LINE__,__FILE__);
+ $this->_db->query("UPDATE fm_request SET status
= '{$config->config_data['condition_survey_obsolete_status']}'"
+ . " WHERE location_code {$this->_db->like}
'{$survey['location_code']}%'",__LINE__,__FILE__);
}
else
{
@@ -376,7 +376,15 @@
$_update_buildingpart =
array("filter_{$filter_key}" => 1);
}
-//_debug_array($import_data);die();
+ foreach ($import_data as &$entry)
+ {
+ $entry['amount_investment'] = (int)
str_replace(array(' ', ','),array('','.'),$entry['amount_investment']);
+ $entry['amount_operation'] = (int)
str_replace(array(' ', ','),array('','.'),$entry['amount_operation']);
+ $entry['amount_potential_grants'] = (int)
str_replace(array(' ', ','),array('','.'),$entry['amount_potential_grants']);
+ }
+
+ unset($entry);
+
$origin_id =
$GLOBALS['phpgw']->locations->get_id('property', '.project.condition_survey');
foreach ($import_data as $entry)
{
Modified: trunk/property/inc/hook_config.inc.php
===================================================================
--- trunk/property/inc/hook_config.inc.php 2013-05-24 13:15:23 UTC (rev
11131)
+++ trunk/property/inc/hook_config.inc.php 2013-05-24 13:37:49 UTC (rev
11132)
@@ -473,3 +473,32 @@
return $out;
}
+
+ /**
+ * Get HTML listbox with obsolete status that are to be set when
condition survey are imported
+ *
+ * @param $config
+ * @return string HTML listboxes to be placed in a table
+ */
+ function condition_survey_obsolete_status($config)
+ {
+ $status_entries =
execMethod('property.sorequest.select_status_list');
+
+ $status_assigned =
isset($config['condition_survey_obsolete_status']) ?
$config['condition_survey_obsolete_status'] : array();
+
+ $out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
+ foreach ( $status_entries as $status)
+ {
+ $selected = '';
+ if ( $status_assigned == $status['id'])
+ {
+ $selected = 'selected = "selected"';
+ }
+
+ $out .= <<<HTML
+ <option
value='{$status['id']}'{$selected}>{$status['name']}</option>
+HTML;
+ }
+
+ return $out;
+ }
Modified: trunk/property/templates/base/config.tpl
===================================================================
--- trunk/property/templates/base/config.tpl 2013-05-24 13:15:23 UTC (rev
11131)
+++ trunk/property/templates/base/config.tpl 2013-05-24 13:37:49 UTC (rev
11132)
@@ -564,6 +564,15 @@
</td>
</tr>
+ <tr class="row_on">
+
<td>{lang_obsolete_status_that_are_to_be_set_for_old_records_when_condition_survey_are_imported}:</td>
+ <td>
+ <select
name="newsettings[condition_survey_obsolete_status]">
+ {hook_condition_survey_obsolete_status}
+ </select>
+ </td>
+ </tr>
+
<!--
groupnotification
-->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11132] property: more on condition survey,
Sigurd Nes <=