phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.uiXport.php, 1.1.1.14


From: nomail
Subject: [Phpgroupware-cvs] property/class.uiXport.php, 1.1.1.14
Date: Sun, 23 May 2004 05:18:43 -0000

Update of /property
Modified Files:
        Branch: 
          class.uiXport.php

date: 2004/05/05 20:58:20;  author: sigurdne;  state: Exp;  lines: +15 -16

Log Message:
no message
=====================================================================
Index: property/class.uiXport.php
diff -u property/class.uiXport.php:1.1.1.13 property/class.uiXport.php:1.1.1.14
--- property/class.uiXport.php:1.1.1.13 Wed May  5 08:58:53 2004
+++ property/class.uiXport.php  Wed May  5 20:58:20 2004
@@ -70,7 +70,7 @@
                        }
 
                        $receipt = 
$this->fm_session->appsession('session_data','import_receipt');
-                       
$this->fm_session->appsession('session_data','import_receipt','');
+                       
$this->fm_session->appsession('session_data','import_receipt','x');
 
                        $art                            = 
$this->bocommon->get_var2('art',array('POST','GET'));
                        $type                           = 
$this->bocommon->get_var2('type',array('POST','GET'));
@@ -181,9 +181,9 @@
                                                $eyear = $dateparts[$y];
                                        }
 
-//                                     $old = $tsvfile;
-//                                     $tsvfile = 
$GLOBALS['phpgw_data']['server']['temp_dir'].'/invoice_import_'.basename($tsvfile);
-//                                     rename($old,$tsvfile);
+                                       $old = $tsvfile;
+                                       $tsvfile = 
$GLOBALS['phpgw_data']['server']['temp_dir'].SEP 
.'invoice_import_'.basename($tsvfile);
+                                       rename($old,$tsvfile);
 
                                        $invoice_common=array(
                                                                'bilagsnr'      
                        => $this->invoice->next_bilagsnr(),
@@ -238,8 +238,9 @@
                                        }
                                        else
                                        {
-                                               
$this->debug_import($buffer,$invoice_common);
-                                               return;
+                                               $data = 
$this->debug_import($buffer,$invoice_common);
+                                               
$this->bocommon->xsl_add_file(array('invoice','table_header'));
+                                               return array('debug' => $data);
                                        }
                                }
                        }
@@ -395,17 +396,17 @@
                        $sum=0;
 
                        $import_count = count($import);
-                       $table_count = count($table)+1;
-                       for ($i=1; $i<$table_count; $i++)
+                       $table_count = count($table);
+                       for ($i=0; $i<$table_count; $i++)
                        {
                                for ($k=0; $k<$import_count; $k++)
                                {
-                                       $content[$i]['row'][$k]['value']        
= $table[$i][$import[$header[$k]]];
+                                       $content[$i]['row'][$k]['value']        
= $table[($i+1)][$import[$header[$k]]];
                                        if ($import[$header[$k]]=='belop')
                                        {
                                                
$content[$i]['row'][$k]['align']        = 'right';
-                                               
$sum=$sum+$table[$i][$import[$header[$k]]];
-                                               
$content[$i]['row'][$k]['value']        = 
number_format($table[$i][$import[$header[$k]]], 2, ',', '');
+                                               
$sum=$sum+$table[($i+1)][$import[$header[$k]]];
+                                               
$content[$i]['row'][$k]['value']        = 
number_format($table[($i+1)][$import[$header[$k]]], 2, ',', '');
                                        }
                                }
                        }
@@ -471,20 +472,18 @@
                                'lang_sum'                                      
        => lang('Sum'),
                                'sum'                                           
        => number_format($sum, 2, ',', ''),
                                'table_header'                                  
=> $table_header,
-                               'values'                                        
        => $content,
+                               'values_debug'                                  
=> $content,
                                'table_add'                                     
        => $table_add
                        );
 
                        unset($content);
 
-                       
$this->bocommon->xsl_add_file(array('invoice','table_header'));
                        $appname                                                
= lang('Invoice');
                        $function_msg                                   = 
lang('Debug');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
 
-//html_print_r($data);
-                       return array('debug' => $data);
+                       return $data;
                }
 
                function export()




reply via email to

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