fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8990] property: invoice period and rollback


From: Sigurd Nes
Subject: [Fmsystem-commits] [8990] property: invoice period and rollback
Date: Sat, 17 Mar 2012 21:06:18 +0000

Revision: 8990
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8990
Author:   sigurdne
Date:     2012-03-17 21:06:17 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
property: invoice period and rollback

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-03-17 19:41:36 UTC 
(rev 8989)
+++ trunk/property/inc/export/default/Basware_X114      2012-03-17 21:06:17 UTC 
(rev 8990)
@@ -263,7 +263,7 @@
                                        'spbudact_code'                 => 
$this->db->f('spbudact_code'),
                                        'regtid'                                
=> $this->db->f('regtid'),
                                        'artid'                                 
=> $this->db->f('artid'),
-                                       'godkjentbelop'                 => 
$this->db->f('godkjentbelop'),
+                                       'godkjentbelop'                 => 
(int) $this->db->f('godkjentbelop') == 0 ? $this->db->f('belop') :  
$this->db->f('godkjentbelop'),//restore original amount
                                        'spvend_code'                   => 
$this->db->f('spvend_code'),
                                        'dima'                                  
=> $this->db->f('dima'),
                                        'loc1'                                  
=> $this->db->f('loc1'),
@@ -638,11 +638,11 @@
 
                        $accountline = array();
 
-                       if($oRsBilag[0]['periode'])
+                       if ( $oRsBilag[0]['periode'] )
                        {
                                $periode = $oRsBilag[0]['periode'];
                        }
-                       else if 
(isset($this->config->config_data['export']['dato_aarsavslutning']) && time() < 
$this->config->config_data['export']['dato_aarsavslutning'])
+                       else if 
(isset($this->config->config_data['export']['dato_aarsavslutning']) && time() < 
$this->config->config_data['export']['dato_aarsavslutning'] )
                        {
                                if(date('Y',time()) == date('Y', 
$this->config->config_data['export']['dato_aarsavslutning']))
                                {
@@ -655,7 +655,14 @@
                        }
                        else
                        {
-                               $periode = date('Ym',time());
+                               $time = time();
+
+                               if ( date('j',$time) < 7 ) //Day of the month 
without leading zeros
+                               {
+                                       $time = $time - (7 * 24 * 3600);
+                               }
+                               
+                               $periode = date('Ym',$time);
                        }
 
                        $comment = array();




reply via email to

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