fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13334]


From: Nelson Guerra
Subject: [Fmsystem-commits] [13334]
Date: Tue, 02 Jun 2015 22:02:44 +0000

Revision: 13334
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13334
Author:   nelson224
Date:     2015-06-02 22:02:43 +0000 (Tue, 02 Jun 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/property/inc/class.uiinvestment.inc.php

Modified: branches/dev-syncromind/property/inc/class.uiinvestment.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiinvestment.inc.php     
2015-06-02 22:02:12 UTC (rev 13333)
+++ branches/dev-syncromind/property/inc/class.uiinvestment.inc.php     
2015-06-02 22:02:43 UTC (rev 13334)
@@ -54,9 +54,7 @@
                                'index'         => true,
                                'history'       => true,
                                'add'           => true,
-                               'delete'        => true,
-                '_get_filters' => true,
-                'updateinvest' => true,
+                               'delete'        => true
                        );
 
                function __construct()
@@ -148,11 +146,12 @@
         
         public function query()
         {
-
                        $search     = phpgw::get_var('search');
                        $order      = phpgw::get_var('order');
                        $draw       = phpgw::get_var('draw', 'int');
                        $columns    = phpgw::get_var('columns');
+                       $order[0]['column'] = 2;
+                       $order[0]['dir'] = "desc";
             
             $params = array
                 (
@@ -188,22 +187,22 @@
                                        $link_history = "<a 
href=\"".$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvestment.history', 'entity_id'=> $investment['entity_id'], 
'investment_id'=> $investment['investment_id'], 'entity_type'=> 
$this->cat_id))."\">".lang('History')."</a>";
                                        if($investment['value']!= 0)
                                        {
-                                               $check = "<input 
type=\"hidden\" name=\"values[update][".$counter."]\" value=\"\" 
class=\"myValuesForPHP select_hidden\"  />";
-                                               $check .= "<input 
type=\"checkbox\" name=\"values[update_tmp][".$counter."]\" 
value=\"".$counter."\" class=\"mychecks select_check\"  id=\"check\"/>";
+                                               //$check = "<input 
counter=\"".$counter."\" type=\"hidden\" name=\"values[update][".$counter."]\" 
class=\"myValuesForPHP select_hidden\"  />";
+                                               $check = "<input 
type=\"checkbox\" name=\"values[update_tmp][".$counter."]\" 
value=\"".$counter."\" class=\"mychecks select_check\"  id=\"check\" />";
                                        }
                                }
 
-                               $my_district = "";
-                               $my_district .= "<input type=\"hidden\" 
name=\"values[entity_id][".$counter."]\" value=\"".$investment['entity_id']."\" 
class=\"myValuesForPHP\"  />";
-                               $my_district .= "<input type=\"hidden\" 
name=\"values[investment_id][".$counter."]\" 
value=\"".$investment['investment_id']."\" class=\"myValuesForPHP\"  />";
-                               $my_district .= "<input type=\"hidden\" 
name=\"values[initial_value][".$counter."]\" 
value=\"".$investment['initial_value']."\" class=\"myValuesForPHP\"  />";
-                               $my_district .= "<input type=\"hidden\" 
name=\"values[value][".$counter."]\" value=\"".$investment['value']."\" 
class=\"myValuesForPHP\"  />";
-                               $my_district .= $investment['district_id'];
+                               /*$my_district = "";
+                               $my_district .= "<input type=\"hidden\" 
name=\"values[entity_id][".$counter."]\" value=\"".$investment['entity_id']."\" 
class=\"entity_id\"  />";
+                               $my_district .= "<input type=\"hidden\" 
name=\"values[investment_id][".$counter."]\" 
value=\"".$investment['investment_id']."\" class=\"investment_id\"  />";
+                               $my_district .= "<input type=\"hidden\" 
name=\"values[initial_value][".$counter."]\" 
value=\"".$investment['initial_value']."\" class=\"initial_value\"  />";
+                               $my_district .= "<input type=\"hidden\" 
name=\"values[value][".$counter."]\" value=\"".$investment['value']."\" 
class=\"value\"  />";
+                               $my_district .= $investment['district_id'];*/
 
                                $content[] = array
                                        (
                                                'order_dummy'           => 
$investment['part_of_town'],
-                                               'district_id'           => 
$my_district,        
+                                               'district_id'           => 
$investment['district_id'],  
                                                'part_of_town'          => 
$investment['part_of_town'],                 
                                                'entity_id'                     
=> $investment['entity_id'],
                                                'investment_id'         => 
$investment['investment_id'],
@@ -239,32 +238,7 @@
             return $this->jquery_results($result_data);
             
         }
