[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8554] property: fix export
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8554] property: fix export |
Date: |
Wed, 11 Jan 2012 09:58:05 +0000 |
Revision: 8554
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8554
Author: sigurdne
Date: 2012-01-11 09:58:05 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
property: fix export
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-01-10 15:02:13 UTC
(rev 8553)
+++ trunk/property/inc/export/default/Basware_X114 2012-01-11 09:58:05 UTC
(rev 8554)
@@ -581,24 +581,27 @@
$this->db->transaction_begin();
}
- $bilagsnr_ut = '';
- $get_bilagsnr_ut = false;
- foreach ($oRsBilag as $line)
+ $bilagsnr_ut = $oRsBilag[0]['bilagsnr_ut'];
+ if(!$bilagsnr_ut)
{
- if(abs($line['godkjentbelop']) > 0)
+ $get_bilagsnr_ut = false;
+ foreach ($oRsBilag as $line)
{
- $get_bilagsnr_ut = true;
+ if(abs($line['godkjentbelop']) > 0)
+ {
+ $get_bilagsnr_ut = true;
+ }
}
- }
- if($get_bilagsnr_ut)
- {
- $this->db->query("UPDATE fm_idgenerator SET
value = value + 1 WHERE name = 'bilagsnr_ut'");
- $this->db->query("SELECT value FROM
fm_idgenerator WHERE name = 'bilagsnr_ut'");
- $this->db->next_record();
- $bilagsnr_ut = $this->db->f('value');
-
- $this->db->query("UPDATE fm_ecobilag SET
bilagsnr_ut = {$bilagsnr_ut} WHERE bilagsnr = '$voucher_id'");
+ if($get_bilagsnr_ut)
+ {
+ $this->db->query("UPDATE fm_idgenerator
SET value = value + 1 WHERE name = 'bilagsnr_ut'");
+ $this->db->query("SELECT value FROM
fm_idgenerator WHERE name = 'bilagsnr_ut'");
+ $this->db->next_record();
+ $bilagsnr_ut = $this->db->f('value');
+
+ $this->db->query("UPDATE fm_ecobilag
SET bilagsnr_ut = {$bilagsnr_ut} WHERE bilagsnr = '$voucher_id'");
+ }
}
$tranfser_bilag = array($bilagsnr_ut);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8554] property: fix export,
Sigurd Nes <=