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
c3f2597f
Commit
c3f2597f
authored
Aug 03, 2004
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added project relation code
parent
354f9098
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
8 deletions
+93
-8
add-project-to-invoice.tcl
www/add-project-to-invoice.tcl
+84
-0
new.tcl
www/new.tcl
+2
-2
view.tcl
www/view.tcl
+7
-6
No files found.
www/add-project-to-invoice.tcl
0 → 100755
View file @
c3f2597f
# /packages/intranet-invoices/www/add-project-to-invoice.tcl
#
# Copyright (C
)
2003-2004 Project/Open
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
# ---------------------------------------------------------------
# Page Contract
# ---------------------------------------------------------------
ad_page_contract
{
Allows to
"associate"
a project with a financial document.
This is useful when the document has been created
"from scratch"
.
@author frank.bergmann@project-open.com
}
{
{
invoice_id:integer 0
}
{
project_id:integer 0
}
{
return_url
"/intranet-invoices/"
}
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
ad_maybe_redirect_for_registration
]
if
{
!
[
im_permission
$user
_id view_invoices
]}
{
ad_return_complaint
"Insufficient Privileges"
"
<li>You don't have sufficient privileges to see this page."
}
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>"
set
page_title
"Associate Invoice with Project"
set
context_bar
[
ad_context_bar
[
list
/intranet/invoices/
"Finance"
]
$page
_title
]
# ---------------------------------------------------------------
# Get everything about the invoice
# ---------------------------------------------------------------
append
query
"
select
i.*,
c.*,
o.*,
i.invoice_date + i.payment_days as calculated_due_date,
pm_cat.category as invoice_payment_method,
pm_cat.category_description as invoice_payment_method_desc,
im_name_from_user_id(c.accounting_contact_id) as customer_contact_name,
im_email_from_user_id(c.accounting_contact_id) as customer_contact_email,
c.customer_name,
cc.country_name,
im_category_from_id(i.invoice_status_id) as invoice_status,
im_category_from_id(i.invoice_type_id) as invoice_type,
im_category_from_id(i.invoice_template_id) as invoice_template
from
im_invoices i,
im_customers c,
im_offices o,
country_codes cc,
im_categories pm_cat
where
i.invoice_id=:invoice_id
and i.payment_method_id=pm_cat.category_id(+)
and i.customer_id=c.customer_id(+)
and c.main_office_id=o.office_id(+)
and o.address_country_code=cc.iso(+)
"
if
{
!
[
db_0or1row projects_info_query
$query
]
}
{
ad_return_complaint 1
"Can't find the document
\#
$invoice
_id"
return
}
set
project_select
[
im_project_select object_id
$project
_id
"Open"
""
""
""
]
db_release_unused_handles
www/new.tcl
View file @
c3f2597f
...
...
@@ -204,7 +204,7 @@ if {[string equal $invoice_mode "new"]} {
# start formatting the list of sums with the header...
set task_sum_html
"
<tr align=center>
<td class=rowtitle>
Order
</td>
<td class=rowtitle>
Line
</td>
<td class=rowtitle>Description</td>
<td class=rowtitle>Type</td>
<td class=rowtitle>Units</td>
...
...
@@ -248,7 +248,7 @@ order by
# start formatting the list of sums with the header...
set task_sum_html
"
<tr align=center>
<td class=rowtitle>
Order
</td>
<td class=rowtitle>
Line
</td>
<td class=rowtitle>Description</td>
<td class=rowtitle>Type</td>
<td class=rowtitle>Units</td>
...
...
www/view.tcl
View file @
c3f2597f
...
...
@@ -258,7 +258,7 @@ append project_list_html "
<tr>
<td align=left colspan=2>
<A href=/intranet-invoices/add-project-to-invoice?invoice_id=
$invoice
_id>
A
dd a related
Project
A
ssociate with a
Project
</A>
</td>
</tr>"
...
...
@@ -409,16 +409,16 @@ append item_html "
</tr>
"
if
{
$vat
!= 0
}
{
#if {0 != $vat
}
{
append item_html
"
<tr>
<td colspan=
$colspan
_sub align=right>VAT:
$vat
% </td>
<td class=roweven align=right>
$vat
_amount
$currency
</td>
</tr>
"
}
#
}
if
{
$vat
!= 0
}
{
if
{
0 !=
$tax
}
{
append item_html
"
<tr>
<td colspan=
$colspan
_sub align=right>TAX:
$tax
% </td>
...
...
@@ -514,9 +514,10 @@ if {[exists_and_not_null render_template_id]} {
</tr>
</table>
[
im_invoices_object_list_component
$user
_id
$invoice
_id
$return
_url
]
<br>
<table border=0 cellPadding=0 cellspacing=2>
$project
_list_html
<tr><td colspan=2> </td></tr>
$payment
_list_html
<tr><td colspan=2> </td></tr>
</table>
...
...
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