fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6717] property: end date (as custom column) at order


From: Sigurd Nes
Subject: [Fmsystem-commits] [6717] property: end date (as custom column) at order list and tweak projekt list
Date: Sun, 02 Jan 2011 19:39:45 +0000

Revision: 6717
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6717
Author:   sigurdne
Date:     2011-01-02 19:39:45 +0000 (Sun, 02 Jan 2011)
Log Message:
-----------
property: end date (as custom column) at order list and tweak projekt list

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.boworkorder.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/property/inc/class.uiworkorder.inc.php

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2011-01-02 18:01:59 UTC (rev 
6716)
+++ trunk/property/inc/class.boproject.inc.php  2011-01-02 19:39:45 UTC (rev 
6717)
@@ -126,6 +126,16 @@
                        $columns = array();
                        $columns[] = array
                                (
+                                       'id' => 'entry_date',
+                                       'name'=> lang('entry date')
+                               );
+                       $columns[] = array
+                               (
+                                       'id' => 'start_date',
+                                       'name'=> lang('start date')
+                               );
+                       $columns[] = array
+                               (
                                        'id' => 'end_date',
                                        'name'=> lang('end date')
                                );
@@ -348,6 +358,7 @@
 
                        foreach ($project as & $entry)
                        {
+                               $entry['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat);
                                $entry['start_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['start_date'],$dateformat);
                                $entry['end_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['end_date'],$dateformat);
                                if(!isset($data['skip_origin']) || 
!$data['skip_origin'])

Modified: trunk/property/inc/class.boworkorder.inc.php
===================================================================
--- trunk/property/inc/class.boworkorder.inc.php        2011-01-02 18:01:59 UTC 
(rev 6716)
+++ trunk/property/inc/class.boworkorder.inc.php        2011-01-02 19:39:45 UTC 
(rev 6717)
@@ -175,11 +175,29 @@
                        }
                        $filter = array('list' => ''); // translates to "list 
IS NULL"
                        $columns = array();
+
                        $columns[] = array
                                (
+                                       'id' => 'entry_date',
+                                       'name'=> lang('entry date')
+                               );
+
+                       $columns[] = array
+                               (
+                                       'id' => 'start_date',
+                                       'name'=> lang('start date')
+                               );
+                       $columns[] = array
+                               (
+                                       'id' => 'end_date',
+                                       'name'=> lang('end date')
+                               );
+                       $columns[] = array
+                               (
                                        'id' => 'billable_hours',
                                        'name'=> lang('billable hours')
                                );
+
                        
$column_list=$this->bocommon->select_multi_list($selected,$columns);
                        return $column_list;
                }
@@ -402,6 +420,8 @@
                        foreach ($workorder as &$entry)
                        {
                                $entry['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat);
+                               $entry['start_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['start_date'],$dateformat);
+                               $entry['end_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['end_date'],$dateformat);
                        }
 
                        return $workorder;

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2011-01-02 18:01:59 UTC (rev 
6716)
+++ trunk/property/inc/class.soproject.inc.php  2011-01-02 19:39:45 UTC (rev 
6717)
@@ -162,11 +162,23 @@
                                $uicols['formatter'][]          = '';
                                $uicols['classname'][]          = '';
 
+                               $cols.= ",$entity_table.entry_date";
+                               $cols_return[]                          = 
'entry_date';
                                $cols.= ",$entity_table.start_date";
                                $cols_return[]                          = 
'start_date';
                                $cols.= ",$entity_table.end_date";
                                $cols_return[]                          = 
'end_date';
-
+/*
+                               $uicols['input_type'][]         = 'text';
+                               $uicols['name'][]                       = 
'entry_date';
+                               $uicols['descr'][]                      = 
lang('entry date');
+                               $uicols['statustext'][]         = lang('Project 
entry date');
+                               $uicols['exchange'][]           = false;
+                               $uicols['align'][]                      = '';
+                               $uicols['datatype'][]           = '';
+                               $uicols['formatter'][]          = '';
+                               $uicols['classname'][]          = '';
+*/
                                $cols.= ",$entity_table.name as name";
                                $cols_return[]                          = 
'name';
                                $uicols['input_type'][]         = 'text';
@@ -284,17 +296,6 @@
                                $this->bocommon->fm_cache('sql_project_' . 
!!$wo_hour_cat_id,$sql);
 
                                $this->uicols           = 
$this->bocommon->uicols;
-
-                               $this->uicols['input_type'][]           = 
'text';
-                               $this->uicols['name'][]                         
= 'start_date';
-                               $this->uicols['descr'][]                        
= lang('start date');
-                               $this->uicols['statustext'][]           = 
lang('Project start date');
-                               $this->uicols['exchange'][]                     
= false;
-                               $this->uicols['align'][]                        
= '';
-                               $this->uicols['datatype'][]                     
= '';
-                               $this->uicols['formatter'][]            = '';
-                               $this->uicols['classname'][]            = '';
-
                                $cols_return            = 
$this->bocommon->cols_return;
                                $type_id                = 
$this->bocommon->type_id;
                                $this->cols_extra       = 
$this->bocommon->cols_extra;
@@ -373,7 +374,7 @@
                                $where= 'AND';
                        }
 
-                       $group_method = ' GROUP BY 
fm_project_status.descr,loc1_name,fm_project.location_code,fm_project.id,fm_project.start_date,fm_project.end_date,'
+                       $group_method = ' GROUP BY 
fm_project_status.descr,loc1_name,fm_project.location_code,fm_project.id,fm_project.entry_date,fm_project.start_date,fm_project.end_date,'
                                . 
'fm_project.name,phpgw_accounts.account_lid,fm_project.user_id,fm_project.address,'
                                . 
'fm_project.budget,fm_project.reserve,planned_cost,project_group';
 

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2011-01-02 18:01:59 UTC 
(rev 6716)
+++ trunk/property/inc/class.soworkorder.inc.php        2011-01-02 19:39:45 UTC 
(rev 6717)
@@ -187,13 +187,18 @@
 
                                $cols .= ",fm_workorder.entry_date as 
entry_date";
                                $cols_return[]                          = 
'entry_date';
+                               $cols .= ",fm_workorder.start_date as 
start_date";
+                               $cols_return[]                          = 
'start_date';
+                               $cols .= ",fm_workorder.end_date as end_date";
+                               $cols_return[]                          = 
'end_date';
+/*
                                $uicols['input_type'][]         = 'text';
                                $uicols['name'][]                       = 
'entry_date';
                                $uicols['descr'][]                      = 
lang('Entry date');
                                $uicols['statustext'][]         = 
lang('Workorder entry date');
                                $uicols['formatter'][]          = '';
                                $uicols['classname'][]          = '';
-
+*/
                                $cols .= ",phpgw_accounts.account_lid as 
user_lid";
                                $cols_return[]                          = 
'user_lid';
                                $uicols['input_type'][]         = 'text';

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2011-01-02 18:01:59 UTC 
(rev 6716)
+++ trunk/property/inc/class.uiworkorder.inc.php        2011-01-02 19:39:45 UTC 
(rev 6717)
@@ -728,7 +728,7 @@
 
                        if ( (phpgw::get_var("start")== "") && 
(phpgw::get_var("order",'string')== ""))
                        {
-                               $datatable['sorting']['order']  = 'entry_date'; 
// name key Column in myColumnDef
+                               $datatable['sorting']['order']  = 
'workorder_id'; // name key Column in myColumnDef
                                $datatable['sorting']['sort']   = 'desc'; // 
ASC / DESC
                        }
                        else




reply via email to

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