Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-invoices
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-timesheet2-invoices
Commits
45b0bdb2
Commit
45b0bdb2
authored
May 07, 2009
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added billable/non-billable tasks
parent
388d1c2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
intranet-timesheet2-invoices-procs.tcl
tcl/intranet-timesheet2-invoices-procs.tcl
+19
-9
new-2.adp
www/invoices/new-2.adp
+1
-1
new-2.tcl
www/invoices/new-2.tcl
+1
-1
No files found.
tcl/intranet-timesheet2-invoices-procs.tcl
View file @
45b0bdb2
...
...
@@ -202,7 +202,8 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
t.planned_units,
t.billable_units,
t.uom_id,
im_material_name_from_id(t.material_id) as material_name,
m.material_name,
m.material_billable_p,
im_category_from_id(t.uom_id) as uom_name,
(select sum(h.hours) from im_hours h where h.project_id = children.project_id) as all_reported_hours,
(select sum(h.hours) from im_hours h where
...
...
@@ -218,6 +219,7 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
im_projects parent,
im_projects children
LEFT OUTER JOIN im_timesheet_tasks t ON (children.project_id = t.task_id)
LEFT OUTER JOIN im_materials m ON (t.material_id = m.material_id)
where
children.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
and parent.project_id in (
[
join
$select
_project
","
]
)
...
...
@@ -230,9 +232,9 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
set colspan 11
set old_parent_id 0
db_foreach select_tasks
$sql
{
if
{
""
==
$material
_name
}
{
set material_name
$default
_material_name
}
# insert intermediate headers for every project
if
{
$old
_parent_id !=
$parent
_id
}
{
append task_table_rows
"
...
...
@@ -249,12 +251,21 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
for
{
set
i 0
}
{
$i
<
$level
}
{
incr
i
}
{
append indent
" "
}
set task_checked
""
set task_disabled
""
set task_disabled
""
if
{
0 ==
[
llength
$include
_task
]}
{
set task_checked
"checked"
# Called from the Wizard Page - Enabled tasks
# according to the task's material.
if
{
"f"
!=
$material
_billable_p
}
{
set task_checked
"checked"
}
}
else
{
# View from the Invoice page
# disable the checkbox
(
because it is not editable anymore
)
.
if
{[
lsearch
$include
_task
$project
_id
]
> -1
}
{
set task_checked
"checked"
}
...
...
@@ -263,16 +274,15 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
append task_table_rows
"
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
<td align=middle><input type=checkbox name=include_task value=
$project
_id
$task
_disabled
$task
_checked></td>
<td align=middle><input type=checkbox name=include_task value=
$project
_id
$task
_disabled
$task
_checked>
$material
_billable_p
</td>
<td align=left><nobr>
$indent
<A href=/intranet/projects/view?project_id=
$project
_id>
$project
_name</a></nobr></td>
<td align=
righ
t>
$material
_name</td>
<td align=
lef
t>
$material
_name</td>
<td align=right>
$planned
_units</td>
<td align=right>
$billable
_units</td>
<td align=right>
$all
_reported_hours</td>
<td align=right>
$hours
_in_interval</td>
<td align=right>
$unbilled
_hours</td>
<td align=right>
$uom
_name</td>
<!-- <td>
$project
_type</td> -->
<td>
$project
_status</td>
</tr>
"
...
...
www/invoices/new-2.adp
View file @
45b0bdb2
...
...
@@ -48,7 +48,7 @@
@task_table_rows;noquote@
<tr>
<td colspan=
7
align=right>
<td colspan=
10
align=right>
<input type=checkbox name=aggregate_tasks_p value=1 checked>
<%= [lang::message::lookup "" intranet-timesheet2-invoices.Aggregate_tasks_of_the_same_material "Aggregate tasks of the same Material"] %>
...
...
www/invoices/new-2.tcl
View file @
45b0bdb2
...
...
@@ -105,7 +105,7 @@ if {"" != $end_date && ![regexp {[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]} $
Expected format: 'YYYY-MM-DD'"
}
set
days_in_past 0
set
days_in_past
3
0
db_1row todays_date
"
select
to_char(sysdate::date - :days_in_past::integer, 'YYYY') as start_year,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment