mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
- added/corrected rounding of quantity and prices
- range-sums are only shown if the date-filter includes the full-range (otherwise you got an incorrect sum) - day-sums only for less or equal 6 weeks - more meaningful app-header / report title - disabled owner column in print, if filtered by one owner - state of details/no details is now saved in the user prefs, to be persistent over sessions - minutes are allowed as additional input-unit for times
This commit is contained in:
parent
d57255c146
commit
5d29337843
@ -82,6 +82,10 @@ class botimesheet extends so_sql
|
||||
* @var array $summary array sums of the last search in keys duration and price
|
||||
*/
|
||||
var $summary;
|
||||
/**
|
||||
* @var array $show_sums array with boolean values in keys 'day', 'week' or 'month', for the sums to return in the search
|
||||
*/
|
||||
var $show_sums;
|
||||
|
||||
function botimesheet()
|
||||
{
|
||||
@ -162,8 +166,10 @@ class botimesheet extends so_sql
|
||||
return $data && !!($rights & $required);
|
||||
}
|
||||
|
||||
function date_filter($name,$start=0,$end=0)
|
||||
function date_filter($name,&$start,&$end_param)
|
||||
{
|
||||
$end = $end_param;
|
||||
|
||||
if ($name == 'custom' && $start)
|
||||
{
|
||||
if ($end)
|
||||
@ -221,13 +227,11 @@ class botimesheet extends so_sql
|
||||
$start = $weekstart + $sweek*7*24*60*60;
|
||||
$end = $weekstart + $eweek*7*24*60*60;
|
||||
}
|
||||
$end_param = $end - 24*60*60;
|
||||
}
|
||||
//echo "<p align='right'>date_filter($name,$start,$end) today=".date('l, Y-m-d H:i',$this->today)." ==> ".date('l, Y-m-d H:i:s',$start)." <= date < ".date('l, Y-m-d H:i:s',$end)."</p>\n";
|
||||
// convert start + end from user to servertime
|
||||
$start -= $this->tz_offset_s;
|
||||
$end -= $this->tz_offset_s;
|
||||
|
||||
return "($start <= ts_start AND ts_start < $end)";
|
||||
// convert start + end from user to servertime for the filter
|
||||
return '('.($start-$this->tz_offset_s).' <= ts_start AND ts_start < '.($end-$this->tz_offset_s).')';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,7 +256,7 @@ class botimesheet extends so_sql
|
||||
*/
|
||||
function &search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='',$need_full_no_count=false,$only_summary=false)
|
||||
{
|
||||
if (!$extra_cols) $extra_cols = 'ts_quantity*ts_unitprice AS ts_total';
|
||||
if (!$extra_cols) $extra_cols = 'round(ts_quantity*ts_unitprice,2) AS ts_total';
|
||||
|
||||
if (!isset($filter['ts_owner']) || !count($filter['ts_owner']))
|
||||
{
|
||||
@ -276,29 +280,31 @@ class botimesheet extends so_sql
|
||||
$this->summary = array();
|
||||
return array();
|
||||
}
|
||||
$this->summary = parent::search($criteria,'SUM(ts_duration) AS duration,SUM(ts_quantity*ts_unitprice) AS price',
|
||||
$this->summary = parent::search($criteria,'SUM(ts_duration) AS duration,SUM(round(ts_quantity*ts_unitprice,2)) AS price',
|
||||
'','',$wildcard,$empty,$op,false,$filter,$join);
|
||||
$this->summary = $this->summary[0];
|
||||
|
||||
if ($only_summary) return $this->summary;
|
||||
|
||||
// ToDo: get the day- & weeksums working with DB's other then MySQL (problem is a missing equivalent to FROM_UNIXTIME)
|
||||
if ($this->db->Type == 'mysql' && strstr($order_by,'ts_start')) // day- / weekwise sums only for mysql and if ordered by ts_start
|
||||
if ($this->show_sums && $this->db->Type == 'mysql' && strstr($order_by,'ts_start')) // day- / weekwise sums only for mysql and if ordered by ts_start
|
||||
{
|
||||
// regular entries
|
||||
parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
|
||||
|
||||
// month-sums
|
||||
parent::search($criteria,"-2,'',DATE_FORMAT(FROM_UNIXTIME(ts_start),'%Y%m') AS ts_month,'',ts_start,".
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(ts_unitprice * ts_quantity) AS ts_total",
|
||||
'GROUP BY ts_month ORDER BY '.$order_by,'',$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
|
||||
|
||||
// week-sums
|
||||
if ($this->show_sums['month']) // month-sums
|
||||
{
|
||||
parent::search($criteria,"-2,'',DATE_FORMAT(FROM_UNIXTIME(ts_start),'%Y%m') AS ts_month,'',ts_start,".
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(round(ts_unitprice * ts_quantity,2)) AS ts_total",
|
||||
'GROUP BY ts_month ORDER BY '.$order_by,'',$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
|
||||
}
|
||||
$weekstart = $GLOBALS['egw_info']['user']['preferences']['calendar']['weekdaystarts'] == 'Sunday' ? 0 : 1;
|
||||
parent::search($criteria,"-1,'',YEARWEEK(FROM_UNIXTIME(ts_start),$weekstart) AS ts_week,'',ts_start,".
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(ts_unitprice * ts_quantity) AS ts_total",
|
||||
'GROUP BY ts_week ORDER BY '.$order_by,'',$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
|
||||
|
||||
if ($this->show_sums['week']) // week-sums
|
||||
{
|
||||
parent::search($criteria,"-1,'',YEARWEEK(FROM_UNIXTIME(ts_start),$weekstart) AS ts_week,'',ts_start,".
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(round(ts_unitprice * ts_quantity,2)) AS ts_total",
|
||||
'GROUP BY ts_week ORDER BY '.$order_by,'',$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
|
||||
}
|
||||
// order of the union: monthsums behind the month, weeksums behind the week and daysums behind the day
|
||||
$sort = substr($order_by,8);
|
||||
$union_order = "DATE_FORMAT(FROM_UNIXTIME(ts_start),'%Y%m') $sort,CASE WHEN ts_id=-2 THEN 1 ELSE 0 END,".
|
||||
@ -307,9 +313,9 @@ class botimesheet extends so_sql
|
||||
|
||||
// day-sums
|
||||
return parent::search($criteria,"0,'',DATE(FROM_UNIXTIME(ts_start)) AS ts_date,'',ts_start,".
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(ts_unitprice * ts_quantity) AS ts_total",
|
||||
"SUM(ts_duration) AS ts_duration,0,0,0,0,0,0,0,SUM(round(ts_unitprice * ts_quantity,2)) AS ts_total",
|
||||
array('GROUP BY ts_date ORDER BY '.$order_by,$union_order),
|
||||
'',$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count);
|
||||
'',$wildcard,$empty,$op,$start,$this->show_sums['day'] ? $filter : array('ts_id'=>0),$join,$need_full_no_count);
|
||||
}
|
||||
return parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ class uitimesheet extends botimesheet
|
||||
'to_app' => TIMESHEET_APP,
|
||||
),
|
||||
'js' => "<script>\n$js\n</script>\n",
|
||||
'ts_quantity_blur' => $this->data['ts_duration'] ? $this->data['ts_duration'] / 60.0 : '',
|
||||
'ts_quantity_blur' => $this->data['ts_duration'] ? round($this->data['ts_duration'] / 60.0,3) : '',
|
||||
));
|
||||
$links = array();
|
||||
// create links specified in the REQUEST (URL)
|
||||
@ -252,14 +252,56 @@ class uitimesheet extends botimesheet
|
||||
*
|
||||
* reimplemented from so_sql to disable action-buttons based on the acl and make some modification on the data
|
||||
*
|
||||
* @param array $query
|
||||
* @param array &$query
|
||||
* @param array &$rows returned rows/cups
|
||||
* @param array &$readonlys eg. to disable buttons based on acl
|
||||
*/
|
||||
function get_rows($query,&$rows,&$readonlys)
|
||||
function get_rows(&$query_in,&$rows,&$readonlys)
|
||||
{
|
||||
$GLOBALS['egw']->session->appsession('index',TIMESHEET_APP,$query);
|
||||
|
||||
$this->show_sums = false;
|
||||
if ($query_in['filter'])
|
||||
{
|
||||
$date_filter = $this->date_filter($query_in['filter'],$query_in['startdate'],$query_in['enddate']);
|
||||
|
||||
$start = explode('-',date('Y-m-d',$query_in['startdate']+12*60*60));
|
||||
$end = explode('-',date('Y-m-d',$query_in['enddate'] ? $query_in['enddate'] : $query_in['startdate']+7.5*24*60*60));
|
||||
|
||||
// show month-sums, if we are month-aligned (show full monthes)?
|
||||
if ((int)$start[2] == 1 && (int)$end[2] == (int)date('d',mktime(12,0,0,$end[1]+1,0,$end[0])))
|
||||
{
|
||||
$this->show_sums['month'] = true;
|
||||
}
|
||||
// show week-sums, if we are week-aligned (show full weeks)?
|
||||
$week_start_day = $GLOBALS['egw_info']['user']['preferences']['calendar']['weekdaystarts'];
|
||||
if (!$week_start_day) $week_start_day = 'Sunday';
|
||||
switch($week_start_day)
|
||||
{
|
||||
case 'Sunday': $week_end_day = 'Saturday'; break;
|
||||
case 'Monday': $week_end_day = 'Sunday'; break;
|
||||
case 'Saturday': $week_end_day = 'Friday'; break;
|
||||
}
|
||||
$filter_start_day = date('l',$query_in['startdate']+12*60*60);
|
||||
$filter_end_day = $query_in['enddate'] ? date('l',$query_in['enddate']+12*60*60) : false;
|
||||
//echo "<p align=right>prefs: $week_start_day - $week_end_day, filter: $filter_start_day - $filter_end_day</p>\n";
|
||||
if ($filter_start_day == $week_start_day && (!$filter_end_day || $filter_end_day == $week_end_day))
|
||||
{
|
||||
$this->show_sums['week'] = true;
|
||||
}
|
||||
// show day-sums, if range <= 5 weeks
|
||||
if (!$query_in['enddate'] || $query_in['enddate'] - $query_in['startdate'] < 36*24*60*60)
|
||||
{
|
||||
$this->show_sums['day'] = true;
|
||||
}
|
||||
}
|
||||
//echo "<p align=right>show_sums=".print_r($this->show_sums,true)."</p>\n";
|
||||
$GLOBALS['egw']->session->appsession('index',TIMESHEET_APP,$query_in);
|
||||
$query = $query_in; // keep the original query
|
||||
|
||||
if ((int)$query['filter2'] != (int)$GLOBALS['egw_info']['user']['preferences'][TIMESHEET_APP]['show_details'])
|
||||
{
|
||||
$GLOBALS['egw']->preferences->add(TIMESHEET_APP,'show_details',(int)$query['filter2']);
|
||||
$GLOBALS['egw']->preferences->save_repository(true);
|
||||
}
|
||||
unset($query['col_filter']['cat_id']);
|
||||
if ($query['cat_id'])
|
||||
{
|
||||
@ -281,26 +323,48 @@ class uitimesheet extends botimesheet
|
||||
}
|
||||
if ($query['filter'])
|
||||
{
|
||||
$query['col_filter'][0] = $this->date_filter($query['filter'],$query['startdate'],$query['enddate']);
|
||||
$query['col_filter'][0] = $date_filter;
|
||||
|
||||
if ($query['filter'] == 'custom') // show the custome dates
|
||||
// generate a meaningful app-header / report title
|
||||
if ($this->show_sums['month'])
|
||||
{
|
||||
if (!is_object($GLOBALS['egw']->js))
|
||||
if ((int)$start[1] == 1 && (int) $end[1] == 12) // whole year(s)
|
||||
{
|
||||
$GLOBALS['egw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . $start[0] . ($start[0] != $end[0] ? ' - '.$end[0] : '');
|
||||
}
|
||||
$GLOBALS['egw']->js->set_onload("set_style_by_class('*','custom_hide','visibility','visible');");
|
||||
|
||||
if ($query['startdate'])
|
||||
else
|
||||
{
|
||||
$df = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . $GLOBALS['egw']->common->show_date($query['startdate']+12*60*60,$df,false).
|
||||
' - '.$GLOBALS['egw']->common->show_date(($query['enddate'] ? $query['enddate'] : $query['startdate']+7*24*60*60)+12*60*60,$df,false);
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . lang(date('F',$query['startdate']+12*60*60)) . ' ' . $start[0];
|
||||
if ($start[0] != $end[0] || $start[1] != $end[1])
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - ' . lang(date('F',$query['enddate']+12*60*60)) . ' ' . $end[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($this->show_sums['week'])
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . lang('week') . ' ' . date('W',$query['startdate']+36*60*60) . '/' . $start[0];
|
||||
if ($query['enddate'] && $query['enddate'] - $query['startdate'] > 10*24*60*60)
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - ' . date('W',$query['enddate']-36*60*60) . '/' . $end[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . lang($query['filter']);
|
||||
$df = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': ' . $GLOBALS['egw']->common->show_date($query['startdate']+12*60*60,$df,false);
|
||||
if ($start != $end)
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - '.$GLOBALS['egw']->common->show_date($query['enddate']+12*60*60,$df,false);
|
||||
}
|
||||
}
|
||||
if ($query['filter'] == 'custom') // show the custome dates
|
||||
{
|
||||
if (!is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['egw']->js->set_onload("set_style_by_class('*','custom_hide','visibility','visible');");
|
||||
}
|
||||
}
|
||||
$total = parent::get_rows($query,$rows,$readonlys);
|
||||
@ -367,6 +431,7 @@ class uitimesheet extends botimesheet
|
||||
$row['titleClass'] = 'titleDetails';
|
||||
}
|
||||
}
|
||||
if ($query['col_filter']['ts_owner']) $rows['ownerClass'] = 'noPrint';
|
||||
$rows['no_owner_col'] = $query['no_owner_col'];
|
||||
if ($query['filter'])
|
||||
{
|
||||
@ -420,6 +485,7 @@ class uitimesheet extends botimesheet
|
||||
'sort' => 'DESC',// IO direction of the sort: 'ASC' or 'DESC'
|
||||
'header_right' => 'timesheet.index.dates',
|
||||
'filter_onchange' => "set_style_by_class('*','custom_hide','visibility',this.value == 'custom' ? 'visible' : 'hidden'); if (this.value != 'custom') this.form.submit();",
|
||||
'filter2' => (int)$GLOBALS['egw_info']['user']['preferences'][TIMESHEET_APP]['show_details'],
|
||||
);
|
||||
}
|
||||
$read_grants = $this->grant_list(EGW_ACL_READ);
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// eTemplates for Application 'timesheet', generated by soetemplate::dump4setup() 2006-03-26 23:39
|
||||
// eTemplates for Application 'timesheet', generated by soetemplate::dump4setup() 2006-03-27 14:11
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@ -13,7 +13,7 @@ $templ_data[] = array('name' => 'timesheet.edit','template' => '','lang' => '','
|
||||
|
||||
$templ_data[] = array('name' => 'timesheet.edit','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:8:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:1:"A";s:3:"100";s:2:"c6";s:3:"row";s:2:"h6";s:14:",!@ts_modified";s:2:"c4";s:3:"row";s:2:"h2";s:2:"28";s:2:"h1";s:6:",!@msg";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,ts_owner";s:5:"label";s:4:"User";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:8:"ts_owner";s:4:"span";s:3:"all";s:7:"no_lang";s:1:"1";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,ts_project";s:5:"label";s:7:"Project";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:4:"span";s:3:"all";i:1;a:6:{s:4:"type";s:21:"projectmanager-select";s:4:"size";s:4:"None";s:4:"name";s:5:"pm_id";s:4:"span";s:3:"all";s:4:"help";s:16:"Select a project";s:8:"onchange";i:1;}i:2;a:4:{s:4:"type";s:4:"text";s:4:"name";s:10:"ts_project";s:4:"blur";s:16:"@ts_project_blur";s:4:"size";s:5:"65,80";}}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,ts_unitprice";s:5:"label";s:9:"Unitprice";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"span";s:3:"all";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:24:"projectmanager-pricelist";s:4:"name";s:5:"pl_id";s:4:"size";s:4:"None";s:8:"onchange";s:209:"this.form[\'exec[ts_unitprice]\'].value=this.options[this.selectedIndex].text.lastIndexOf(\'(\') < 0 ? \'\' : this.options[this.selectedIndex].text.slice(this.options[this.selectedIndex].text.lastIndexOf(\'(\')+1,-1);";}i:2;a:3:{s:4:"type";s:5:"float";s:4:"name";s:12:"ts_unitprice";s:4:"span";s:3:"all";}}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:3:"tab";s:5:"label";s:19:"General|Notes|Links";s:4:"name";s:19:"general|notes|links";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Last modified";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:11:"ts_modified";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:11:"ts_modifier";s:5:"label";s:2:"by";s:8:"readonly";s:1:"1";}}}i:7;a:2:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:5:"2,0,0";s:4:"span";s:1:"2";i:1;a:8:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"6";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Edit";s:4:"name";s:12:"button[edit]";s:4:"help";s:15:"Edit this entry";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:16:"button[save_new]";s:5:"label";s:10:"Save & New";s:4:"help";s:34:"Saves this entry and add a new one";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[save]";s:5:"label";s:4:"Save";s:4:"help";s:22:"Saves the changes made";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";s:4:"help";s:24:"Applies the changes made";}i:5;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:4:"help";s:44:"closes the window without saving the changes";s:7:"onclick";s:15:"window.close();";}i:6;a:2:{s:4:"type";s:4:"html";s:4:"name";s:2:"js";}}i:2;a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:14:"button[delete]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.width100 { width: 100%; }','modified' => '1142930663',);
|
||||
|
||||
$templ_data[] = array('name' => 'timesheet.edit.general','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:5:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c2";s:3:"row";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,ts_title";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:5:"65,80";s:4:"name";s:8:"ts_title";s:6:"needed";s:1:"1";s:4:"blur";s:14:"@ts_title_blur";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,cat_id";s:5:"label";s:8:"Category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"name";s:6:"cat_id";s:4:"size";s:4:"None";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,ts_start";s:5:"label";s:4:"Date";}s:1:"B";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"ts_start";s:6:"needed";s:1:"1";s:4:"size";s:2:",8";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,ts_duration";s:5:"label";s:8:"Duration";}s:1:"B";a:3:{s:4:"type";s:13:"date-duration";s:4:"name";s:11:"ts_duration";s:4:"size";s:2:",h";}}i:5;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,ts_quantity";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:5:"float";s:4:"name";s:11:"ts_quantity";s:4:"help";s:30:"empty if identical to duration";s:4:"blur";s:17:"@ts_quantity_blur";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:4:"size";s:8:"100%,150";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"150";}}}','size' => '100%,150','style' => '','modified' => '1134773043',);
|
||||
$templ_data[] = array('name' => 'timesheet.edit.general','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:5:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c2";s:3:"row";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,ts_title";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:5:"65,80";s:4:"name";s:8:"ts_title";s:6:"needed";s:1:"1";s:4:"blur";s:14:"@ts_title_blur";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,cat_id";s:5:"label";s:8:"Category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"name";s:6:"cat_id";s:4:"size";s:4:"None";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,ts_start";s:5:"label";s:4:"Date";}s:1:"B";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"ts_start";s:6:"needed";s:1:"1";s:4:"size";s:2:",8";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,ts_duration";s:5:"label";s:8:"Duration";}s:1:"B";a:3:{s:4:"type";s:13:"date-duration";s:4:"name";s:11:"ts_duration";s:4:"size";s:3:",hm";}}i:5;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,ts_quantity";s:5:"label";s:8:"Quantity";}s:1:"B";a:5:{s:4:"type";s:5:"float";s:4:"name";s:11:"ts_quantity";s:4:"help";s:30:"empty if identical to duration";s:4:"blur";s:17:"@ts_quantity_blur";s:4:"size";s:4:",,,3";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:4:"size";s:8:"100%,150";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"150";}}}','size' => '100%,150','style' => '','modified' => '1134773043',);
|
||||
|
||||
$templ_data[] = array('name' => 'timesheet.edit.links','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:7:{s:1:"A";s:3:"100";s:2:"h1";s:6:",@view";s:2:"h2";s:13:",@status_only";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:7:"link-to";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:17:"100%,150,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"150";i:6;s:4:"auto";}}}','size' => '100%,150,,,,,auto','style' => '','modified' => '1134775301',);
|
||||
|
||||
@ -25,5 +25,5 @@ $templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '',
|
||||
|
||||
$templ_data[] = array('name' => 'timesheet.index.dates','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:3:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";s:4:"help";s:30:"Leave it empty for a full week";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1142973260',);
|
||||
|
||||
$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"G";s:14:",@no_owner_col";s:1:"B";s:3:"50%";}i:1;a:8:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:7:"no_lang";s:1:"1";i:1;a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:7:"Project";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:3:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";}}s:1:"G";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";}s:1:"G";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1134799629',);
|
||||
$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"G";s:14:",@no_owner_col";s:1:"B";s:3:"50%";}i:1;a:8:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:7:"no_lang";s:1:"1";i:1;a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:7:"Project";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"G";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"D";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"F";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"G";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1134799629',);
|
||||
|
||||
|
@ -24,11 +24,11 @@
|
||||
</row>
|
||||
<row class="row">
|
||||
<description options=",,,ts_duration" value="Duration"/>
|
||||
<date-duration id="ts_duration" options=",h"/>
|
||||
<date-duration id="ts_duration" options=",hm"/>
|
||||
</row>
|
||||
<row>
|
||||
<description options=",,,ts_quantity" value="Quantity"/>
|
||||
<textbox type="float" id="ts_quantity" statustext="empty if identical to duration" blur="@ts_quantity_blur"/>
|
||||
<textbox type="float" id="ts_quantity" statustext="empty if identical to duration" blur="@ts_quantity_blur" precision="3"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -39,9 +39,9 @@
|
||||
<nextmatch-sortheader label="Price" id="ts_unitprice"/>
|
||||
<vbox>
|
||||
<nextmatch-sortheader label="Total" id="ts_total"/>
|
||||
<textbox type="float" id="price" readonly="true"/>
|
||||
<textbox type="float" id="price" readonly="true" size=",2"/>
|
||||
</vbox>
|
||||
<nextmatch-filterheader id="ts_owner" options="User" no_lang="1"/>
|
||||
<nextmatch-filterheader id="ts_owner" options="User" no_lang="1" class="$cont[ownerClass]"/>
|
||||
<description value="Actions" class="noPrint"/>
|
||||
</row>
|
||||
<row class="$row_cont[class]">
|
||||
@ -52,10 +52,10 @@
|
||||
<description id="${row}[ts_description]" no_lang="1"/>
|
||||
</vbox>
|
||||
<date-duration id="${row}[ts_duration]" readonly="true" options=",h,,,1"/>
|
||||
<description id="${row}[ts_quantity]" no_lang="1"/>
|
||||
<textbox type="float" id="${row}[ts_quantity]" no_lang="1" size=",3" readonly="true"/>
|
||||
<description no_lang="1" id="${row}[ts_unitprice]"/>
|
||||
<description no_lang="1" id="${row}[ts_total]"/>
|
||||
<menulist>
|
||||
<textbox type="float" no_lang="1" id="${row}[ts_total]" size=",2" readonly="true"/>
|
||||
<menulist span=",$cont[ownerClass]">
|
||||
<menupopup type="select-account" id="${row}[ts_owner]" readonly="true"/>
|
||||
</menulist>
|
||||
<hbox class="noPrint">
|
||||
|
Loading…
Reference in New Issue
Block a user