fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7203] property/catch-symbiose


From: Sigurd Nes
Subject: [Fmsystem-commits] [7203] property/catch-symbiose
Date: Sun, 10 Apr 2011 17:09:06 +0000

Revision: 7203
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7203
Author:   sigurdne
Date:     2011-04-10 17:09:05 +0000 (Sun, 10 Apr 2011)
Log Message:
-----------
property/catch-symbiose

Modified Paths:
--------------
    trunk/property/inc/class.boentity.inc.php
    trunk/property/inc/class.bolocation.inc.php
    trunk/property/inc/class.soentity.inc.php
    trunk/property/inc/class.uientity.inc.php

Modified: trunk/property/inc/class.boentity.inc.php
===================================================================
--- trunk/property/inc/class.boentity.inc.php   2011-04-10 17:06:22 UTC (rev 
7202)
+++ trunk/property/inc/class.boentity.inc.php   2011-04-10 17:09:05 UTC (rev 
7203)
@@ -89,6 +89,7 @@
                        $end_date                                               
= phpgw::get_var('end_date');
                        $allrows                                                
= phpgw::get_var('allrows', 'bool');
                        $criteria_id                                    = 
phpgw::get_var('criteria_id');
+                       $p_num                                                  
= phpgw::get_var('p_num');
 
                        $this->criteria_id                              = 
isset($criteria_id) && $criteria_id ? $criteria_id : '';
 
@@ -166,6 +167,10 @@
                        {
                                $this->end_date = $end_date;
                        }
+                       if(isset($_POST['p_num']) || isset($_GET['p_num']))
+                       {
+                               $this->p_num = $p_num;
+                       }
                        if($allrows)
                        {
                                $this->allrows = $allrows;
@@ -307,7 +312,7 @@
                                
'start_date'=>$this->bocommon->date_to_timestamp($data['start_date']),
                                
'end_date'=>$this->bocommon->date_to_timestamp($data['end_date']),
                                'dry_run'=>$data['dry_run'], 
'type'=>$data['type'], 'location_code' => $this->location_code,
-                               'criteria_id' => $this->criteria_id, 
'attrib_filter' => $attrib_filter));
+                               'criteria_id' => $this->criteria_id, 
'attrib_filter' => $attrib_filter, 'p_num' => $this->p_num));
 
                        $this->total_records = $this->so->total_records;
                        $this->uicols   = $this->so->uicols;
@@ -366,7 +371,11 @@
 
                        if($values['p_num'])
                        {
-                               $category = 
$this->soadmin_entity->read_single_category($values['p_entity_id'],$values['p_cat_id']);
+                               $soadmin_entity                         = 
CreateObject('property.soadmin_entity');
+                               $soadmin_entity->type           = 'entity';
+                               $soadmin_entity->type_app       = 'property';
+                               $category = 
$soadmin_entity->read_single_category($values['p_entity_id'],$values['p_cat_id']);
+//                             $category = 
$this->soadmin_entity->read_single_category($values['p_entity_id'],$values['p_cat_id']);
                                
$values['p'][$values['p_entity_id']]['p_num']=$values['p_num'];
                                
$values['p'][$values['p_entity_id']]['p_entity_id']=$values['p_entity_id'];
                                
$values['p'][$values['p_entity_id']]['p_cat_id']=$values['p_cat_id'];

Modified: trunk/property/inc/class.bolocation.inc.php
===================================================================
--- trunk/property/inc/class.bolocation.inc.php 2011-04-10 17:06:22 UTC (rev 
7202)
+++ trunk/property/inc/class.bolocation.inc.php 2011-04-10 17:09:05 UTC (rev 
7203)
@@ -495,16 +495,38 @@
                                }
                        }
 
