fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7916] import: testing


From: Sigurd Nes
Subject: [Fmsystem-commits] [7916] import: testing
Date: Fri, 21 Oct 2011 12:50:24 +0000

Revision: 7916
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7916
Author:   sigurdne
Date:     2011-10-21 12:50:24 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
import: testing

Modified Paths:
--------------
    trunk/property/inc/cron/default/Import_fra_basware_X205.php

Modified: trunk/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-21 
12:41:35 UTC (rev 7915)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-21 
12:50:24 UTC (rev 7916)
@@ -47,23 +47,8 @@
                var $attestant = 83; //cat_id for rolle
                var $budsjettansvarlig = 146; //cat_id for rolle
                var $default_kostra_id = 9999; //dummy
+               var $debug = false;
 
-               var $import = array(
-                       'Bilagsnr' => 'bilagsnr', 
-                       'Fakturanr' => 'fakturanr', 
-                       'Konto' => 'spbudact_code',
-                       'Objekt' => 'dima', //objectclass: organizationalPerson
-                       'DimB' => 'dimb',
-                       'KID' => 'kidnr',
-                       'MVA' => 'mvakode',
-                       'Tjeneste'=> 'kostra_id',
-                       'Belop [kr]' => 'belop',
-                       'Referanse' => 'referanse',
-                       'BOEI Gateadresse' => 'boei_gateadresse',
-                       );
-
-               var $header = 
array('Bilagsnr','Fakturanr','Konto','Objekt','DimB','KID','MVA','Tjeneste','Belop
 [kr]','Referanse');
-
                function __construct()
                {
                        $this->soXport                  = 
CreateObject('property.soXport');     
@@ -80,9 +65,9 @@
                        $this->config->read();
                }
 
-               function pre_run($data='')
+               function pre_run($data = array())
                {
-                       if($data['enabled']==1)
+                       if(isset($data['enabled']) && $data['enabled']==1)
                        {
                                $confirm        = true;
                                $cron           = true;
@@ -93,6 +78,11 @@
                                $execute        = phpgw::get_var('execute', 
'bool', 'GET');
                        }
 
+                       if( isset($data['debug']) && $data['debug'] )
+                       {
+                               $this->debug = true;
+                       }
+
                        if ($confirm)
                        {
                                $this->execute($cron);
@@ -234,8 +224,6 @@
                        $directory_local        = 
rtrim($this->config->config_data['import_path'],'/');
                        $port                           = 22;
 
-                       $debug = true;
-
                        if (!function_exists("ssh2_connect"))
                        {
                                die("function ssh2_connect doesn't exist");
@@ -283,7 +271,7 @@
                                                $arr[] = $file;
                                        }
 
-                                       if ($debug)
+                                       if ($this->debug)
                                        {
                                                _debug_array($arr);
                                        }




reply via email to

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