[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.soinvoice.inc.php, 1.39, 1.40 clas
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] property/inc class.soinvoice.inc.php, 1.39, 1.40 class.soreport.inc.php, 1.10, 1.11 class.bocommon.inc.php, 1.80, 1.81 class.boreport.inc.php, 1.9, 1.10 class.soequipment.inc.php, 1.26, 1.27 class.uireport.inc.php, 1.17, 1.18 class.bolocation.inc.php, 1.29, 1.30 class.solocation.inc.php, 1.34, 1.35 class.sowo_hour.inc.php, 1.16, 1.17 class.uilocation.inc.php, 1.29, 1.30 class.uiequipment.inc.php, 1.32, 1.33 class.boequipment.inc.php, 1.15, 1.16 |
Date: |
Mon, 29 Sep 2003 17:53:54 +0000 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv8724/inc
Modified Files:
class.soinvoice.inc.php class.soreport.inc.php
class.bocommon.inc.php class.boreport.inc.php
class.soequipment.inc.php class.uireport.inc.php
class.bolocation.inc.php class.solocation.inc.php
class.sowo_hour.inc.php class.uilocation.inc.php
class.uiequipment.inc.php class.boequipment.inc.php
Log Message:
no message
Index: class.boreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boreport.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.boreport.inc.php 26 Sep 2003 18:04:34 -0000 1.9
--- class.boreport.inc.php 29 Sep 2003 17:53:51 -0000 1.10
***************
*** 216,220 ****
}
! function read($start_date='',$end_date='')
{
$start_date =
$this->bocommon->date_to_timestamp($start_date);
--- 216,221 ----
}
!
! function read($start_date='',$end_date='',$allrows='')
{
$start_date =
$this->bocommon->date_to_timestamp($start_date);
***************
*** 223,227 ****
$report = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' =>
$this->district_id,'status_id' => $this->status_id,
!
'start_date'=>$start_date,'end_date'=>$end_date));
$this->total_records = $this->so->total_records;
--- 224,228 ----
$report = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' =>
$this->district_id,'status_id' => $this->status_id,
!
'start_date'=>$start_date,'end_date'=>$end_date,'allrows'=>$allrows));
$this->total_records = $this->so->total_records;
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** class.uiequipment.inc.php 18 Jul 2003 09:34:54 -0000 1.32
--- class.uiequipment.inc.php 29 Sep 2003 17:53:51 -0000 1.33
***************
*** 22,25 ****
--- 22,27 ----
var $public_functions = array
(
+ 'columns'=> True,
+ 'excel' => True,
'index' => True,
'view' => True,
***************
*** 75,78 ****
--- 77,182 ----
}
+ function excel()
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework'] = True;
+ require('PEAR.php');
+ $xls =
CreateObject($this->currentapp.'.excel');
+
+ $equipment_list =
$this->bo->read(array('allrows'=>true));
+
+ $uicols = $this->bo->uicols;
+ $count_uicols_name=count($uicols['name']);
+
+ $j=0;
+ if (isset($equipment_list) AND
is_array($equipment_list))
+ {
+ $str=$xls->Begin();
+ foreach($equipment_list as $equipment_entry)
+ {
+ $m=0;
+ for ($k=0;$k<$count_uicols_name;$k++)
+ {
+
if($uicols['input_type'][$k]!='hidden')
+ {
+ $content[$j][$k]
= $equipment_entry[$uicols['name'][$k]];
+
$xls->WriteLabel(0,$k,$uicols['descr'][$k]);
+
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
+ $m++;
+ }
+ }
+
+ $j++;
+ }
+
+ foreach($content as $row)
+ {
+ $line++;
+ for ($i=0; $i<count($row); $i++)
+ {
+
$str.=$xls->WriteLabel($line,$i,$row[$i]);
+ }
+ }
+
+ $filename=
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
+ $str.=$xls->EOF();
+ $size=strlen($str);
+
+ $browser = CreateObject('phpgwapi.browser');
+
$browser->content_header($filename,'application/vnd.ms-excel',$size);
+
+ echo $str;
+ }
+ }
+
+
+ function columns()
+ {
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('columns'));
+
+ $GLOBALS['phpgw_info']['flags']['headonly']=true;
+
+ $values =
get_var('values',array('POST','GET'));
+
+ if ($values['save'] && $this->cat_id)
+ {
+
$GLOBALS['phpgw']->preferences->account_id=$this->account;
+
$GLOBALS['phpgw']->preferences->read_repository();
+
$GLOBALS['phpgw']->preferences->add($this->currentapp,"equipment_columns_".$this->cat_id,$values['columns'],'user');
+
$GLOBALS['phpgw']->preferences->save_repository();
+
+ $receipt['message'][] = array('msg' =>
lang('columns is updated'));
+ }
+
+ if(!$this->cat_id)
+ {
+ $receipt['error'][] = array('msg' =>
lang('Choose a category'));
+ }
+ $function_msg = lang('Select Column');
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uiequipment.columns',
+ 'cat_id' =>
$this->cat_id);
+
+
+ $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+ $data = array
+ (
+ 'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+ 'column_list' =>
$this->bocommon->column_list($values['columns'],$entity_type='equipment',$cat_id=$this->cat_id),
+ 'function_msg' => $function_msg,
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'lang_columns' => lang('columns'),
+ 'lang_save' => lang('save'),
+ 'select_name' => 'period'
+ );
+
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
$function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('columns' => $data));
+ }
+
function index()
***************
*** 248,253 ****
--- 352,384 ----
);
+ $link_excel = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uiequipment.excel',
+ 'sort'
=>$this->sort,
+ 'order'
=>$this->order,
+ 'cat_id'
=>$this->cat_id,
+ 'district_id'
=>$this->district_id,
+ 'status_id'
=>$this->status_id,
+ 'filter'
=>$this->filter,
+ 'query'
=>$this->query
+ );
+
+ $link_columns = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uiequipment.columns',
+ 'cat_id'
=>$this->cat_id
+ );
+
+
$data = array
(
+ 'lang_excel' =>
'excel',
+ 'link_excel' =>
$GLOBALS['phpgw']->link('/index.php',$link_excel),
+ 'lang_excel_help' =>
lang('Download table to MS Excel'),
+
+ 'lang_columns' =>
lang('columns'),
+ 'link_columns' =>
$GLOBALS['phpgw']->link('/index.php',$link_columns),
+ 'lang_columns_help' =>
lang('Choose columns'),
+
'links'
=> $links,
'allow_allrows'
=> false,
Index: class.uireport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uireport.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** class.uireport.inc.php 26 Sep 2003 18:04:34 -0000 1.17
--- class.uireport.inc.php 29 Sep 2003 17:53:51 -0000 1.18
***************
*** 22,25 ****
--- 22,27 ----
var $public_functions = array
(
+ 'columns' => True,
+ 'excel' => True,
'index' => True,
'view' => True,
***************
*** 79,82 ****
--- 81,188 ----
}
+ function excel()
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework'] = True;
+ require('PEAR.php');
+ $xls =
CreateObject($this->currentapp.'.excel');
+
+ $start_date =
urldecode(get_var('start_date',array('POST','GET')));
+ $end_date =
urldecode(get_var('end_date',array('POST','GET')));
+ $report_list =
$this->bo->read($start_date,$end_date,$allrows=true);
+
+ $uicols = $this->bo->uicols;
+ $count_uicols_name=count($uicols['name']);
+
+ $j=0;
+ if (isset($report_list) AND is_array($report_list))
+ {
+ $str=$xls->Begin();
+ foreach($report_list as $report_entry)
+ {
+ $m=0;
+ for ($k=0;$k<$count_uicols_name;$k++)
+ {
+
if($uicols['input_type'][$k]!='hidden')
+ {
+ $content[$j][$k]
= $report_entry[$uicols['name'][$k]];
+
$xls->WriteLabel(0,$k,$uicols['descr'][$k]);
+
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
+ $m++;
+ }
+ }
+
+ $j++;
+ }
+
+ foreach($content as $row)
+ {
+ $line++;
+ for ($i=0; $i<count($row); $i++)
+ {
+
$str.=$xls->WriteLabel($line,$i,$row[$i]);
+ }
+ }
+
+ $filename=
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
+ $str.=$xls->EOF();
+ $size=strlen($str);
+
+ $browser = CreateObject('phpgwapi.browser');
+
$browser->content_header($filename,'application/vnd.ms-excel',$size);
+
+ echo $str;
+ }
+ }
+
+
+ function columns()
+ {
+
+ $GLOBALS['phpgw']->xslttpl->add_file(array('columns'));
+
+ $GLOBALS['phpgw_info']['flags']['headonly']=true;
+
+ $values =
get_var('values',array('POST','GET'));
+
+ if ($values['save'] && $this->cat_id)
+ {
+
$GLOBALS['phpgw']->preferences->account_id=$this->account;
+
$GLOBALS['phpgw']->preferences->read_repository();
+
$GLOBALS['phpgw']->preferences->add($this->currentapp,"report_columns_".$this->cat_id,$values['columns'],'user');
+
$GLOBALS['phpgw']->preferences->save_repository();
+
+ $receipt['message'][] = array('msg' =>
lang('columns is updated'));
+ }
+
+ if(!$this->cat_id)
+ {
+ $receipt['error'][] = array('msg' =>
lang('Choose a category'));
+ }
+ $function_msg = lang('Select Column');
+
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uireport.columns',
+ 'cat_id' =>
$this->cat_id);
+
+
+ $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+ $data = array
+ (
+ 'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+ 'column_list' =>
$this->bocommon->column_list($values['columns'],$entity_type='report',$cat_id=$this->cat_id),
+ 'function_msg' => $function_msg,
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'lang_columns' => lang('columns'),
+ 'lang_save' => lang('save'),
+ 'select_name' => 'period'
+ );
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
$function_msg;
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('columns' => $data));
+ }
+
+
function index()
{
***************
*** 113,117 ****
$content[$j]['row'][$k]['statustext'] = lang('search');
$content[$j]['row'][$k]['text'] =
$report_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uireport.index&query='
. $report_entry['query_location'][$uicols['name'][$k]] . '&lookup=' . $lookup);
}
else
--- 219,223 ----
$content[$j]['row'][$k]['statustext'] = lang('search');
$content[$j]['row'][$k]['text'] =
$report_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uireport.index&query='
. $report_entry['query_location'][$uicols['name'][$k]] . '&lookup=' . $lookup
.'&cat_id=' . $this->cat_id);
}
else
***************
*** 290,300 ****
);
$link_date_search
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.date_search');
$data = array
(
! 'start_date'
=>$start_date,
! 'end_date'
=>$end_date,
! 'lang_none'
=>lang('None'),
'lang_date_search' =>
lang('Date search'),
'lang_date_search_help' => lang('Narrow
the search by dates'),
--- 396,434 ----
);
+ $link_excel = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uireport.excel',
+ 'sort'
=>$this->sort,
+ 'order'
=>$this->order,
+ 'cat_id'
=>$this->cat_id,
+ 'district_id'
=>$this->district_id,
+ 'status_id'
=>$this->status_id,
+ 'filter'
=>$this->filter,
+ 'query'
=>$this->query,
+ 'start_date'=>$start_date,
+ 'end_date'=>$end_date
+ );
+
+ $link_columns = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uireport.columns',
+ 'cat_id'
=>$this->cat_id
+ );
+
$link_date_search
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.date_search');
$data = array
(
! 'lang_excel' =>
'excel',
! 'link_excel' =>
$GLOBALS['phpgw']->link('/index.php',$link_excel),
! 'lang_excel_help' =>
lang('Download table to MS Excel'),
!
! 'lang_columns' =>
lang('columns'),
! 'link_columns' =>
$GLOBALS['phpgw']->link('/index.php',$link_columns),
! 'lang_columns_help' =>
lang('Choose columns'),
!
! 'start_date' =>
$start_date,
! 'end_date'
=> $end_date,
! 'lang_none'
=> lang('None'),
'lang_date_search' =>
lang('Date search'),
'lang_date_search_help' => lang('Narrow
the search by dates'),
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** class.bocommon.inc.php 26 Sep 2003 18:57:11 -0000 1.80
--- class.bocommon.inc.php 29 Sep 2003 17:53:51 -0000 1.81
***************
*** 171,174 ****
--- 171,224 ----
+ function column_list($selected='',$entity_type='',$cat_id)
+ {
+ $bostandard_entity =
CreateObject($this->currentapp.'.bostandard_entity',True);
+
+ if(!$selected)
+ {
+
$selected=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp][$entity_type.'_columns_'.$cat_id];
+ }
+
+ $columns =
$bostandard_entity->read_attrib($entity_type,$cat_id);
+
+
$column_list=$this->select_multi_list($selected,$columns);
+
+ return $column_list;
+
+ }
+
+ function select_multi_list($selected='',$input_list)
+ {
+ $j=0;
+ if (isset($input_list) AND is_array($input_list))
+ {
+ foreach($input_list as $entry)
+ {
+ $output_list[$j]['id'] = $entry['id'];
+ $output_list[$j]['name'] =
$entry['name'];
+
+ for ($i=0;$i<count($selected);$i++)
+ {
+ if($selected[$i] ==
$entry['id'])
+ {
+
$output_list[$j]['selected'] = 'selected';
+ }
+ }
+ $j++;
+ }
+ }
+
+ for ($i=0;$i<count($output_list);$i++)
+ {
+ if ($output_list[$i]['selected'] != 'selected')
+ {
+ unset($output_list[$i]['selected']);
+ }
+ }
+
+ return $output_list;
+ }
+
+
function
get_user_list($format='',$selected='',$extra='',$default='')
{
***************
*** 473,477 ****
{
$attributes_values[$i]['value']=unserialize($attributes_values[$i]['value']);
!
$attributes_values[$i]['choice'] =
$this->select_multi_list($attributes_values[$i]['value'],$attributes_values[$i]['choice'],$input_type);
}
--- 523,527 ----
{
$attributes_values[$i]['value']=unserialize($attributes_values[$i]['value']);
!
$attributes_values[$i]['choice'] =
$this->select_multi_list_2($attributes_values[$i]['value'],$attributes_values[$i]['choice'],$input_type);
}
***************
*** 499,503 ****
! function
select_multi_list($selected='',$input_list,$input_type='')
{
$j=0;
--- 549,553 ----
! function
select_multi_list_2($selected='',$input_list,$input_type='')
{
$j=0;
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** class.soinvoice.inc.php 28 Sep 2003 17:12:41 -0000 1.39
--- class.soinvoice.inc.php 29 Sep 2003 17:53:50 -0000 1.40
***************
*** 245,250 ****
// $invoice[$i]['transfer_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_transfer_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$invoice[$i]['transfer_date']=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db->f('utbetalingsigndato')));
-
-
}
else
--- 245,248 ----
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** class.uilocation.inc.php 18 Sep 2003 14:00:49 -0000 1.29
--- class.uilocation.inc.php 29 Sep 2003 17:53:51 -0000 1.30
***************
*** 20,23 ****
--- 20,24 ----
var $public_functions = array
(
+ 'excel' => True,
'index' => True,
'view' => True,
***************
*** 73,76 ****
--- 74,137 ----
}
+ function excel()
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework'] = True;
+ require('PEAR.php');
+ $xls =
CreateObject($this->currentapp.'.excel');
+
+ $type_id =
get_var('type_id',array('GET'));
+ $lookup =
get_var('lookup',array('POST','GET'));
+ $lookup_name =
get_var('lookup_name',array('POST','GET'));
+ $lookup_tenant =
get_var('lookup_tenant',array('POST','GET'));
+
+ $location_list = $this->bo->read($allrows=true);
+ $location_list =
$this->bo->read($type_id,$lookup_tenant,$allrows=true);
+
+ $uicols = $this->bo->uicols;
+ $count_uicols_name=count($uicols['name']);
+
+ $j=0;
+ if (isset($location_list) AND is_array($location_list))
+ {
+ $str=$xls->Begin();
+ foreach($location_list as $location_entry)
+ {
+ $m=0;
+ for ($k=0;$k<$count_uicols_name;$k++)
+ {
+
if($uicols['input_type'][$k]!='hidden')
+ {
+ $content[$j][$m]
= $location_entry[$uicols['name'][$k]];
+
$str.=$xls->WriteLabel(0,$m,$uicols['descr'][$k]);
+ $m++;
+ }
+ }
+
+ $j++;
+ }
+
+ foreach($content as $row)
+ {
+ $line++;
+ for ($i=0; $i<count($row); $i++)
+ {
+
$str.=$xls->WriteLabel($line,$i,$row[$i]);
+ }
+ }
+
+ $filename=
$GLOBALS['phpgw_info']['user']['account_lid'].'.xls';
+
+ $str.=$xls->EOF();
+ $size=strlen($str);
+
+ $browser = CreateObject('phpgwapi.browser');
+
$browser->content_header($filename,'application/vnd.ms-excel',$size);
+
+ echo $str;
+ }
+
+ }
+
+
function index()
{
***************
*** 290,296 ****
--- 351,376 ----
$function_exchange_values .='window.close()';
+ $link_excel = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uilocation.excel',
+ 'sort'
=>$this->sort,
+ 'order'
=>$this->order,
+ 'cat_id'
=>$this->cat_id,
+ 'district_id'
=>$this->district_id,
+ 'part_of_town_id'
=>$this->part_of_town_id,
+ 'filter'
=>$this->filter,
+ 'query'
=>$this->query,
+ 'lookup'
=>$lookup,
+ 'lookup_tenant'
=>$lookup_tenant,
+ 'lookup_name'
=>$lookup_name,
+ 'type_id'
=>$type_id
+ );
$data = array
(
+ 'lang_excel' =>
'excel',
+ 'link_excel' =>
$GLOBALS['phpgw']->link('/index.php',$link_excel),
+ 'lang_excel_help' =>
lang('Download table to MS Excel'),
+
'exchange_values'
=> 'Exchange_values(this.form);',
'function_exchange_values' =>
$function_exchange_values,
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** class.bolocation.inc.php 19 Sep 2003 17:50:46 -0000 1.29
--- class.bolocation.inc.php 29 Sep 2003 17:53:51 -0000 1.30
***************
*** 512,520 ****
! function read($type_id='',$lookup_tenant='')
{
$location = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'type_id' =>
$type_id,'lookup_tenant'=>$lookup_tenant,
!
'district_id'=>$this->district_id));
$this->total_records = $this->so->total_records;
$this->uicols = $this->so->uicols;
--- 512,520 ----
! function read($type_id='',$lookup_tenant='',$allrows='')
{
$location = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
'filter' => $this->filter,'cat_id' => $this->cat_id,'type_id' =>
$type_id,'lookup_tenant'=>$lookup_tenant,
!
'district_id'=>$this->district_id,'allrows'=>$allrows));
$this->total_records = $this->so->total_records;
$this->uicols = $this->so->uicols;
Index: class.boequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boequipment.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** class.boequipment.inc.php 24 Jun 2003 10:26:40 -0000 1.15
--- class.boequipment.inc.php 29 Sep 2003 17:53:52 -0000 1.16
***************
*** 204,208 ****
{
$equipment = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
!
'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' =>
$this->district_id,'lookup'=>$data['lookup']));
$this->total_records = $this->so->total_records;
--- 204,208 ----
{
$equipment = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
!
'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' =>
$this->district_id,'lookup'=>$data['lookup'],'allrows'=>$data['allrows']));
$this->total_records = $this->so->total_records;
Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** class.soequipment.inc.php 26 Sep 2003 18:04:34 -0000 1.26
--- class.soequipment.inc.php 29 Sep 2003 17:53:51 -0000 1.27
***************
*** 73,77 ****
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
$district_id =
(isset($data['district_id'])?$data['district_id']:0);
! $lookup =
(isset($data['lookup'])?$data['lookup']:'');
}
--- 73,78 ----
$cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
$district_id =
(isset($data['district_id'])?$data['district_id']:0);
! $lookup =
(isset($data['lookup'])?$data['lookup']:'');
! $allrows =
(isset($data['allrows'])?$data['allrows']:'');
}
***************
*** 141,144 ****
--- 142,169 ----
}
+ if ($cat_id > 0)
+ {
+
$user_columns=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['equipment_columns_'.$cat_id];
+ if (isset($user_columns) AND
is_array($user_columns))
+ {
+ foreach($user_columns as $column_id)
+ {
+ $this->db->query("SELECT * FROM
fm_equipment_type_attrib where id= $column_id");
+
+ $this->db->next_record();
+ $uicols['input_type'][]
= 'text';
+ $uicols['name'][]
= $this->db->f('name');
+ $uicols['descr'][]
= $this->db->f('name');
+ $uicols['statustext'][]
= $this->db->f('descr');
+ $cols_return_extra[]= array(
+ 'name' =>
$this->db->f('name'),
+ 'datatype' =>
$this->db->f('datatype'),
+ 'attrib_id' =>
$this->db->f('id')
+ );
+ }
+ }
+ }
+
+
if ($order)
{
***************
*** 167,171 ****
if ($cat_id > 0)
{
! $filtermethod .= " $where fm_equipment.
equipment_type_id=$cat_id ";
$where = 'AND';
}
--- 192,196 ----
if ($cat_id > 0)
{
! $filtermethod .= " $where
fm_equipment.equipment_type_id=$cat_id ";
$where = 'AND';
}
***************
*** 195,199 ****
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
$j=0;
--- 220,231 ----
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
! if(!$allrows)
! {
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
! }
! else
! {
! $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
! }
$j=0;
***************
*** 203,206 ****
--- 235,289 ----
{
$equipment_list[$j][$cols_return[$i]] =
$this->db->f($cols_return[$i]);
+ }
+
+ for ($i=0;$i<count($cols_return_extra);$i++)
+ {
+
if($cols_return_extra[$i]['datatype']=='R'):
+ {
+ $sql="SELECT
fm_equipment_type_choice.value FROM fm_equipment_attrib $this->join
fm_equipment_type_choice on fm_equipment_attrib.r = fm_equipment_type_choice.id
where entity_id='" . $this->db->f('equipment_id') . "' AND
fm_equipment_attrib.attrib_id=" . $cols_return_extra[$i]['attrib_id'];
+ $this->db2->query($sql);
+ $this->db2->next_record();
+
$equipment_list[$j][$cols_return_extra[$i]['name']] = $this->db2->f('value');
+ }
+
elseif($cols_return_extra[$i]['datatype']=='CH'):
+ {
+ $ch=array();
+ $ch_value=array();
+ $sql="SELECT ch FROM
fm_equipment_attrib where entity_id='" . $this->db->f('equipment_id') . "' AND
fm_equipment_attrib.attrib_id=" . $cols_return_extra[$i]['attrib_id'];
+ $this->db2->query($sql);
+ $this->db2->next_record();
+ if($this->db2->f('ch'))
+ {
+ $ch=
unserialize($this->db2->f('ch'));
+ }
+
+ for ($k=0;$k<count($ch);$k++)
+ {
+
+ $sql="SELECT value FROM
fm_equipment_type_choice where id=" . $ch[$k];
+ $this->db2->query($sql);
+ while
($this->db2->next_record())
+ {
+
$ch_value[]=$this->db2->f('value');
+ }
+ }
+
+
$equipment_list[$j][$cols_return_extra[$i]['name']] = @implode(",", $ch_value);
+ }
+ else:
+ {
+ $this->db2->query("SELECT
c,i,n,t,d FROM fm_equipment_attrib where entity_id='" .
$this->db->f('equipment_id') . "' AND attrib_id=" .
$cols_return_extra[$i]['attrib_id'] );
+ $this->db2->next_record();
+ if($this->db2->f('d'))
+ {
+
$d=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db2->f('d')));
+ }
+ else
+ {
+ $d='';
+ }
+
$equipment_list[$j][$cols_return_extra[$i]['name']] =
$this->db2->f('c').$this->db2->f('i').$this->db2->f('n').$this->db2->f('t').$d;
+ }
+ endif;
}
Index: class.soreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soreport.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** class.soreport.inc.php 28 Sep 2003 17:12:41 -0000 1.10
--- class.soreport.inc.php 29 Sep 2003 17:53:51 -0000 1.11
***************
*** 18,24 ****
$this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
! $this->join = $this->socommon->join;
$this->grants =
$GLOBALS['phpgw']->session->appsession('grants_report',$this->currentapp);
--- 18,23 ----
$this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
! $this->join = $this->bocommon->join;
$this->grants =
$GLOBALS['phpgw']->session->appsession('grants_report',$this->currentapp);
***************
*** 81,84 ****
--- 80,84 ----
$end_date =
(isset($data['end_date'])?$data['end_date']:'');
$status_id =
(isset($data['status_id'])?$data['status_id']:'');
+ $allrows =
(isset($data['allrows'])?$data['allrows']:'');
}
***************
*** 120,135 ****
if ($cat_id > 0)
{
! $this->db->query("SELECT * FROM
fm_report_type_attrib where type_id=$cat_id AND list=1");
! while ($this->db->next_record())
{
! $uicols['input_type'][] =
'text';
! $uicols['name'][]
= $this->db->f('name');
! $uicols['descr'][]
= $this->db->f('name');
! $uicols['statustext'][] =
$this->db->f('descr');
! $cols_return_extra[]= array(
! 'name' => $this->db->f('name'),
! 'datatype' =>
$this->db->f('datatype'),
! 'attrib_id' =>
$this->db->f('id')
! );
}
}
--- 120,141 ----
if ($cat_id > 0)
{
!
$user_columns=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['report_columns_'.$cat_id];
! if (isset($user_columns) AND
is_array($user_columns))
{
! foreach($user_columns as $column_id)
! {
! $this->db->query("SELECT * FROM
fm_report_type_attrib where id= $column_id");
!
! $this->db->next_record();
! $uicols['input_type'][]
= 'text';
! $uicols['name'][]
= $this->db->f('name');
! $uicols['descr'][]
= $this->db->f('name');
! $uicols['statustext'][]
= $this->db->f('descr');
! $cols_return_extra[]= array(
! 'name' =>
$this->db->f('name'),
! 'datatype' =>
$this->db->f('datatype'),
! 'attrib_id' =>
$this->db->f('id')
! );
! }
}
}
***************
*** 224,228 ****
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
$j=0;
--- 230,241 ----
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
! if(!$allrows)
! {
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
! }
! else
! {
! $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
! }
$j=0;
***************
*** 296,299 ****
--- 309,313 ----
$j++;
}
+
return $report_list;
}
Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** class.sowo_hour.inc.php 19 Sep 2003 17:50:46 -0000 1.16
--- class.sowo_hour.inc.php 29 Sep 2003 17:53:51 -0000 1.17
***************
*** 160,188 ****
{
! if(!$hour[$i]['grouping_id'])
! {
! $hour[$i]['grouping_id']='NULL';
! }
$this->db->query("insert into fm_template_hours
(activity_id,activity_num,owner,hours_descr,unit,"
.
"cost,quantity,billperae,ns3420_id,dim_d,grouping_id,grouping_descr,remark,tolerance,building_part,record,template_id)
"
! . " values ('" .
! $hour[$i]['activity_id'] . "','" .
! $hour[$i]['activity_num'] . "','" .
! $this->account . "','" .
! $hour[$i]['hours_descr'] . "','" .
! $hour[$i]['unit'] . "','" .
! $hour[$i]['cost'] . "','" .
! $hour[$i]['quantity'] . "','" .
! $hour[$i]['billperae'] . "','" .
! $hour[$i]['ns3420_id'] . "','" .
! $hour[$i]['dim_d'] . "'," .
! $hour[$i]['grouping_id'] . ",'" .
! $hour[$i]['grouping_descr'] . "','" .
! $hour[$i]['remark'] . "','" .
! $hour[$i]['tolerance'] . "','" .
! $hour[$i]['building_part'] . "','" .
! $record . "','" .
! $template_id. "')",__LINE__,__FILE__);
$record++;
--- 160,187 ----
{
! $values= array(
! $hour[$i]['activity_id'],
! $hour[$i]['activity_num'],
! $this->account,
! $hour[$i]['hours_descr'],
! $hour[$i]['unit'],
! $hour[$i]['cost'],
! $hour[$i]['quantity'],
! $hour[$i]['billperae'],
! $hour[$i]['ns3420_id'],
! $hour[$i]['dim_d'],
! $hour[$i]['grouping_id'],
! $hour[$i]['grouping_descr'],
! $hour[$i]['remark'],
! $hour[$i]['tolerance'],
! $hour[$i]['building_part'],
! $record,
! $template_id );
!
! $values =
$this->bocommon->validate_db_insert($values);
$this->db->query("insert into fm_template_hours
(activity_id,activity_num,owner,hours_descr,unit,"
.
"cost,quantity,billperae,ns3420_id,dim_d,grouping_id,grouping_descr,remark,tolerance,building_part,record,template_id)
"
! . " values ($values)",__LINE__,__FILE__);
$record++;
***************
*** 204,222 ****
{
$this->db->query("insert into fm_wo_hours
(activity_id,activity_num,owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,record,entry_date,workorder_id)
"
! . " values ('" .
! $hour[$i]['activity_id'] . "','" .
! $hour[$i]['activity_num'] . "','" .
! $this->account . "','" .
! $hour[$i]['hours_descr'] . "','" .
! $hour[$i]['unit'] . "','" .
! $hour[$i]['cost'] . "','" .
! $hour[$i]['quantity'] . "','" .
! $hour[$i]['billperae'] . "','" .
! $hour[$i]['ns3420_id'] . "','" .
! $hour[$i]['dim_d'] . "','" .
! $record . "','" .
! time() . "','" .
! $hour[$i]['workorder_id'].
"')",__LINE__,__FILE__);
$record++;
--- 203,225 ----
{
+ $values= array(
+ $hour[$i]['activity_id'],
+ $hour[$i]['activity_num'],
+ $this->account,
+ $hour[$i]['hours_descr'],
+ $hour[$i]['unit'],
+ $hour[$i]['cost'],
+ $hour[$i]['quantity'],
+ $hour[$i]['billperae'],
+ $hour[$i]['ns3420_id'],
+ $hour[$i]['dim_d'],
+ $record,
+ time(),
+ $hour[$i]['workorder_id']);
+
+ $values =
$this->bocommon->validate_db_insert($values);
+
$this->db->query("insert into fm_wo_hours
(activity_id,activity_num,owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,record,entry_date,workorder_id)
"
! . " values ($values)",__LINE__,__FILE__);
$record++;
***************
*** 264,288 ****
}
$this->db->query("insert into fm_wo_hours
(owner,activity_id,activity_num,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
. "
grouping_id,grouping_descr,record,building_part,tolerance,remark,entry_date,workorder_id)
"
! . " values ('" .
! $this->account . "','" .
! $hour[$i]['activity_id'] . "','" .
! $hour[$i]['activity_num'] . "','" .
! $hour[$i]['hours_descr'] . "','" .
! $hour[$i]['unit'] . "','" .
! $hour[$i]['cost'] . "','" .
! $hour[$i]['quantity'] . "','" .
! $hour[$i]['billperae'] . "','" .
! $hour[$i]['ns3420_id'] . "','" .
! $hour[$i]['dim_d'] . "','" .
! $grouping_id . "','" .
! $grouping_descr . "','" .
! $record . "','" .
! $hour[$i]['building_part_id'] . "','" .
! $hour[$i]['tolerance_id'] . "','" .
! $hour[$i]['remark'] . "','" .
! time() . "','" .
! $workorder_id . "')",__LINE__,__FILE__);
$record++;
--- 267,295 ----
}
+ $values= array(
+ $this->account,
+ $hour[$i]['activity_id'],
+ $hour[$i]['activity_num'],
+ $hour[$i]['hours_descr'],
+ $hour[$i]['unit'],
+ $hour[$i]['cost'],
+ $hour[$i]['quantity'],
+ $hour[$i]['billperae'],
+ $hour[$i]['ns3420_id'],
+ $hour[$i]['dim_d'],
+ $grouping_id,
+ $grouping_descr,
+ $record,
+ $hour[$i]['building_part_id'],
+ $hour[$i]['tolerance_id'],
+ $hour[$i]['remark'],
+ time(),
+ $workorder_id );
+
+ $values =
$this->bocommon->validate_db_insert($values);
+
$this->db->query("insert into fm_wo_hours
(owner,activity_id,activity_num,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
. "
grouping_id,grouping_descr,record,building_part,tolerance,remark,entry_date,workorder_id)
"
! . " values ($values )",__LINE__,__FILE__);
$record++;
Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** class.solocation.inc.php 19 Sep 2003 17:50:46 -0000 1.34
--- class.solocation.inc.php 29 Sep 2003 17:53:51 -0000 1.35
***************
*** 106,109 ****
--- 106,110 ----
$lookup_tenant =
(isset($data['lookup_tenant'])?$data['lookup_tenant']:'');
$district_id =
(isset($data['district_id'])?$data['district_id']:'');
+ $allrows =
(isset($data['allrows'])?$data['allrows']:'');
}
***************
*** 368,372 ****
$this->total_records = $this->db2->num_rows();
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
$j=0;
--- 369,380 ----
$this->total_records = $this->db2->num_rows();
! if(!$allrows)
! {
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
! }
! else
! {
! $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
! }
$j=0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.soinvoice.inc.php, 1.39, 1.40 class.soreport.inc.php, 1.10, 1.11 class.bocommon.inc.php, 1.80, 1.81 class.boreport.inc.php, 1.9, 1.10 class.soequipment.inc.php, 1.26, 1.27 class.uireport.inc.php, 1.17, 1.18 class.bolocation.inc.php, 1.29, 1.30 class.solocation.inc.php, 1.34, 1.35 class.sowo_hour.inc.php, 1.16, 1.17 class.uilocation.inc.php, 1.29, 1.30 class.uiequipment.inc.php, 1.32, 1.33 class.boequipment.inc.php, 1.15, 1.16,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] property/templates/default report.xsl, 1.7, 1.8 equipment.xsl, 1.15, 1.16 location.xsl, 1.21, 1.22
- Next by Date:
[Phpgroupware-cvs] property/inc class.soequipment.inc.php, 1.27, 1.28 class.soreport.inc.php, 1.11, 1.12
- Previous by thread:
[Phpgroupware-cvs] property/templates/default report.xsl, 1.7, 1.8 equipment.xsl, 1.15, 1.16 location.xsl, 1.21, 1.22
- Next by thread:
[Phpgroupware-cvs] property/inc class.soequipment.inc.php, 1.27, 1.28 class.soreport.inc.php, 1.11, 1.12
- Index(es):