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
aa3c7d3c
Commit
aa3c7d3c
authored
Jun 30, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added outline_nr save capabilities
parent
9446077e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
new-3.tcl
www/invoices/new-3.tcl
+18
-9
new-4.tcl
www/invoices/new-4.tcl
+8
-1
No files found.
www/invoices/new-3.tcl
View file @
aa3c7d3c
...
...
@@ -55,6 +55,7 @@ if {"" == $return_url} {set return_url [im_url_with_query] }
set
todays_date
[
db_string get_today
"select to_char(now(), :date_format)"
]
set
page_focus
"im_header_form.keywords"
set
view_name
"invoice_tasks"
set
outline_number_enabled_p
[
im_column_exists im_invoice_items item_outline_number
]
set
bgcolor
(
0
)
" class=roweven"
set
bgcolor
(
1
)
" class=rowodd"
...
...
@@ -224,11 +225,14 @@ set due_date [db_string get_due_date "select to_date(to_char(sysdate,'YYYY-MM-DD
# ---------------------------------------------------------------
# start formatting the list of sums with the header...
set
task_sum_html
"
<tr align=center>
<td class=rowtitle>
[
_ intranet-timesheet2-invoices.Order
]
</td>
<td class=rowtitle>
[
_ intranet-timesheet2-invoices.Description
]
</td>
"
set
task_sum_html
"<tr align=center>
\n
"
append
task_sum_html
"<td class=rowtitle>
[
_ intranet-timesheet2-invoices.Order
]
</td>
\n
"
if
{
$outline
_number_enabled_p
}
{
append task_sum_html
"<td class=rowtitle>
[
lang::message::lookup
""
intranet-timesheet2-invoices.Outline Outline
]
</td>
\n
"
}
append
task_sum_html
"<td class=rowtitle>
[
_ intranet-timesheet2-invoices.Description
]
</td>
\n
"
if
{
$material
_enabled_p
}
{
append task_sum_html
"<td class=rowtitle>
[
lang::message::lookup
""
intranet-invoices.Material
"Material"
]
</td>"
}
...
...
@@ -351,6 +355,7 @@ if {$aggregate_tasks_p} {
t.planned_units as planned_sum,
t.billable_units as billable_sum,
t.task_id,
p.project_nr as outline_nr,
CASE WHEN t.uom_id = 321 THEN
(select sum(h.days) from im_hours h where h.project_id = p.project_id)
ELSE
...
...
@@ -466,6 +471,7 @@ order by
s.company_id,
s.project_id,
s.task_id,
s.outline_nr,
p.project_name,
p.project_path,
p.project_path as project_short_name,
...
...
@@ -477,9 +483,6 @@ order by
p.project_id
"
# ad_return_complaint 1 [im_ad_hoc_query -format html $task_sum_sql
]
set ctr 1
set old_project_id 0
set colspan 6
...
...
@@ -548,7 +551,13 @@ order by
<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}]
)>
<td>
<input type=text name=item_sort_order.
$ctr
size=2 value='
$ctr
'>
</td>
</td>
\n
"
if
{
$outline
_number_enabled_p
}
{
append task_sum_html
"<td><input type=text name=item_outline_number.
$ctr
size=10 value='
$outline
_nr'></td>
\n
"
}
append task_sum_html
"
<td>
<input type=text name=item_name.
$ctr
size=40 value='
[
ns_quotehtml
$task
_name
]
'>
<input type=hidden name=item_task_id.
$ctr
value='
$task
_id'>
...
...
www/invoices/new-4.tcl
View file @
aa3c7d3c
...
...
@@ -34,6 +34,7 @@ ad_page_contract {
tax:float
{
note
""
}
item_sort_order:array
item_outline_number:array
item_name:array
item_units:float,array
item_uom_id:integer,array
...
...
@@ -53,6 +54,7 @@ ad_page_contract {
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
]
if
{
!
[
im_permission
$user
_id add_invoices
]}
{
ad_return_complaint 1
"<li>
[
_ intranet-timesheet2-invoices.lt_You_dont_have_suffici
]
"
...
...
@@ -203,6 +205,7 @@ foreach nr $item_list {
set rate
$item
_rate
(
$nr
)
set currency
$item
_currency
(
$nr
)
set sort_order
$item
_sort_order
(
$nr
)
set outline_number
$item
_outline_number
(
$nr
)
set task_id
$item
_task_id
(
$nr
)
ns_log Notice
"item(
$nr
,
$name
,
$units
,
$uom
_id,
$project
_id,
$rate
,
$currency
,
$task
_id)"
...
...
@@ -227,8 +230,12 @@ foreach nr $item_list {
:material_id,
null, '', :task_id
)"
db_dml insert_invoice_items
$insert
_invoice_items_sql
if
{
$outline
_number_enabled_p
}
{
db_dml outline
"update im_invoice_items set item_outline_number = :outline_number where item_id = :item_id"
}
}
}
...
...
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