-         
-        function updateinvest()
-        {
-            
-            $ids                = !empty($_POST['ids'])?$_POST['ids']:'';
-            $new_date           = !empty($_POST['date'])?$_POST['date']:'';
-            $new_index          = !empty($_POST['index'])?$_POST['index']:'';
-            $entity_id          = !empty($_POST['entid'])?$_POST['entid']:'';
-            $investment_id      = !empty($_POST['invid'])?$_POST['invid']:'';
-            $initial_value      = !empty($_POST['inval'])?$_POST['inval']:'';
-            $value              = !empty($_POST['value'])?$_POST['value']:'';
-            $counter            = !empty($_POST['up'])?$_POST['up']:'';
-            
-            $values = array(
-                            'entity_id'     => $entity_id,
-                            'investment_id' => $investment_id,
-                            'initial_value' => $initial_value,
-                            'value'         => $value,
-                            'update'        => $counter,
-                            'new_index'     => $new_index,
-                            'date'          => $new_date,
-                           );
-            
-            $receipt    = $this->update_investment($values);
-            
-        }
+
         
                function index()
                {
@@ -291,11 +265,14 @@
                                $this->allrows                  = 
$this->bo->allrows;
                        }
             
+                       if($values && phpgw::get_var('phpgw_return_as') == 
'json')
+                       {
+                               return $this->update_investment($values);
+                       }
+                       
                        if(phpgw::get_var('phpgw_return_as') == 'json')
                        {
                 return $this->query();
-//                             $receipt         = 
$this->update_investment($values);
-//                             $msgbox_data = 
$this->bocommon->msgbox_data($receipt);
                        }
 
             
self::add_javascript('phpgwapi','jquery','editable/jquery.jeditable.js');
@@ -399,431 +376,17 @@
                 array_unshift($data['form']['toolbar']['item'], $filter);
             }
             
-            $data['datatable']['actions'] = array(
-                               'my_name'=> '',
-                       );
-
-//                     $datatable = array();
-//
-//                     if( phpgw::get_var('phpgw_return_as') != 'json' )
-//                     {
-//                             $datatable['menu']                              
        = $this->bocommon->get_menu();
