phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.boentity.inc.php, 1.3.2.5


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.boentity.inc.php, 1.3.2.5
Date: Mon, 27 Dec 2004 14:58:53 +0100

Update of /property/inc
Modified Files:
        Branch: proposed-0_9_18-branch
          class.boentity.inc.php

date: 2004/12/27 13:58:53;  author: sigurdne;  state: Exp;  lines: +28 -2

Log Message:
no message
=====================================================================
Index: property/inc/class.boentity.inc.php
diff -u property/inc/class.boentity.inc.php:1.3.2.4 
property/inc/class.boentity.inc.php:1.3.2.5
--- property/inc/class.boentity.inc.php:1.3.2.4 Thu Nov 18 22:12:08 2004
+++ property/inc/class.boentity.inc.php Mon Dec 27 13:58:53 2004
@@ -305,6 +305,9 @@
                        $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
                        $contacts                       = 
CreateObject('phpgwapi.contacts');
 
+                       $vendor = CreateObject($this->currentapp.'.soactor');
+                       $vendor->role = 'vendor';
+
                        $entity = $this->so->read_single($data);
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                        $entity['date']  = 
$GLOBALS['phpgw']->common->show_date($entity['date'],$dateformat);
@@ -370,6 +373,29 @@
                                        $lookup_functions[$m]['action'] = 
'Window1=window.open('."'" . $lookup_link ."'" 
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
                                        $m++;
                                }
+                               
if($entity['attributes'][$i]['datatype']=='VENDOR')
+                               {
+                                       if($entity['attributes'][$i]['value'])
+                                       {
+                                               $vendor_data    = 
$vendor->read_single(array('actor_id'=>$entity['attributes'][$i]['value']));
+
+                                               for 
($n=0;$n<count($vendor_data['attributes']);$n++)
+                                               {
+                                                       
if($vendor_data['attributes'][$n]['name'] == 'org_name')
+                                                       {
+                                                               
$entity['attributes'][$i]['vendor_name']= 
$vendor_data['attributes'][$n]['value'];
+                                                               $n 
=count($vendor_data['attributes']);
+                                                       }
+                                               }
+                                       }
+
+                                       $insert_record_entity[] = 
$entity['attributes'][$i]['name'];
+                                       $lookup_link            = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
 . $entity['attributes'][$i]['name']);
+
+                                       $lookup_functions[$m]['name'] = 
'lookup_'. $entity['attributes'][$i]['name'] .'()';
+                                       $lookup_functions[$m]['action'] = 
'Window1=window.open('."'" . $lookup_link ."'" 
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
+                                       $m++;
+                               }
                                if($entity['attributes'][$i]['datatype']=='R' 
|| $entity['attributes'][$i]['datatype']=='CH' || 
$entity['attributes'][$i]['datatype']=='LB')
                                {
                                        $entity['attributes'][$i]['choice']     
= 
$soadmin_entity->read_attrib_choice($data['entity_id'],$data['cat_id'],$entity['attributes'][$i]['attrib_id']);
@@ -423,7 +449,7 @@
 
                        
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp,$insert_record_entity);
 
-//_debug_array($entity);
+//_debug_array($insert_record_entity);
                        return $entity;
                }
 




reply via email to

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