fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17484] property: custom integration


From: sigurdne
Subject: [Fmsystem-commits] [17484] property: custom integration
Date: Wed, 3 Jan 2018 04:35:12 -0500 (EST)

Revision: 17484
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17484
Author:   sigurdne
Date:     2018-01-03 04:35:11 -0500 (Wed, 03 Jan 2018)
Log Message:
-----------
property: custom integration

Modified Paths:
--------------
    
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php

Modified: 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
===================================================================
--- 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
  2018-01-02 16:53:44 UTC (rev 17483)
+++ 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
  2018-01-03 09:35:11 UTC (rev 17484)
@@ -163,7 +163,7 @@
                                }
                                $historylog->add('RM', $id, "Varemottak: 
{$received_amount} overført til agresso");
                                $now = time();
-                               $GLOBALS['phpgw']->db->query("UPDATE {$table} 
SET order_received = {$now}, order_received_amount = {$received_amount} WHERE 
id = {$id}");
+                               $GLOBALS['phpgw']->db->query("UPDATE {$table} 
SET order_received = {$now}, order_received_amount = order_received_amount + 
{$received_amount} WHERE id = {$id}");
                        }
                }
        }
@@ -249,7 +249,7 @@
                }
        }
 
-       if (isset($id) && $id && isset($acl_location) && $acl_location && 
isset($transfer_action) && $transfer_action = 'receive_order')
+       if (!empty($id) && !empty($acl_location) && isset($transfer_action) && 
$transfer_action == 'receive_order')
        {
                $exporter_varemottak = new 
lag_agresso_varemottak($acl_location, $id);
                $result = $exporter_varemottak->transfer($id, $received_amount);

Modified: 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
--- 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    2018-01-02 16:53:44 UTC (rev 17483)
+++ 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    2018-01-03 09:35:11 UTC (rev 17484)
@@ -44,7 +44,7 @@
                var $debug = true;
                function __construct()
                {
-                       
+
                }
 
                public function transfer( $id )
@@ -150,6 +150,21 @@
 
                        $dim6 = 9;
 
+                       //Override from order
+                       $tax_code = $_ticket['tax_code'] ? $_ticket['tax_code'] 
: 0;
+                       switch ($tax_code)
+                       {
+                               case '0':
+                                       $tax_code = '6A';
+                                       break;
+                               case '75':
+                                       $tax_code = '60';
+                                       break;
+                               default:
+                                       $tax_code = '6A';
+                                       break;
+                       }
+
                        if ($_ticket['order_dim1'])
                        {
                                $sogeneric = CreateObject('property.sogeneric', 
'order_dim1');
@@ -194,7 +209,7 @@
                                'vendor_name' => $vendor['name'],
                                'vendor_address' => 
mb_substr($vendor['address'], 0, 50),
                                'order_id' => $_ticket['order_id'],
-                               'tax_code' => $_ticket['tax_code'],
+                               'tax_code' => $tax_code,
                                'buyer' => $buyer,
                                'lines' => array(
                                        array(
@@ -204,7 +219,7 @@
                                        )
                                )
                        );
-       
+
                        $exporter_ordre = new 
BkBygg_exporter_data_til_Agresso(array(
                                'order_id' => $_ticket['order_id'],
                                'voucher_type' => $voucher_type

Modified: 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
--- 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
  2018-01-02 16:53:44 UTC (rev 17483)
+++ 
thirdparty/PE_custom/BK_EBF/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
  2018-01-03 09:35:11 UTC (rev 17484)
@@ -30,7 +30,7 @@
         * Description
         * @package property
         */
-       
+
        if (!class_exists("lag_agresso_ordre_fra_workorder"))
        {
                class lag_agresso_ordre_fra_workorder




reply via email to

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