+
+                       if(!isset($data['lookup_entity']) || 
!$data['lookup_entity'])
+                       {
+                               if(is_array($data['entity_data']))
+                               {
+                                       $soadmin_entity                         
= CreateObject('property.soadmin_entity');
+                                       $soadmin_entity->type           = 
'entity';
+                                       $soadmin_entity->type_app       = 
'property';
+
+                                       foreach($data['entity_data'] as 
$_entity_id => $_entity_info)                           
+                                       {
+                                               $entity_lookup = 
$soadmin_entity->read_single($_entity_id);
+                                               $data['lookup_entity'][] = array
+                                               (
+                                                       'id'            => 
$_entity_id,
+                                                       'name'          => 
$entity_lookup['name']
+                                               );
+                                       }
+                               }
+                       }
+//_debug_array($data['lookup_entity']);die();
                        if (isset($data['lookup_entity']) && 
is_array($data['lookup_entity']))
                        {
                                foreach($data['lookup_entity'] as $entity)
                                {
                                        $m++;
 
+                                       $p_cat_id = 
isset($data['entity_data'][$entity['id']]['p_cat_id']) ? 
$data['entity_data'][$entity['id']]['p_cat_id'] : '';
                                        $lookup_functions[] = array
                                                (
                                                        'name'          => 
'lookup_entity_' . $entity['id'] .'()',
-                                                       'link'          => 
"menuaction:'property.uilookup.entity',location_type:{$data['type_id']},entity_id:{$entity['id']},location_code:'{$filter_location}',block_query:'{$block_query}'",
+                                                       'link'          => 
"menuaction:'property.uilookup.entity',location_type:{$data['type_id']},entity_id:{$entity['id']},cat_id:'{$p_cat_id}',location_code:'{$filter_location}',block_query:'{$block_query}'",
                                                        'action'        => 
'Window1=window.open(strURL,"Search","left=50,top=100,width=1200,height=700,toolbar=no,scrollbars=yes,resizable=yes");'
                                                );
 

Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php   2011-04-10 17:06:22 UTC (rev 
7202)
+++ trunk/property/inc/class.soentity.inc.php   2011-04-10 17:09:05 UTC (rev 
7203)
@@ -119,6 +119,7 @@
                        $location_code  = isset($data['location_code']) ? 
$data['location_code'] : '';
                        $criteria_id    = isset($data['criteria_id']) ? 
$data['criteria_id'] : '';
                        $attrib_filter  = $data['attrib_filter'] ? 
$data['attrib_filter'] : array();
+                       $p_num                  = isset($data['p_num']) ? 
$data['p_num'] : '';
 
                        if(!$entity_id || !$cat_id)
                        {
@@ -400,6 +401,11 @@
                                $where= 'AND';                  
                        }
 
+                       if ($p_num)
+                       {
+                               $filtermethod .= " $where 
$entity_table.p_num='$p_num'";
+                               $where= 'AND';
+                       }
 
                        $_querymethod = array();
                        $__querymethod = array();
@@ -1017,7 +1023,7 @@
                                                        (
                                                                'entity_link'   
=> $GLOBALS['phpgw']->link('/index.php',array
                                                                (
-                                                                       
'menuaction'    => "property.ui{$type}.index",
+                                                                       
'menuaction'    => "property.uientity.index",
                                                                        
'entity_id'             => $entry['entity_id'],
                                                                        
'cat_id'                => $entry['cat_id'],
                                                                        
'p_entity_id'   => $entity_id,

Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php   2011-04-10 17:06:22 UTC (rev 
7202)
+++ trunk/property/inc/class.uientity.inc.php   2011-04-10 17:09:05 UTC (rev 
7203)
@@ -85,6 +85,7 @@
                        $this->district_id                      = 
$this->bo->district_id;
                        $this->status                           = 
$this->bo->status;
                        $this->location_code            = 
$this->bo->location_code;
+                       $this->p_num                            = 
$this->bo->p_num;
                        $this->category_dir                     = 
$this->bo->category_dir;
                        
$GLOBALS['phpgw']->session->appsession('entity_id','property',$this->entity_id);
                        $this->start_date                       = 
$this->bo->start_date;
@@ -387,7 +388,8 @@
                                                'entity_id'                     
=> $this->entity_id,
                                                'cat_id'                => 
$this->cat_id,
                                                'type'                          
        => $this->type,
-                                               'district_id'                   
=> $this->district_id
+                                               'district_id'                   
=> $this->district_id,
+                                               'p_num'                         
        => $this->p_num
                                        ));
                                $datatable['config']['allow_allrows'] = true;
 
@@ -396,7 +398,8 @@
                                        "entity_id:'{$this->entity_id}',".
                                        "cat_id:'{$this->cat_id}',".
                                        "type:'{$this->type}',".
-                                       "district_id:'{$this->district_id}'";
+                                       "district_id:'{$this->district_id}',".
+                                       "p_num:'{$this->p_num}'";
 
                                // this array "$arr_filter_hide" indicate what 
filters are hidden or not
                                $arr_filter_hide = array();




reply via email to

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