fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7204] Merge 7200:7203 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7204] Merge 7200:7203 from trunk
Date: Sun, 10 Apr 2011 17:12:05 +0000

Revision: 7204
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7204
Author:   sigurdne
Date:     2011-04-10 17:12:05 +0000 (Sun, 10 Apr 2011)
Log Message:
-----------
Merge 7200:7203 from trunk

Modified Paths:
--------------
    
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
    branches/Version-1_0-branch/property/inc/class.boentity.inc.php
    branches/Version-1_0-branch/property/inc/class.bolocation.inc.php
    branches/Version-1_0-branch/property/inc/class.soentity.inc.php
    branches/Version-1_0-branch/property/inc/class.uientity.inc.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203

Modified: 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
===================================================================
--- 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
     2011-04-10 17:09:05 UTC (rev 7203)
+++ 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
     2011-04-10 17:12:05 UTC (rev 7204)
@@ -37,9 +37,10 @@
                                $p_cat_id = $origin_arr[3];
                                if($origin_table)
                                {
-                                       $this->db2->query("SELECT location_code 
FROM {$origin_table} WHERE num = '{$target_id}'",__LINE__,__FILE__);
+                                       $this->db2->query("SELECT 
location_code, address FROM {$origin_table} WHERE num = 
'{$target_id}'",__LINE__,__FILE__);
                                        $this->db2->next_record();
                                        $origin_location_code           = 
$this->db2->f('location_code');
+                                       $origin_address                         
= $this->db2->f('address');
                                        $value_set['location_code'] = 
$origin_location_code;
                                        $value_set['p_num']             = 
$target_id;
                                        $value_set['p_entity_id']       = 
$p_entity_id;
@@ -54,6 +55,7 @@
                                                        $j++;
                                                }
                                        }
+                                       $value_set['address']   = 
$origin_address;
                                }
                        }
                        else
@@ -73,6 +75,9 @@
                                {
                                        if($this->db->f($loc))
                                        {
+
+// 8.April 11: 'romid' is now loc5
+/*
                                                if($loc == 'romid')
                                                {
                                                        
$this->db2->query("SELECT loc5 FROM fm_location5 WHERE rom_nr_id = '" . 
$this->db->f($loc) . "' AND location_code {$this->like} '" . implode('-', 
$location) . "%'",__LINE__,__FILE__);
@@ -85,6 +90,7 @@
                                                        }
                                                }
                                                else
+*/
                                                {
                                                        $location[] = 
$this->db->f($loc);
                                                        $value_set["loc{$j}"] = 
$this->db->f($loc);

Modified: branches/Version-1_0-branch/property/inc/class.boentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boentity.inc.php     
2011-04-10 17:09:05 UTC (rev 7203)
+++ branches/Version-1_0-branch/property/inc/class.boentity.inc.php     
2011-04-10 17:12:05 UTC (rev 7204)
@@ -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: branches/Version-1_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bolocation.inc.php   
2011-04-10 17:09:05 UTC (rev 7203)
+++ branches/Version-1_0-branch/property/inc/class.bolocation.inc.php   
2011-04-10 17:12:05 UTC (rev 7204)
@@ -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: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2011-04-10 17:09:05 UTC (rev 7203)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2011-04-10 17:12:05 UTC (rev 7204)
@@ -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: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2011-04-10 17:09:05 UTC (rev 7203)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2011-04-10 17:12:05 UTC (rev 7204)
@@ -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]