-//                             $datatable['config']['base_url'] = 
$GLOBALS['phpgw']->link('/index.php', array
-//                                     (
-//                                             'menuaction'            => 
'property.uiinvestment.index',
-//                                             'chapter_id'            => 
$this->chapter_id,
-//                                             'cat_id'                        
=> $this->cat_id,
-//                                             'part_of_town_id'       => 
$this->part_of_town_id,
-//                                             'filter'                        
=> $this->filter                       
-//                                     )
-//                             );
-//
-//                             $datatable['config']['allow_allrows'] = true;
-//
-//                             $datatable['config']['base_java_url'] = 
"menuaction     :'property.uiinvestment.index',"
-//                                     ."chapter_id: '{$this->chapter_id}',"
-//                                     ."cat_id: '{$this->chapter_id}',"
-//                                     ."part_of_town_id: 
'{$this->part_of_town_id}',"
-//                                     ."filter: '{$this->filter}'";
-//
-//                             $values_combo_box[0] = 
$this->bo->select_category('select',$this->cat_id);                             
 
-//                             $default_value = array ('id'=>'','name'=> 
lang('no category'));
-//                             array_unshift 
($values_combo_box[0],$default_value);
-//
-//                             $values_combo_box[1]  = 
$this->bocommon->select_part_of_town('',$this->part_of_town_id);
-//                             //$values_combo_box[1] =  
$this->bocommon->select_part_of_town('filter',$this->part_of_town_id,$this->district_id);
-//                             $default_value = array 
('id'=>'','name'=>lang('Part of town'));
-//                             array_unshift 
($values_combo_box[1],$default_value);
-//
-//                             $values_combo_box[2]  = 
$this->bo->filter('select',$this->filter);
-//                             $default_value = array 
('id'=>'','name'=>lang('Show all'));
-//                             array_unshift 
($values_combo_box[2],$default_value);    
-//
-//                             $datatable['actions']['form'] = array
-//                                     (
-//                                             array
-//                                             (
-//                                                     'action'        => 
$GLOBALS['phpgw']->link('/index.php',
-//                                                     array
-//                                                     (
-//                                                             'menuaction'    
        => 'property.uiinvestment.index'/*,
-//                                                             'query'         
        => $this->query,
-//                                                             'chapter_id'    
        => $this->chapter_id*/
-//                                                     )
-//                                             ),
-//                                             'fields'        => array
-//                                             (
-//                                                     'field' => array
-//                                                     (
-//                                                             array
-//                                                             ( //container 
of  control's Form
-//                                                                     'type'  
=> 'label',
-//                                                                     'id'    
=> 'controlsForm_container',
-//                                                                     'value' 
=> ''
-//                                                             ),
-//                                                             array
-//                                                             ( //category
-//                                                                     'id' => 
'btn_cat_id',
-//                                                                     'name' 
=> 'cat_id',
-//                                                                     'value' 
=> lang('Category'),
-//                                                                     'type' 
=> 'button',
-//                                                                     'style' 
=> 'filter',
-//                                                                     
'tab_index' => 1
-//                                                             ),
-//                                                             array
-//                                                             ( //User pafrt 
of town
-//                                                                     'id' => 
'btn_part_of_town_id',
-//                                                                     'name' 
=> 'part_of_town_id',
-//                                                                     'value' 
=> lang('Part of Town'),
-//                                                                     'type' 
=> 'button',
-//                                                                     'style' 
=> 'filter',
-//                                                                     
'tab_index' => 2
-//                                                             ),
-//                                                             array
-//                                                             ( //User filter
-//                                                                     'id' => 
'btn_filter',
-//                                                                     'name' 
=> 'filter',
-//                                                                     'value' 
=> lang('Filter'),
-//                                                                     'type' 
=> 'button',
-//                                                                     'style' 
=> 'filter',
-//                                                                     
'tab_index' => 3
-//                                                             ),
-//                                                             array
-//                                                             ( // boton ADD
-//                                                                     'type'  
=> 'button',//'submit',
-//                                                                     'id'    
=> 'btn_new',
-//                                                                     
'tab_index' => 4,
-//                                                                     'value' 
=> lang('add')
-//                                                             )
-//                                                     ),
-//                                                     'hidden_value' => array
-//                                                     (
-//                                                             array
-//                                                             ( //div values  
combo_box_0
-//                                                                     'id' => 
'values_combo_box_0',
-//                                                                     'value' 
=> $this->bocommon->select2String($values_combo_box[0])
-//                                                             ),
-//                                                             array
-//                                                             ( //div values  
combo_box_1
-//                                                                     'id' => 
'values_combo_box_1',
-//                                                                     'value' 
=> $this->bocommon->select2String($values_combo_box[1])
-//                                                             ),
-//                                                             array
-//                                                             ( //div values  
combo_box_2
-//                                                                     'id' => 
'values_combo_box_2',
-//                                                                     'value' 
=> $this->bocommon->select2String($values_combo_box[2])
-//                                                             )
-//                                                     )
-//                                             )
-//                                     )
-//                             );
-//                             $datatable['actions']['down-toolbar'] = array
-//                                     (
-//                                             'fields'        => array
-//                                             (
-//                                                     'field' => array
-//                                                     (
-//                                                             array
-//                                                             ( //container 
of  control's Form
-//                                                                     'type'  
=> 'label',
-//                                                                     'id'    
=> 'controlsForm_container',
-//                                                                     'value' 
=> ''
-//                                                             ),array
-//                                                             ( // Voucher 
link
-//                                                                     'type'  
=> 'link',
-//                                                                     'id'    
=> 'lnk_index',
-//                                                                     'url'   
=> "",
-//                                                                     'value' 
=> lang('New index'),
-//                                                                     
'tab_index' => 5,
-//                                                                     'style' 
=> 'filter'
-//                                                             ),
-//                                                             array
-//                                                             ( // Voucher box
-//                                                                     'name'  
=> 'values[new_index]',
-//                                                                     'id'    
=> 'txt_index',
-//                                                                     'value' 
=> '',
-//                                                                     'type'  
=> 'text',
-//                                                                     'size'  
=> 8,
-//                                                                     
'tab_index' => 6,
-//                                                                     'class' 
=> 'myValuesForPHP down-toolbar_button',
-//                                                                     'style' 
=> 'filter'
-//                                                             ),
-//                                                             array
-//                                                             ( // imag 
calendar1
-//                                                                     'type'  
=> 'img',
-//                                                                     'id'    
=> 'start_date-trigger',
-//                                                                     'src'   
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-//                                                                     'alt'   
=> lang('Select date'),
-//                                                                     
'tab_index' => 7,
-//                                                                     'style' 
=> 'filter'
-//                                                             ),
-//                                                             array
-//                                                             ( // calendar1 
start_date
-//                                                                     'type'  
=> 'text',
-//                                                                     'name'  
=> 'values[date]',
-//                                                                     'id'    
=> 'start_date',
-//                                                                     'value' 
=> '',
-//                                                                     'size'  
=> 7,
-//                                                                     
'readonly' => 'readonly',
-//                                                                     
'tab_index' => 8,
-//                                                                     'class' 
=> 'myValuesForPHP down-toolbar_button',
-//                                                                     'style' 
=> 'filter'
-//                                                             ),
-//                                                             array
-//                                                             ( //boton   
SEARCH
-//                                                                     'id' => 
'btn_update',
-//                                                                     'name' 
=> 'update',
-//                                                                     'value' 
   => lang('Update'),
-//                                                                     
'tab_index' => 9,
-//                                                                     'type' 
=> 'button',
-//                                                                     'style' 
=> 'filter'
-//                                                             )
-//                                                     )
-//                                             )
-//                                     );
-//                     }
-
-
-//                     $uicols = array (
-//                             
array('hidden'=>false,'name'=>'order_dummy','label'=>'','className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'district_id','label'=>lang('District'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'part_of_town','label'=>lang('Part of 
town'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'entity_id','label'=>lang('entity 
id'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'investment_id','label'=>lang('investment 
id'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'descr','label'=>lang('Descr'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'entity_name','label'=>lang('Entity 
name'),'className'=>'leftClasss',      'sortable'=>false),
-//                             
array('hidden'=>false,'name'=>'initial_value_ex','label'=>'','className'=>'rightClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'initial_value','label'=>lang('Initial 
value'),'className'=>'rightClasss','sortable'=>false,'formatter'=>'myFormatCount2'),
-//                             
array('hidden'=>false,'name'=>'value_ex','label'=>'','className'=>'rightClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'value','label'=>lang('Value'),'className'=>'rightClasss',
 'sortable'=>false,'formatter'=>'myFormatCount2'),
-//                             
array('hidden'=>true,'name'=>'this_index','label'=>lang('Last 
index'),'className'=>'rightClasss',       'sortable'=>false),
-//                             
array('hidden'=>false,'name'=>'this_write_off_ex','label'=>'','className'=>'rightClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'this_write_off','label'=>lang('Write 
off'),'className'=>'rightClasss','sortable'=>false,'formatter'=>'myFormatCount2'),
-//                             
array('hidden'=>true,'name'=>'date','label'=>lang('Date'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'index_count','label'=>lang('Index 
count'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'link_history','label'=>lang('History'),'className'=>'centerClasss','sortable'=>false),
-//                             
array('hidden'=>true,'name'=>'check','label'=>lang('Select'),'className'=>'centerClasss','sortable'=>false)
-//                             );
-
-            
-//                     $investment_list = $this->bo->read();
-// 
-//                     $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
-//                     $sep = '/';
-//                     $dlarr[strpos($dateformat,'y')] = 'Y';
-//                     $dlarr[strpos($dateformat,'m')] = 'm';
-//                     $dlarr[strpos($dateformat,'d')] = 'd';
-//                     ksort($dlarr);
-//                     $dateformat     = (implode($sep,$dlarr));
-//
-//                     $GLOBALS['phpgw']->jqcal->add_listener('start_date');
-//                     $counter = $sum_initial_value = $sum_value = 0;
-//
-//                     while (is_array($investment_list) && list(,$investment) 
= each($investment_list))
-//                     {
-//                             $link_history = $check = "";
-//                             if($this->admin_invoice)
-//                             {
-//                                     $link_history = "<a 
href=\"".$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvestment.history', 'entity_id'=> $investment['entity_id'], 
'investment_id'=> $investment['investment_id'], 'entity_type'=> 
$this->cat_id))."\">".lang('History')."</a>";
-//                                     if($investment['value']!= 0)
-//                                     {
-//                                             $check = "<input 
type=\"hidden\" name=\"values[update][".$counter."]\" value=\"\" 
class=\"myValuesForPHP select_hidden\"  />";
-//                                             $check .= "<input 
type=\"checkbox\" name=\"values[update_tmp][".$counter."]\" 
value=\"".$counter."\" class=\"select_check\"  />";
-//                                     }
-//                             }
-//
-//                             $my_district = "";
-//                             $my_district .= "<input type=\"hidden\" 
name=\"values[entity_id][".$counter."]\" value=\"".$investment['entity_id']."\" 
class=\"myValuesForPHP\"  />";
-//                             $my_district .= "<input type=\"hidden\" 
name=\"values[investment_id][".$counter."]\" 
value=\"".$investment['investment_id']."\" class=\"myValuesForPHP\"  />";
-//                             $my_district .= "<input type=\"hidden\" 
name=\"values[initial_value][".$counter."]\" 
value=\"".$investment['initial_value']."\" class=\"myValuesForPHP\"  />";
-//                             $my_district .= "<input type=\"hidden\" 
name=\"values[value][".$counter."]\" value=\"".$investment['value']."\" 
class=\"myValuesForPHP\"  />";
-//                             $my_district .= $investment['district_id'];
-//
-//                             $content[] = array
-//                                     (
-//                                             'order_dummy'           => 
$investment['part_of_town'],
-//                                             'district_id'           => 
$my_district,        
-//                                             'part_of_town'          => 
$investment['part_of_town'],                 
-//                                             'entity_id'                     
=> $investment['entity_id'],
-//                                             'investment_id'         => 
$investment['investment_id'],
-//                                             'descr'                         
=> $investment['descr'],
-//                                             'entity_name'           => 
$investment['entity_name'],
-//                                             'initial_value_ex'      => 
($investment['initial_value']==""?0:$investment['initial_value']),
-//                                             'initial_value'         => 
number_format($investment['initial_value'], 0, ',', ''), //to avoid error in 
YUI's sum
-//                                             'value_ex'                      
=> ($investment['value']==""?0:$investment['value']),
-//                                             'value'                         
=> number_format($investment['value'], 0, ',', ''),//to avoid error in YUI's sum
-//                                             'this_index'            => 
$investment['this_index'],
-//                                             'this_write_off_ex'     => 
$investment['this_write_off'],
-//                                             'this_write_off'        => 
number_format($investment['this_write_off'], 0, ',', ''),
-//                                             'date'                          
=> date($dateformat,strtotime($investment['date'])),
-//                                             'index_count'           => 
$investment['index_count'],
-//                                             'link_history'          => 
$link_history,
-//                                             'check'                         
=> $check
-//                                     );
-//                             $counter++;
-//                     }       
-//            
-//                     $j=0;
-//                     if (isset($content) && is_array($content))
-//                     {
-//                             foreach($content as $investment)
-//                             {
-//                                     for ($i=0;$i<count($uicols);$i++)
-//                                     {
-//                                             
$datatable['rows']['row'][$j]['column'][$i]['name']             = 
$uicols[$i]['name'];
-//                                             
$datatable['rows']['row'][$j]['column'][$i]['value']            = 
$investment[$uicols[$i]['name']];
-//                                     }
-//                                     $j++;
-//                             }
-//                     }
-
-//                     $data['datatable']['actions'] = array();
+            $data['datatable']['actions'] = '';
                        
-
-//                     for ($i=0;$i<count($uicols);$i++)
-//                     {
-//                             $datatable['headers']['header'][$i]['name']     
                = $uicols[$i]['name'];
-//                             $datatable['headers']['header'][$i]['text']     
        = $uicols[$i]['label'];
-//                             $datatable['headers']['header'][$i]['visible']  
        = $uicols[$i]['visible'];
-//                             $datatable['headers']['header'][$i]['sortable'] 
        = $uicols[$i]['sortable'];
-//                             
$datatable['headers']['header'][$i]['sort_field']       = 
$uicols[$i]['sort_field'];
-//                             
$datatable['headers']['header'][$i]['className']        = 
$uicols[$i]['className'];
-//                             
$datatable['headers']['header'][$i]['formatter']        = 
($uicols[$i]['formatter']==''?  '""' : $uicols[$i]['formatter']);
-//                     }
-
-
-                       // path for property.js
-//                     $property_js = "/property/js/yahoo/property.js";
-//
-//                     if 
(!isset($GLOBALS['phpgw_info']['server']['no_jscombine']) || 
!$GLOBALS['phpgw_info']['server']['no_jscombine'])
-//                     {
-//                             $cachedir = 
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
-//                             $property_js = 
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" . 
str_replace('/', '--', ltrim($property_js,'/'));
-//                     }
-//
-//                     $datatable['property_js'] = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . $property_js;
-//
-//                     // Pagination and sort values
-//                     $datatable['pagination']['records_start']       = 
(int)$this->bo->start;
-//                     $datatable['pagination']['records_limit']       = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-//                     //$datatable['pagination']['records_returned']= 
count($content);
-//                     $datatable['pagination']['records_total']       = 
$this->bo->total_records;
-//
-//                     if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
-//                     {
-//                             //avoid ,in the last page, reformate paginator 
when records are lower than records_returned
-//                             if(count($content) <= 
$datatable['pagination']['records_limit'])
-//                             {
-//                                     
$datatable['pagination']['records_returned']= count($content);
-//                             }
-//                             else
-//                             {
-//                                     
$datatable['pagination']['records_returned']= 
$datatable['pagination']['records_limit'];
-//                             }
-//
-//                             $datatable['sorting']['currentPage']    = 1;
-//                             $datatable['sorting']['order']                  
= $uicols[0]['name']; // name key Column in myColumnDef
-//                             $datatable['sorting']['sort']                   
= 'asc'; // ASC / DESC
-//                     }
-//                     else
-//                     {
-//                             $datatable['sorting']['currentPage']    = 
phpgw::get_var('currentPage');
-//                             $datatable['sorting']['order']                  
= phpgw::get_var('order', 'string'); // name of column of Database
-//                             $datatable['sorting']['sort']                   
= phpgw::get_var('sort', 'string'); // ASC / DESC
-//                             $datatable['pagination']['records_returned']= 
phpgw::get_var('recordsReturned', 'int');
-//                     }
-//
-//                     phpgwapi_yui::load_widget('dragdrop');
-//                     phpgwapi_yui::load_widget('datatable');
-//                     phpgwapi_yui::load_widget('menu');
-//                     phpgwapi_yui::load_widget('connection');
-//                     phpgwapi_yui::load_widget('loader');
-//                     phpgwapi_yui::load_widget('tabview');
-//                     phpgwapi_yui::load_widget('paginator');
-//                     phpgwapi_yui::load_widget('animation');
-//
-//                     //-- BEGIN----------------------------- JSON CODE 
------------------------------
-//
-//                     //values for Pagination
-//                     $json = array
-//                             (
-//                                     'recordsReturned'       => 
$datatable['pagination']['records_returned'],
-//                                     'totalRecords'          => 
(int)$datatable['pagination']['records_total'],
-//                                     'startIndex'            => 
$datatable['pagination']['records_start'],
-//                                     'sort'                          => 
$datatable['sorting']['order'],
-//                                     'dir'                           => 
$datatable['sorting']['sort'],
-//                                     'currentPage'           => 
$datatable['sorting']['currentPage'],
-//                                     'records'                       => 
array()
-//                             );
-//
-//                     // values for datatable
-//                     if(isset($datatable['rows']['row']) && 
is_array($datatable['rows']['row'])){
-//                             foreach( $datatable['rows']['row'] as $row )
-//                             {
-//                                     $json_row = array();
-//                                     foreach( $row['column'] as $column)
-//                                     {
-//                                             $json_row[$column['name']] = 
$column['value'];
-//                                     }
-//                                     $json['records'][] = $json_row;
-//                             }
-//                     }
-//
-//                     // right in datatable
-//                     if(isset($datatable['rowactions']['action']) && 
is_array($datatable['rowactions']['action']))
-//                     {
-//                             $json ['rights'] = 
$datatable['rowactions']['action'];
-//                     }
-//                     $json['message']                        = 
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
-//                     //$json ['sum_initial_value'] = 
number_format($sum_initial_value, 0, ',', '');
-//                     //$json ['sum_value']           = 
number_format($sum_value, 0, ',', '');
-//                     //$json['sum_this_write_off_ex']                = 
number_format($sum_this_write_off_ex, 0, ',', '');
-//                     //_debug_array($json);
-//
-//                     if( phpgw::get_var('phpgw_return_as') == 'json' )
-//                     {
-//                             return $json;
-//                     }
-//
-//
-//                     $datatable['json_data'] = json_encode($json);
-//                     //-------------------- JSON CODE ----------------------
-//
-//                     // Prepare template variables and process XSLT
-//                     $template_vars = array();
-//                     $template_vars['datatable'] = $datatable;
-//                     
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
-//                     $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
$template_vars);
-//
-//                     if ( !isset($GLOBALS['phpgw']->css) || 
!is_object($GLOBALS['phpgw']->css) )
-//                     {
-//                             $GLOBALS['phpgw']->css = 
createObject('phpgwapi.css');
-//                     }
-//                     // Prepare CSS Style
-//                     $GLOBALS['phpgw']->css->validate_file('datatable');
-//                     $GLOBALS['phpgw']->css->validate_file('property');
-//                     
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
-//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-//
-//                     //Title of Page
-//                     $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . lang('investment') . ': ' . lang('list investment');
-//
-//                     // Prepare YUI Library
-//                     $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'investment.index', 'property' );
-                       //$this->save_sessiondata();                    
             phpgwapi_jquery::load_widget('numberformat');
             self::add_javascript('property', 'portico', 'investment.index.js');
-
             self::render_template_xsl('uiinvestment.index',$data);
                }
 
 
                function update_investment($values='')
                {
-                       //_debug_array($values);
-
+                       
                        $receipt = array();
 
                        if(!$values['date'])




reply via email to

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