[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16103] more on integration
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16103] more on integration |
Date: |
Mon, 19 Dec 2016 09:35:32 +0000 (UTC) |
Revision: 16103
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16103
Author: sigurdne
Date: 2016-12-19 09:35:31 +0000 (Mon, 19 Dec 2016)
Log Message:
-----------
more on integration
Modified Paths:
--------------
trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
Modified: trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-12-18 20:52:38 UTC (rev 16102)
+++ trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-12-19 09:35:31 UTC (rev 16103)
@@ -233,14 +233,15 @@
return $filename;
}
- public function transfer( $debug )
+ public function transfer( )
{
$batchid = $this->soXport->increment_batchid();
$this->batchid = $batchid;
$filename = $this->create_file_name($this->order_id);
$content = $this->transfer_xml;
+ $debug =
empty($this->config->config_data['export']['activate_transfer']) ? true : false;
- if($debug) // keep a copy?
+ if(!empty($this->config->config_data['export']['path'])
&& is_dir($this->config->config_data['export']['path'])) // keep a copy
{
$file_written = false;
$fp = fopen($filename, "wb");
@@ -257,8 +258,7 @@
}
$transfer_ok = false;
-// if ($this->config->config_data['common']['method'] ==
'ftp' || $this->config->config_data['common']['method'] == 'ssh')
- if (!$debug)//Not yet...
+ if (!$debug &&
($this->config->config_data['common']['method'] == 'ftp' ||
$this->config->config_data['common']['method'] == 'ssh'))
{
$this->db->transaction_begin();
Modified:
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
---
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
2016-12-18 20:52:38 UTC (rev 16102)
+++
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
2016-12-19 09:35:31 UTC (rev 16103)
@@ -39,12 +39,14 @@
class lag_agresso_ordre_fra_workorder
{
- var $debug = true;
+ var $debug = false;
public function __construct()
{
$this->cats = CreateObject('phpgwapi.categories', -1,
'property', '.project');
$this->cats->supress_info = true;
+ $config = CreateObject('admin.soconfig',
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
+ $this->debug =
empty($config->config_data['export']['activate_transfer']) ? true : false;
}
public function transfer( $project, $workorder )
@@ -52,6 +54,8 @@
// _debug_array($workorder);die();
if (!$this->debug && $workorder['order_sent'])
{
+ $transfer_time =
$GLOBALS['phpgw']->common->show_date($workorder['order_sent']);
+ phpgwapi_cache::message_set("Info: Ordre
#{$workorder['id']} er allerede overført til Agresso {$transfer_time}");
return 2;
}
@@ -195,8 +199,6 @@
$tjeneste = $workorder['service_id'] ?
$workorder['service_id'] : $tjeneste;
// _debug_array($location_info);die();
- $config = CreateObject('phpgwapi.config', 'property');
- $config->read();
$collect_building_part = false;
if
(isset($config->config_data['workorder_require_building_part']))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16103] more on integration,
sigurdne <=