[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16265] more on integration
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16265] more on integration |
Date: |
Tue, 7 Feb 2017 08:48:43 -0500 (EST) |
Revision: 16265
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16265
Author: sigurdne
Date: 2017-02-07 08:48:43 -0500 (Tue, 07 Feb 2017)
Log Message:
-----------
more on integration
Modified Paths:
--------------
trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
Modified: trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2017-02-07 12:19:46 UTC (rev 16264)
+++ trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2017-02-07 13:48:43 UTC (rev 16265)
@@ -55,6 +55,7 @@
var $voucher_type;
var $voucher_id;
var $batchid;
+ protected $global_lock = false;
public function __construct( $param )
@@ -262,7 +263,14 @@
$transfer_ok = false;
if (!$debug &&
($this->config->config_data['common']['method'] == 'ftp' ||
$this->config->config_data['common']['method'] == 'ssh'))
{
- $this->db->transaction_begin();
+ if ($this->db->get_transaction())
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
if (!$connection = $this->connection)
{
@@ -301,11 +309,17 @@
if ($transfer_ok)
{
$this->soXport->log_transaction($batchid, $this->order_id, lang('transferred
Order %1 to Agresso', basename($filename)));
-
$this->db->transaction_commit(); // Reverse the batch_id - increment
+ if (!$this->global_lock)
+ {
+
$this->db->transaction_commit();
+ }
}
else
{
- $this->db->transaction_abort();
+ if (!$this->global_lock)
+ {
+
$this->db->transaction_abort(); // Reverse the batch_id - increment
+ }
$this->soXport->log_transaction($batchid, $this->order_id, lang('Failed to
transfere Order %1 to Agresso', basename($filename)));
// @unlink($filename);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16265] more on integration,
sigurdne <=