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
0cda2c45
Commit
0cda2c45
authored
Oct 13, 2021
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed issue with invoicing very long task names (from auto-generated tickets...)
parent
8c327ef3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
new-4.tcl
www/invoices/new-4.tcl
+8
-1
No files found.
www/invoices/new-4.tcl
View file @
0cda2c45
...
...
@@ -56,6 +56,9 @@ set user_id [auth::require_login]
set
current_user_id
$user
_id
set
outline_number_enabled_p
[
im_column_exists im_invoice_items item_outline_number
]
# Maximum size for a reasonable invoice item
# Actual maximum is the length of the im_invoice_items.item_name field
set
max_item_name_length 100
if
{
!
[
im_permission
$user
_id add_invoices
]}
{
ad_return_complaint 1
"<li>
[
_ intranet-timesheet2-invoices.lt_You_dont_have_suffici
]
"
...
...
@@ -197,12 +200,16 @@ foreach item_id $item_ids {
set
item_list
[
array
names item_name
]
foreach
nr
$item
_list
{
set project_id
$item
_project_id
(
$nr
)
set name
$item
_name
(
$nr
)
if
{[
string
length
$name
]
>
$max
_item_name_length
}
{
# im_invoice_items.item_name has a max length of 200, so cut the name
set name
"
[
string
range
$name
0
$max
_item_name_length
]
... (
$project
_id)"
}
set units
$item
_units
(
$nr
)
set uom_id
$item
_uom_id
(
$nr
)
set type_id
$item
_type_id
(
$nr
)
set material_id
$item
_material_id
(
$nr
)
set project_id
$item
_project_id
(
$nr
)
set rate
$item
_rate
(
$nr
)
set currency
$item
_currency
(
$nr
)
set sort_order
$item
_sort_order
(
$nr
)
...
...
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