Commit 9c3ec069 authored by Frank Bergmann's avatar Frank Bergmann

- Opus5 Fixes.

- Added default for new-page for im_timesheet_tasks for CostCenter and Material
parent fd17e99c
......@@ -99,6 +99,30 @@ ad_form \
ad_form -extend -name task -on_request {
# Populate elements from local variables
# ToDo: Check if these queries get too slow if the
# system is in use during a lot of time...
# Set default UoM to Hour
set uom_id [im_uom_hour]
# Set default CostCenter to most used CostCenter
set cost_center_id [db_string default_cost_center "
select cost_center_id
from im_timesheet_tasks
group by cost_center_id
order by count(*) DESC
limit 1
" -default ""]
# Set default Material to most used Material
set material_id [db_string default_cost_center "
select material_id
from im_timesheet_tasks
group by material_id
order by count(*) DESC
limit 1
" -default ""]
} -select_query {
select m.*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment