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
ef1c1405
Commit
ef1c1405
authored
Oct 08, 2004
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Localization and fix bugs
parent
e09f3538
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
124 additions
and
30 deletions
+124
-30
intranet-invoices.en_US.ISO-8859-1.xml
catalog/intranet-invoices.en_US.ISO-8859-1.xml
+19
-0
intranet-invoices-procs.tcl
tcl/intranet-invoices-procs.tcl
+8
-4
list.tcl
www/list.tcl
+2
-0
new-2.tcl
www/new-2.tcl
+4
-4
new-postgresql.xql
www/new-postgresql.xql
+1
-1
new.tcl
www/new.tcl
+1
-1
notify.tcl
www/notify.tcl
+1
-1
payment-action.tcl
www/payment-action.tcl
+0
-1
view-oracle.xql
www/view-oracle.xql
+37
-0
view-postgresql.xql
www/view-postgresql.xql
+36
-0
view.adp
www/view.adp
+3
-3
view.tcl
www/view.tcl
+12
-15
No files found.
catalog/intranet-invoices.en_US.ISO-8859-1.xml
View file @
ef1c1405
...
...
@@ -2,10 +2,12 @@
<message_catalog
package_key=
"intranet-invoices"
package_version=
"2.1.0"
locale=
"en_US"
charset=
"ISO-8859-1"
>
<msg
key=
"Add_a_Payment"
>
Add a Payment
</msg>
<msg
key=
"Add_a_Project"
>
Add a Project
</msg>
<msg
key=
"Add_a_user"
>
Add a user
</msg>
<msg
key=
"Admin_Links"
>
Admin Links
</msg>
<msg
key=
"Adress"
>
Adress
</msg>
<msg
key=
"Amount"
>
Amount
</msg>
<msg
key=
"Client"
>
Client
</msg>
<msg
key=
"Company"
>
Company
</msg>
<msg
key=
"Company_1"
>
Company:
</msg>
<msg
key=
"Company_name"
>
Company name
</msg>
...
...
@@ -23,8 +25,12 @@
<msg
key=
"days"
>
days
</msg>
<msg
key=
"Del"
>
Del
</msg>
<msg
key=
"Description"
>
Description
</msg>
<msg
key=
"Document_"
>
Document #
</msg>
<msg
key=
"Document_hash_simbol"
>
Document #
</msg>
<msg
key=
"Document_Status"
>
Document Status:
</msg>
<msg
key=
"Document_Type"
>
Document Type:
</msg>
<msg
key=
"Due_Date"
>
Due Date
</msg>
<msg
key=
"Edit"
>
Edit
</msg>
<msg
key=
"Edit_cost_type"
>
Edit %cost_type%
</msg>
<msg
key=
"Edit_cost_type_1"
>
Edit %cost_type
</msg>
<msg
key=
"Email"
>
Email
</msg>
...
...
@@ -34,6 +40,7 @@
<msg
key=
"Financial_Documents"
>
Financial Documents
</msg>
<msg
key=
"From"
>
From:
</msg>
<msg
key=
"Go"
>
Go
</msg>
<msg
key=
"Hour"
>
Hour
</msg>
<msg
key=
"Line"
>
Line
</msg>
<msg
key=
"lt_Cant_find_the_documen"
>
Can't find the document# %invoice_id%
</msg>
<msg
key=
"lt_Dear_accounting_conta"
>
Dear %accounting_contact_name%,
...
...
@@ -69,14 +76,22 @@ Best regards,
<msg
key=
"lt_You_have_insufficient"
>
You have insufficient privileges to see this page
</msg>
<msg
key=
"lt_You_have_insufficient_1"
>
You have insufficient privileges to view this page.
</msg>
<msg
key=
"lt_You_need_to_specify_a"
>
You need to specify a invoice_id
</msg>
<msg
key=
"New_Company_Invoice_from_Quote"
>
New Company Invoice from Quote
</msg>
<msg
key=
"New_Company_Invoice_from_scratch"
>
New Company Invoice from scratch
</msg>
<msg
key=
"New_cost_type"
>
New %cost_type%
</msg>
<msg
key=
"New_Provider_Bill_from_Purchase_Order"
>
New Provider Bill from Purchase Order
</msg>
<msg
key=
"New_Provider_Bill_from_scratch"
>
New Provider Bill from scratch
</msg>
<msg
key=
"New_Purchase_Order_from_scratch"
>
New Purchase Order from scratch
</msg>
<msg
key=
"New_Quote_from_scratch"
>
New Quote from scratch
</msg>
<msg
key=
"Next_Page"
>
Next Page
</msg>
<msg
key=
"No_command_specified"
>
No command specified
</msg>
<msg
key=
"No_objects_found"
>
No objects found
</msg>
<msg
key=
"No_payments_found"
>
No payments found
</msg>
<msg
key=
"Note"
>
Note:
</msg>
<msg
key=
"Notify_user"
>
Notify user
</msg>
<msg
key=
"One_cost_type"
>
One %cost_type%
</msg>
<msg
key=
"Our_Ref"
>
Our Ref.
</msg>
<msg
key=
"Paid"
>
Paid
</msg>
<msg
key=
"Payment_Method"
>
Payment Method
</msg>
<msg
key=
"Payment_Method_1"
>
Payment Method:
</msg>
<msg
key=
"Payment_Terms"
>
Payment Terms:
</msg>
...
...
@@ -90,7 +105,11 @@ Best regards,
<msg
key=
"Rate"
>
Rate
</msg>
<msg
key=
"Recipient"
>
Recipient
</msg>
<msg
key=
"Related_Payments"
>
Related Payments
</msg>
<msg
key=
"Related_Projects"
>
Related Projects
</msg>
<msg
key=
"S-Line"
>
S-Line
</msg>
<msg
key=
"Save"
>
Save
</msg>
<msg
key=
"Status"
>
Status
</msg>
<msg
key=
"Subtotal"
>
Subtotal
</msg>
<msg
key=
"TAX"
>
TAX
</msg>
<msg
key=
"TAXnbsp"
>
TAX
&
nbsp;
</msg>
<msg
key=
"To"
>
To:
</msg>
...
...
tcl/intranet-invoices-procs.tcl
View file @
ef1c1405
...
...
@@ -73,6 +73,10 @@ where
ascii(substr(i.nr,4,1)) < 58
"
set last_invoice_nr
[
db_string max_invoice_nr
$sql
-default
""
]
set last_invoice_nr
[
string
trimleft
$last
_invoice_nr
"0"
]
if
{[
empty_string_p
$last
_invoice_nr
]}
{
set last_invoice_nr 0
}
set next_number
[
expr
$last
_invoice_nr + 1
]
ns_log notice
"********** next_number is
$next
_number *************"
set
sql
"
...
...
@@ -165,7 +169,7 @@ ad_proc im_invoices_object_list_component { user_id invoice_id return_url } {
if
{
0 ==
$ctr
}
{
append object_list_html
"
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
<td><i>
No objects found
</i></td>
<td><i>
[
_ intranet-invoices.No_objects_found
]
</i></td>
</tr>
\n
"
}
...
...
@@ -174,16 +178,16 @@ ad_proc im_invoices_object_list_component { user_id invoice_id return_url } {
[
export_form_vars invoice_id return_url
]
<table border=0 cellspacing=1 cellpadding=1>
<tr>
<td align=middle class=rowtitle colspan=2>
Related Projects
</td>
<td align=middle class=rowtitle colspan=2>
[
_ intranet-invoices.Related_Projects
]
</td>
</tr>
$object
_list_html
<tr>
<td align=right>
<input type=submit name=add_project_action value='
Add a Project
'>
<input type=submit name=add_project_action value='
[
_ intranet-invoices.Add_a_Project
]
'>
</A>
</td>
<td>
<input type=submit name=del_action value='
Del
'>
<input type=submit name=del_action value='
[
_ intranet-invoices.Del
]
'>
</td>
</tr>
</table>
...
...
www/list.tcl
View file @
ef1c1405
...
...
@@ -430,6 +430,8 @@ if { ![empty_string_p $query_string] } {
append table_header_html "
<tr>
\n
"
foreach col
$column
_headers {
regsub -all "
"
$col
"
_
" col_key
regsub -all "
#
"
$col
_key "
hash_simbol
" col_key
#set col_key
[
lang::util::suggest_key
$col
]
if {
[
string
compare
$order
_by
$col
]
== 0 } {
append table_header_html "
<td class=rowtitle>
[
_ intranet-invoices.$col_key
]
</td>
\n
"
} else {
...
...
www/new-2.tcl
View file @
ef1c1405
...
...
@@ -26,7 +26,7 @@ ad_page_contract {
template_id:integer
vat:float
tax:float
note
{
note
""
}
item_sort_order:array
item_name:array
item_units:float,array
...
...
@@ -72,8 +72,8 @@ if {$invoice_or_bill_p && ("" == $payment_method_id || 0 == $payment_method_id)}
return
}
if
{
""
==
$provider
_id
}
{
set provider_id
[
im_company_internal
]
}
if
{
""
==
$company
_id
}
{
set company_id
[
im_company_internal
]
}
if
{
""
==
$provider
_id
|| 0 ==
$provider
_id
}
{
set provider_id
[
im_company_internal
]
}
if
{
""
==
$company
_id
|| 0 ==
$company
_id
}
{
set company_id
[
im_company_internal
]
}
set
project_id
""
...
...
@@ -183,7 +183,7 @@ foreach project_id $select_project {
from acs_rels
where object_id_one = :project_id
and object_id_two = :invoice_id"
if
{
0 =
$v
_rel_exists
}
{
if
{
0 =
=
$v
_rel_exists
}
{
set rel_id
[
db_exec_plsql create_rel
""
]
}
}
...
...
www/new-postgresql.xql
View file @
ef1c1405
...
...
@@ -19,7 +19,7 @@
i.invoice_nr,
ci.customer_id,
ci.provider_id,
ci.
effective_date,
to_char(ci.effective_date,'YYYY-MM-DD') as
effective_date,
ci.payment_days,
ci.vat,
ci.tax,
...
...
www/new.tcl
View file @
ef1c1405
...
...
@@ -54,7 +54,7 @@ set user_id [ad_maybe_redirect_for_registration]
#
}
set
return_url
[
im_url_with_query
]
set
todays_date
[
db_string get_today
"select
sysdate
from dual"
]
set
todays_date
[
db_string get_today
"select
to_char(sysdate,'YYYY-MM-DD')
from dual"
]
set
page_focus
"im_header_form.keywords"
set
view_name
"invoice_tasks"
...
...
www/notify.tcl
View file @
ef1c1405
...
...
@@ -65,7 +65,7 @@ where
if
{
$cost
_type_id ==
[
im_cost_type_quote
]
||
$cost
_type_id ==
[
im_cost_type_invoice
]}
{
set company_id
$c
ompany
_id
set company_id
$c
ustomer
_id
}
else
{
set company_id
$provider
_id
}
...
...
www/payment-action.tcl
View file @
ef1c1405
...
...
@@ -26,7 +26,6 @@ if {![im_permission $user_id add_invoices]} {
ad_return_complaint 1
"<li>
[
_ intranet-invoices.lt_You_have_insufficient
]
"
return
}
if
{
""
!=
$del
}
{
ns_log Notice
"payment-action: delete payments:
$payment
_id"
...
...
www/view-oracle.xql
0 → 100644
View file @
ef1c1405
<?xml version="1.0"?>
<!DOCTYPE queryset PUBLIC "-//OpenACS//DTD XQL 1.0//EN" "/usr/share/emacs/DTDs/xql.dtd">
<!-- packages/intranet-invoices/www/view-oracle.xql -->
<!-- @author Juanjo Ruiz (juanjoruizx@yahoo.es) -->
<!-- @creation-date 2004-10-08 -->
<!-- @arch-tag 873b11b2-60e2-4bbf-9dd5-d6b06c019421 -->
<!-- @cvs-id $Id$ -->
<queryset>
<rdbms>
<type>
oracle
</type>
<version>
8.1.6
</version>
</rdbms>
<fullquery
name =
"invoice_items"
>
<querytext>
select
i.*,
p.*,
im_category_from_id(i.item_type_id) as item_type,
im_category_from_id(i.item_uom_id) as item_uom,
p.project_nr as project_short_name,
i.price_per_unit * i.item_units as amount
from
im_invoice_items i,
im_projects p
where
i.invoice_id=:invoice_id
and i.project_id=p.project_id(+)
order by
i.sort_order,
i.item_type_id
</querytext>
</fullquery>
</queryset>
www/view-postgresql.xql
0 → 100644
View file @
ef1c1405
<?xml version="1.0"?>
<!DOCTYPE queryset PUBLIC "-//OpenACS//DTD XQL 1.0//EN" "/usr/share/emacs/DTDs/xql.dtd">
<!-- packages/intranet-invoices/www/view-postgresql.xql -->
<!-- @author Juanjo Ruiz (juanjoruizx@yahoo.es) -->
<!-- @creation-date 2004-10-08 -->
<!-- @arch-tag ffe2b337-c79b-4b45-bfcb-41a371866d36 -->
<!-- @cvs-id $Id$ -->
<queryset>
<rdbms>
<type>
postgresql
</type>
<version>
7.2
</version>
</rdbms>
<fullquery
name =
"invoice_items"
>
<querytext>
select
i.*,
p.*,
im_category_from_id(i.item_type_id) as item_type,
im_category_from_id(i.item_uom_id) as item_uom,
p.project_nr as project_short_name,
i.price_per_unit * i.item_units as amount
from
im_invoice_items i
LEFT JOIN im_projects p on i.project_id=p.project_id
where
i.invoice_id=:invoice_id
order by
i.sort_order,
i.item_type_id;
</querytext>
</fullquery>
</queryset>
www/view.adp
View file @
ef1c1405
...
...
@@ -52,7 +52,7 @@
</tr>
<tr>
<td class=roweven>#intranet-invoices.cost_type_date#</td>
<td class=roweven>@invoice_date@</td>
<td class=roweven>@invoice_date
_pretty
@</td>
</tr>
<!-- <tr>
<td class=rowodd>#intranet-invoices.cost_type_due_date#</td>
...
...
@@ -79,7 +79,7 @@
<tr><td colspan=2 align=right>
<form action=new method=POST>
<%= [export_form_vars return_id invoice_id cost_type_id] %>
<input type=submit name=edit_invoice value='
Edit
'>
<input type=submit name=edit_invoice value='
#intranet-invoices.Edit#
'>
</form>
</td></tr>
</table>
...
...
@@ -93,7 +93,7 @@
<tr>
<td class=rowodd>#intranet-invoices.Company_name#</td>
<td class=rowodd>
<A href="/intranet/companies/view?company_id=@comp
any
_id@">@company_name@</A>
<A href="/intranet/companies/view?company_id=@comp_id@">@company_name@</A>
</td>
</tr>
<tr>
...
...
www/view.tcl
View file @
ef1c1405
...
...
@@ -28,7 +28,6 @@ if {0 == $invoice_id} {
ad_return_complaint 1
"<li>
[
_ intranet-invoices.lt_You_need_to_specify_a
]
"
return
}
if
{
!
[
im_permission
$user
_id view_companies
]}
{
ad_return_complaint
"
[
_ intranet-invoices.lt_Insufficient_Privileg
]
"
"
<li>
[
_ intranet-invoices.lt_You_have_insufficient_1
]
<BR>
...
...
@@ -72,7 +71,7 @@ if {$cost_type_id == [im_cost_type_po]} {
if
{
$invoice
_or_quote_p
}
{
# A Company document
set company_or_provider_join
"and i.c
ompany
_id = c.company_id"
set company_or_provider_join
"and i.c
ustomer
_id = c.company_id"
set provider_company
"Company"
}
else
{
# A provider document
...
...
@@ -93,6 +92,7 @@ select
c.*,
c.company_id as company_id,
o.*,
to_char(i.invoice_date,'YYYY-MM-DD') as invoice_date_pretty,
to_date(to_char(i.invoice_date,'YYYY-MM-DD'),'YYYY-MM-DD') + i.payment_days as calculated_due_date,
im_name_from_user_id(c.accounting_contact_id) as company_contact_name,
im_email_from_user_id(c.accounting_contact_id) as company_contact_email,
...
...
@@ -116,7 +116,7 @@ if { ![db_0or1row projects_info_query $query] } {
ad_return_complaint 1
"
[
_ intranet-invoices.lt_Cant_find_the_documen
]
"
return
}
set
comp_id
"
$company
_id"
set
query
"
select
pm_cat.category as invoice_payment_method,
...
...
@@ -168,7 +168,6 @@ where cost_id = :invoice_id
set
payment_list_html
""
if
{[
db_table_exists im_payments
]}
{
set cost_id
$invoice
_id
set payment_list_html
"
<form action=payment-action method=post>
...
...
@@ -183,6 +182,7 @@ if {[db_table_exists im_payments]} {
set payment_list_sql
"
select
p.*,
to_char(p.received_date,'YYYY-MM-DD') as received_date_pretty,
im_category_from_id(p.payment_type_id) as payment_type
from
im_payments p
...
...
@@ -196,7 +196,7 @@ where
<tr
$bgcolor
(
[
expr
$payment
_ctr % 2
]
)>
<td>
<A href=/intranet-payments/view?payment_id=
$payment
_id>
$received
_date
$received
_date
_pretty
</A>
</td>
<td>
...
...
@@ -269,14 +269,12 @@ set ctr 1
set
colspan 7
if
{
!$company_project_nr_exists
}
{
set colspan
[
expr
$colspan-1
]}
db_foreach invoice_items
$invoice
_items_sql
{
db_foreach invoice_items
{}
{
append item_html
"
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
<td>
$item
_name</td>
<td align=right>
$item
_units</td>
<td align=left>
$item
_uom
</td>
<td align=left>
[
_ intranet-core.$item_uom
]
</td>
<td align=right>
[
im_date_format_locale
$price
_per_unit 2 3
]
$currency
</td>
\n
"
if
{
$company
_project_nr_exists
}
{
# Only if intranet-translation has added the field
...
...
@@ -313,7 +311,7 @@ set colspan_sub [expr $colspan - 1]
# Add a subtotal
append
item_html
"
<tr>
<td class=rowplain colspan=
$colspan
_sub align=right><B>
Subtotal
</B></td>
<td class=rowplain colspan=
$colspan
_sub align=right><B>
[
_ intranet-invoices.Subtotal
]
</B></td>
<td class=roweven align=right><B>
[
im_date_format_locale
$subtotal
2 2
]
$currency
</B></td>
</tr>
"
...
...
@@ -321,8 +319,8 @@ append item_html "
#if {0 != $vat
}
{
append item_html
"
<tr>
<td colspan=
$colspan
_sub align=right>
[
_ intranet-invoices.VAT
]
:
$vat
% </td>
<td class=roweven align=right>
$vat
_amount
$currency
</td>
<td colspan=
$colspan
_sub align=right>
[
_ intranet-invoices.VAT
]
:
[
format
"%0.1f"
$vat
]
% </td>
<td class=roweven align=right>
[
format
"%0.2f"
$vat
_amount
]
$currency
</td>
</tr>
"
#
}
...
...
@@ -330,8 +328,8 @@ append item_html "
if
{
0 !=
$tax
}
{
append item_html
"
<tr>
<td colspan=
$colspan
_sub align=right>
[
_ intranet-invoices.TAX
]
:
$tax
% </td>
<td class=roweven align=right>
$tax
_amount
$currency
</td>
<td colspan=
$colspan
_sub align=right>
[
_ intranet-invoices.TAX
]
:
[
format
"%0.1f"
$tax
]
% </td>
<td class=roweven align=right>
[
format
"%0.2f"
$tax
_amount
]
$currency
</td>
</tr>
"
}
...
...
@@ -363,7 +361,6 @@ append item_html "
</tr>
"
# ---------------------------------------------------------------
# 10. Format using a template
# ---------------------------------------------------------------
...
...
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