fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9042] property: invoice handling


From: Sigurd Nes
Subject: [Fmsystem-commits] [9042] property: invoice handling
Date: Tue, 27 Mar 2012 08:20:43 +0000

Revision: 9042
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9042
Author:   sigurdne
Date:     2012-03-27 08:20:42 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
property: invoice handling

Modified Paths:
--------------
    trunk/property/inc/cron/default/Import_fra_basware_X205.php

Modified: trunk/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-03-27 
08:14:24 UTC (rev 9041)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-03-27 
08:20:42 UTC (rev 9042)
@@ -267,8 +267,8 @@
                {
                        
if(isset($this->config->config_data['import']['check_archive']) && 
$this->config->config_data['import']['check_archive'])
                        {
-                               $this->check_archive();                 
-                       }               
+                               $this->check_archive();
+                       }
 
                        $this->get_files();
                        $dirname = 
$this->config->config_data['import']['local_path'];
@@ -329,7 +329,7 @@
                                        }
                                        else
                                        {
-                                               $this->db->transaction_abort(); 
                                
+                                               $this->db->transaction_abort();
                                        }
                                }
                        }
@@ -445,7 +445,7 @@
                                                                        echo 
"File remote: {$file_remote} was copied to local: $file_local<br/>";
                                                                        if( 
ssh2_sftp_unlink ($sftp, "{$directory_remote}/archive/{$file_name}" ))
                                                                        {
-                                                                               
echo "Deleted duplicate File remote: 
{$directory_remote}/archive/{$file_name}<br/>";                                 
                                   
+                                                                               
echo "Deleted duplicate File remote: 
{$directory_remote}/archive/{$file_name}<br/>";
                                                                        }
                                                                        if( 
ssh2_sftp_rename ($sftp, $file_remote, 
"{$directory_remote}/archive/{$file_name}" ))
                                                                        {
@@ -533,14 +533,17 @@
                                if(!$_order_id)
                                {
                                        $merknad = 'Mangler bestillingsnummer';
+                                       $this->receipt['error'][] = array('msg' 
=> $merknad);
                                }
                                else if (!ctype_digit($_order_id))
                                {
-                                       $merknad = 'bestillingsnummeret er på 
feil format: ' . $_order_id;                              
+                                       $merknad = "bestillingsnummeret er på 
feil format: '{$_order_id}'";
+                                       $this->receipt['error'][] = array('msg' 
=> $merknad);
                                }
                                else if (!$order_info['order_exist'])
                                {
                                        $merknad = 'bestillingsnummeret ikke 
gyldig: ' . $_order_id;
+                                       $this->receipt['error'][] = array('msg' 
=> $merknad);
                                }
                                else
                                {
@@ -598,7 +601,7 @@
                                        $_bilagsnr_ut = 
$this->db->f('bilagsnr_ut');
                                        $bilagsnr = $this->db->f('bilagsnr');
                                        $__bilagsnr = $_bilagsnr_ut ? 
$_bilagsnr_ut : $bilagsnr;
-                                       
+
                                        if($_bilagsnr_ut)
                                        {
                                                $receipt = 
$this->export->RullTilbake(false,false,$_bilagsnr_ut);
@@ -623,7 +626,7 @@
 
                                $sql = 'SELECT id FROM fm_vendor WHERE id = ' . 
(int) $vendor_id;
                                $this->db->query($sql,__LINE__,__FILE__);
-                                       
+
                                if(!$_data['SUPPLIER.CODE'])
                                {
                                        $this->receipt['error'][] = array('msg' 
=> "LeverandørId ikke angitt for faktura: {$_data['SCANNINGNO']}");
@@ -646,7 +649,7 @@
                                                        $rc = 
$this->send->msg('email', $to, 'Ikke gyldig leverandør ved import av faktura 
til Portico', $body, '', '', '','','','html');
                                                        if($rc)
                                                        {
-                                                               
$this->receipt['message'][] = array('msg'=> "epost sendt til {$to}");           
                                        
+                                                               
$this->receipt['message'][] = array('msg'=> "epost sendt til {$to}");
                                                        }
                                                }
                                                catch (phpmailerException $e)
@@ -758,7 +761,7 @@
                                                }
                                                return false;
                                        }
-                                       
+
                                        
$GLOBALS['phpgw']->db->Exception_On_Error = false;
                                        return $bilagsnr;
                                }




reply via email to

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