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
ca43b35e
Commit
ca43b35e
authored
Oct 08, 2021
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added option to include project_nr as a column
parent
41c25e55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
intranet-timesheet2-invoices-procs.tcl
tcl/intranet-timesheet2-invoices-procs.tcl
+21
-2
No files found.
tcl/intranet-timesheet2-invoices-procs.tcl
View file @
ca43b35e
...
...
@@ -175,11 +175,19 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
set default_material_id
[
im_material_default_material_id
]
set default_material_name
[
db_string matname
"select acs_object__name(:default_material_id)"
]
set max_project_name_length
[
parameter::get_from_package_key -package_key intranet-timesheet2-invoices -parameter
"InvoiceFromTimesheetTasksProjectNameMaxSize"
-default 40
]
set show_project_nr_p
[
parameter::get_from_package_key -package_key intranet-timesheet2-invoices -parameter
"InvoiceFromTimesheetTasksShowProjectNrP"
-default 0
]
set project_nr_table_header_row
""
if
{
$show
_project_nr_p
}
{
set project_nr_table_header_row
"<td align=center class=rowtitle>
[
lang::message::lookup
{}
intranet-timesheet2-invoices.Task_Nr
{
Task Nr
}]
</td>"
}
set task_table_rows
"
<tr>
<td class=rowtitle align=middle>
[
im_gif -translate_p 1 help
"Include in Invoice"
]
</td>
<td align=center class=rowtitle>
[
lang::message::lookup
""
intranet-timesheet2-invoices.Task_Name
"Task Name"
]
</td>
$project
_nr_table_header_row
<td align=center class=rowtitle>
[
lang::message::lookup
""
intranet-timesheet2-invoices.Material
"Material"
]
</td>
<td align=center class=rowtitle>
[
lang::message::lookup
""
intranet-timesheet2-invoices.Planned_br_Units
"Planned<br>Units"
]
</td>
<td align=center class=rowtitle>
[
lang::message::lookup
""
intranet-timesheet2-invoices.Billable_br_Units
"Billable<br>Units"
]
</td>
...
...
@@ -216,9 +224,12 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
}
# Show a line with with the selected invoicing type
set select_row_colspan 3
if
{
$show
_project_nr_p
}
{
incr select_row_colspan
}
append task_table_rows
"
<tr>
<td colspan=
3
>Please select the type of hours to use:</td>
<td colspan=
$select
_row_colspan
>Please select the type of hours to use:</td>
<td align=center><input type=radio name=invoice_hour_type value=planned
$invoice
_radio_disabled
$planned
_checked></td>
<td align=center><input type=radio name=invoice_hour_type value=billable
$invoice
_radio_disabled
$billable
_checked></td>
<td align=center><input type=radio name=invoice_hour_type value=reported
$invoice
_radio_disabled
$reported
_checked></td>
...
...
@@ -235,7 +246,7 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
parent.project_nr as parent_nr,
parent.project_name as parent_name,
children.project_id,
children.
project_name,
substring(children.project_name for :max_project_name_length) as
project_name,
children.project_nr,
(select count(*) from im_projects childchild where childchild.parent_id = children.project_id) as children_count,
im_category_from_id(children.project_status_id) as project_status,
...
...
@@ -350,10 +361,18 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
}
}
if
{[
string
length
$project
_name
]
==
$max
_project_name_length
}
{
set project_name
"
${project_name}
..."
}
set project_nr_table_row
""
if
{
$show
_project_nr_p
}
{
set project_nr_table_row
"<td align=left><A href=/intranet/projects/view?project_id=
$project
_id>
$project
_nr</a></td>"
}
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=left><nobr>
$indent
<A href=/intranet/projects/view?project_id=
$project
_id>
$project
_name</a></nobr></td>
$project
_nr_table_row
<td align=left>
$material
_name</td>
<td align=right>
$planned
_units</td>
<td align=right>
$billable
_units</td>
...
...
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