fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11466] property: condition survey - import


From: Sigurd Nes
Subject: [Fmsystem-commits] [11466] property: condition survey - import
Date: Fri, 15 Nov 2013 15:19:29 +0000

Revision: 11466
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11466
Author:   sigurdne
Date:     2013-11-15 15:19:28 +0000 (Fri, 15 Nov 2013)
Log Message:
-----------
property: condition survey - import

Modified Paths:
--------------
    trunk/property/inc/class.socondition_survey.inc.php
    trunk/property/inc/class.uicondition_survey.inc.php

Modified: trunk/property/inc/class.socondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.socondition_survey.inc.php 2013-11-14 22:22:16 UTC 
(rev 11465)
+++ trunk/property/inc/class.socondition_survey.inc.php 2013-11-15 15:19:28 UTC 
(rev 11466)
@@ -406,21 +406,21 @@
                                $entry['amount_operation']                      
= (int) str_replace(array(' ', ','),array('','.'),$entry['amount_operation']);
                                $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'];
                        }
 
+
                        unset($entry);
 
                        $custom = createObject('phpgwapi.custom_fields');
                        $attributes = 
$custom->find('property','.project.request', 0, '','','',true, true);
 
-
-
                        $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( ctype_digit($entry['condition_degree']) &&  
$entry['condition_degree'] > 0 && $entry['building_part'] && 
(int)$entry['import_type'] > 0)
-                               {
                                        $request = array();
 
                                        if( $entry['amount_investment'] && 
!$entry['amount_operation'] )

Modified: trunk/property/inc/class.uicondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.uicondition_survey.inc.php 2013-11-14 22:22:16 UTC 
(rev 11465)
+++ trunk/property/inc/class.uicondition_survey.inc.php 2013-11-15 15:19:28 UTC 
(rev 11466)
@@ -992,6 +992,10 @@
 
                                        
$objPHPExcel->setActiveSheetIndex((int)$sheet_id);
                                        $data = 
$objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
+
+       //                              $format = 
$objPHPExcel->getActiveSheet()->getStyle('R13')->getNumberFormat()->getFormatCode();
+       //                              $value = 
$objPHPExcel->getActiveSheet()->getCell('R13')->getCalculatedValue();
+
                                }
                                catch(Exception $e)
                                {
@@ -1069,7 +1073,6 @@
                        }
                        else if($data && $step == 4)
                        {
-//                             _debug_array($columns);
 
                                $rows = count($data)+1;
 
@@ -1083,7 +1086,7 @@
                                        {
                                                if($_value_key != 
'_skip_import_')
                                                {
-                                                       $_result[$_value_key] 
=trim($data[$i][$_row_key]);
+                                                       $_result[$_value_key] = 
$objPHPExcel->getActiveSheet()->getCell("{$_row_key}{$i}")->getCalculatedValue();
                                                }
 
                                        }
@@ -1107,7 +1110,6 @@
 //                             $msg = "'{$cached_file}' contained " . 
count($import_data) . " lines";
 //                             phpgwapi_cache::message_set($msg, 'message'); 
 
-//     _debug_array($import_data);die();
                        }
 
 
@@ -1150,7 +1152,6 @@
 
                        
self::render_template_xsl(array('condition_survey_import'), $data);
 
-
                }
 
 




reply via email to

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