[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8814] property: invoice handling - rollback on dupli
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8814] property: invoice handling - rollback on duplicates |
Date: |
Thu, 09 Feb 2012 10:18:12 +0000 |
Revision: 8814
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8814
Author: sigurdne
Date: 2012-02-09 10:18:11 +0000 (Thu, 09 Feb 2012)
Log Message:
-----------
property: invoice handling - rollback on duplicates
Modified Paths:
--------------
trunk/property/inc/export/default/Basware_X114
Modified: trunk/property/inc/export/default/Basware_X114
===================================================================
--- trunk/property/inc/export/default/Basware_X114 2012-02-09 09:22:33 UTC
(rev 8813)
+++ trunk/property/inc/export/default/Basware_X114 2012-02-09 10:18:11 UTC
(rev 8814)
@@ -419,8 +419,17 @@
public function RullTilbake($Filnavn, $date,$rollback_voucher)
{
$voucher = $this->select_invoice_rollback($date,
$Filnavn,$rollback_voucher);
- $this->db->transaction_begin();
+ if ( $this->db->get_transaction() )
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
+
+
foreach ($voucher as $line)
{
$this->bilag_update_overf($line);
@@ -457,12 +466,20 @@
if($rollback_voucher)
{
- $this->db->transaction_commit();
+ if ( !$this->global_lock )
+ {
+ $this->db->transaction_commit();
+ }
+
$receipt['message'][]= array('msg' =>
$antall . ' ' . lang('bilag/underbilag rullet tilbake'));
}
else if(unlink ($fil_katalog. '/' . $Filnavn))
{
- $this->db->transaction_commit();
+ if ( !$this->global_lock )
+ {
+ $this->db->transaction_commit();
+ }
+
$receipt['message'][]= array('msg' =>
$antall . ' ' . lang('bilag/underbilag rullet tilbake'));
$receipt['message'][]= array('msg' =>
lang('File %1 is deleted',$Filnavn));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8814] property: invoice handling - rollback on duplicates,
Sigurd Nes <=