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
2e21ed0e
Commit
2e21ed0e
authored
Feb 06, 2006
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- modified member-notify to handle attachments
parent
615bd8dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
notify.tcl
www/notify.tcl
+44
-1
No files found.
www/notify.tcl
View file @
2e21ed0e
...
...
@@ -6,7 +6,20 @@
# http://www.project-open.com/license/ for details.
ad_page_contract
{
Purpose: Confirms adding of person to group
Purpose: Send an email to the accounting/project contact
to inform about the invoice.
The contact can be informed via:
<ul>
<li>Link: The user needs to log-in in order to see the invoice
<li>HTML: The content of the invoice is sent out as a HTML
page. However, logos or any other included links need to
be accessible on a webserver URL
"from outside the office"
,
otherwise the HTML will not be displayed correctly.
<li>PDF: If the html2ps/html2pdf converters are installed.
This is the most stable solution. Howeve, you have to
make sure the the PDF converter finds all logos and CSS
for the PO server.
</ul>
@param user_id_from_search user_id to add
@param object_id group to which to add
...
...
@@ -18,6 +31,8 @@ ad_page_contract {
@author frank.bergmann@project-open.com
}
{
invoice_id:integer
{
invoice_html:allhtml
""
}
{
send_to_user_as
""
}
return_url
}
...
...
@@ -32,6 +47,24 @@ if {!$write} {
<li>
[
_ intranet-invoices.lt_You_dont_have_suffici
]
"
}
# Build the name of the attachment
db_1row invoice_info
"
select
c.*,
im_category_from_id(cost_type_id) as cost_type
from im_costs c
where cost_id = :invoice_id
"
# create a reasonable name for the attachment.
# Should look like: "invoice.2006_03_0005.html"
set
use_invoice_nr_type_prefix_p
[
ad_parameter -package_id
[
im_package_invoices_id
]
"UseInvoiceNrTypePrefixP"
""
0
]
set
attachment_filename
"
$cost
_type."
append
attachment_filename
[
string
range
$cost
_name
$use
_invoice_nr_type_prefix_p 99
]
append
attachment_filename
".
$send
_to_user_as"
set
attachment_filename
[
string
tolower
$attachment
_filename
]
# --------------------------------------------------------
# Prepare to send out an email alert
# --------------------------------------------------------
...
...
@@ -109,3 +142,13 @@ db_foreach select_projects $select_project_sql {
set
user_id_from_search
$accounting
_contact_id
set
export_vars
[
export_form_vars user_id_from_search invoice_id return_url
]
if
{
""
!=
$send
_to_user_as
}
{
set attachment
$invoice
_html
switch
$send
_to_user_as
{
"html"
{
set attachment_mime_type
"text/html"
}
"pdf"
{
set attachment_mime_type
"application/pdf"
}
default
{
set
attachment_mime_type
"text/plain"
}
}
append export_vars
[
export_form_vars attachment_mime_type attachment
]
}
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