Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-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-invoices
Commits
8726f828
Commit
8726f828
authored
Jan 23, 2013
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- LuP Extensions:
Now includes bulk-actions on the projects referenced by an invoice
parent
881e086f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
23 deletions
+45
-23
intranet-invoices-procs.tcl
tcl/intranet-invoices-procs.tcl
+11
-17
invoice-association-action.tcl
www/invoice-association-action.tcl
+28
-6
view.tcl
www/view.tcl
+6
-0
No files found.
tcl/intranet-invoices-procs.tcl
View file @
8726f828
...
...
@@ -412,19 +412,12 @@ ad_proc im_invoices_object_list_component { user_id invoice_id read write return
default
{
set extra_url
""
}
}
append object_list_html
"
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
<td>
<A href=
\"
$url$object
_id
$extra
_url
\"
>
$object
_name</A>
</td>
\n
"
append object_list_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
if
{
$write
}
{
append object_list_html
"
<td>
<input type=checkbox name=object_ids.
$object
_id>
</td>
\n
"
append object_list_html
"<td><input type=checkbox name=object_ids.
$object
_id></td>
\n
"
}
append object_list_html
"
</tr>
\n
"
append object_list_html
"
<td><A href=
\"
$url$object
_id
$extra
_url
\"
>
$object
_name</A></td>
\n
"
append object_list_html
"
</tr>
\n
"
incr ctr
}
...
...
@@ -435,6 +428,7 @@ ad_proc im_invoices_object_list_component { user_id invoice_id read write return
</tr>
\n
"
}
set return_url
[
im_url_with_query
]
set return_html
"
<form action=invoice-association-action method=post>
[
export_form_vars invoice_id return_url
]
...
...
@@ -447,12 +441,12 @@ ad_proc im_invoices_object_list_component { user_id invoice_id read write return
if
{
$write
}
{
append return_html
"
<tr>
<td align=
right
>
<input type=submit name=add_project_action value='
[
_ intranet-invoices.Add_a_Project
]
'
>
</A
>
</td
>
<td
>
<input type=submit
name=del_action value='
[
_ intranet-invoices.Del
]
'>
<td align=
left colspan=2
>
<select name=action
>
<option value='set_invoiced'>
[
lang::message::lookup
""
intranet-invoices.Set_to_invoiced
"Set to invoiced"
]
</option
>
<option value='delete'>
[
_ intranet-core.Delete
]
</option
>
<option value='add_project'>
[
_ intranet-invoices.Add_a_Project
]
</option
>
<input type=submit
value='
[
_ intranet-core.Apply
]
'>
</td>
</tr>
\n
"
}
...
...
www/invoice-association-action.tcl
View file @
8726f828
...
...
@@ -21,12 +21,13 @@ ad_page_contract {
{
invoice_id:integer 0
}
{
project_id:integer 0
}
{
customer_id:integer 0
}
{
del_action
""
}
{
add_project_action
""
}
{
action
""
}
{
object_ids:array,optional
}
{
return_url
"/intranet-invoices/"
}
}
# ad_return_complaint 1 "action=$action, invoice_id=$invoice_id, project_id=$project_id, object_ids=[array get object_ids
]
, return_url=$return_url
"
# ---------------------------------------------------------------
# Security
# ---------------------------------------------------------------
...
...
@@ -44,7 +45,6 @@ if {!$write_p} {
# ---------------------------------------------------------------
set page_focus "
im_header_form.keywords
"
set bgcolor(0) "
class=roweven
"
set bgcolor(1) "
class=rowodd
"
set required_field "
<font color=red size=+1><B>*</B></font>
"
...
...
@@ -53,11 +53,12 @@ set cost_type [db_string cost_type "select im_category_from_id(cost_type_id) fro
set page_title
[
lang::message::lookup
""
intranet-invoices.Associate_cost_type_with_project
"Associate %cost_type% with a Project"
]
set context_bar
[
im_context_bar
[
list
/intranet/invoices/
"Finance"
]
$page
_title
]
# ---------------------------------------------------------------
# Del
-
Action: Delete the selected associated objects
# Del
ete
Action: Delete the selected associated objects
# ---------------------------------------------------------------
if
{
"
"
!=
$del
_action &&
[
info
exists object_ids
]
}
{
if {"
delete
" ==
$action
} {
foreach object_id
[
array
names object_ids
]
{
ns_log Notice "
intranet-invoices/invoice-associtation-action: deleting object_id=$object_id
"
db_exec_plsql delete_association {}
...
...
@@ -86,8 +87,29 @@ if {"" != $del_action && [info exists object_ids]} {
ad_abort_script
}
# ---------------------------------------------------------------
# Set to Invoiced Action
# ---------------------------------------------------------------
if {"
set_invoiced
" ==
$action
} {
foreach object_id
[
array
names object_ids
]
{
ns_log Notice "
intranet-invoices/invoice-associtation-action: set_invoiced: object_id=$object_id
"
db_dml set_invoiced "
update im_projects
set project_status_id =
[
im_project_status_invoiced
]
where project_id = :object_id
"
}
ad_returnredirect
$return
_url
ad_abort_script
}
# ---------------------------------------------------------------
#
Get everything about the invoice
#
Add Project Action
# ---------------------------------------------------------------
set customer_id_org
$customer
_id
...
...
www/view.tcl
View file @
8726f828
...
...
@@ -45,6 +45,11 @@ set user_locale [lang::user::locale]
set
locale
$user
_locale
set
page_title
""
set
gen_vars
""
set
blurb
""
set
notify_vars
""
set
url
""
# Security is defered after getting the invoice information
# from the database, because the customer's users should
# be able to see this invoice even if they don't have any
...
...
@@ -1591,3 +1596,4 @@ if { "" != $err_mess } {
set err_mess
[
lang::message::lookup
""
$err
_mess
"Document Nr. not available anymore, please note and verify newly assigned number"
]
}
set
admin_p 1
\ No newline at end of file
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