fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6537] Rental: Fixed automatic sync so it uses correc


From: Terje Tjervaag
Subject: [Fmsystem-commits] [6537] Rental: Fixed automatic sync so it uses correct value and nulls if no value is found .
Date: Wed, 03 Nov 2010 14:34:49 +0000

Revision: 6537
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6537
Author:   terje_t
Date:     2010-11-03 14:34:48 +0000 (Wed, 03 Nov 2010)
Log Message:
-----------
Rental: Fixed automatic sync so it uses correct value and nulls if no value is 
found.

Modified Paths:
--------------
    trunk/rental/inc/class.uiparty.inc.php

Modified: trunk/rental/inc/class.uiparty.inc.php
===================================================================
--- trunk/rental/inc/class.uiparty.inc.php      2010-11-03 10:10:14 UTC (rev 
6536)
+++ trunk/rental/inc/class.uiparty.inc.php      2010-11-03 14:34:48 UTC (rev 
6537)
@@ -210,9 +210,13 @@
                                        }
 
                                        if ($fellesdata && 
isset($fellesdata['UNIT_ID']) && is_numeric($fellesdata['UNIT_ID'])) {
-                                               
$party->set_org_enhet_id($unit_id);
-                                               
rental_soparty::get_instance()->store($party);
+                                               // We found a match, so store 
the new connection
+                                               
$party->set_org_enhet_id($fellesdata['UNIT_ID']);
+                                       } else {
+                                               // No match was found. Set the 
connection to NULL
+                                               $party->set_org_enhet_id(NULL);
                                        }
+                                       
rental_soparty::get_instance()->store($party);
                                }
                        }
 




reply via email to

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