fmsystem-commits
[Top][All Lists]
Advanced

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

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


From: sigurdne
Subject: [Fmsystem-commits] [17479] property: custom integration
Date: Tue, 2 Jan 2018 04:10:30 -0500 (EST)

Revision: 17479
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17479
Author:   sigurdne
Date:     2018-01-02 04:10:30 -0500 (Tue, 02 Jan 2018)
Log Message:
-----------
property: custom integration

Modified Paths:
--------------
    trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php

Modified: 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
===================================================================
--- 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php    
    2018-01-02 08:18:55 UTC (rev 17478)
+++ 
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php    
    2018-01-02 09:10:30 UTC (rev 17479)
@@ -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: 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php  
2018-01-02 08:18:55 UTC (rev 17478)
+++ trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php  
2018-01-02 09:10:30 UTC (rev 17479)
@@ -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: 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
--- 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php    
    2018-01-02 08:18:55 UTC (rev 17478)
+++ 
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php    
    2018-01-02 09:10:30 UTC (rev 17479)
@@ -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]