Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-ubl
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-ubl
Commits
1bf9d91c
Commit
1bf9d91c
authored
Jul 17, 2009
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed issue for invoices with no im_invoice.invoice_office_id value,
using the company's main office instead
parent
8e028469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
invoice.xml.tcl
www/invoice.xml.tcl
+24
-13
No files found.
www/invoice.xml.tcl
View file @
1bf9d91c
...
...
@@ -14,7 +14,7 @@ ad_page_contract {
@author frank.bergmann@project-open.com
}
{
{
invoice_id:integer
90763
}
{
invoice_id:integer
""
}
}
# ---------------------------------------------------------------
...
...
@@ -22,9 +22,10 @@ ad_page_contract {
# ---------------------------------------------------------------
set
user_id
[
ad_maybe_redirect_for_registration
]
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
# ---------------------------------------------------------------
# Get information about the financial document ("invoice"
)
# ---------------------------------------------------------------
...
...
@@ -32,16 +33,9 @@ set today [db_string today "select to_char(now(), 'YYYY-MM-DD')"]
if
{
!
[
db_0or1row project_info
"
select c.*,
i.*,
coalesce(i.invoice_office_id, cust.main_office_id) as cust_office_id,
o.creation_date as issue_date,
cust.company_name as customer_name,
ocust.address_line1 as customer_address_line1,
ocust.address_line2 as customer_address_line2,
ocust.address_city as customer_address_city,
ocust.address_state as customer_address_state,
ocust.address_postal_code as customer_address_postal_code,
ocust.address_country_code as customer_address_country_code,
prov.company_name as provider_name,
oprov.address_line1 as provider_address_line1,
oprov.address_line2 as provider_address_line2,
...
...
@@ -64,7 +58,6 @@ if {![db_0or1row project_info "
acs_objects o,
im_companies cust,
im_companies prov,
im_offices ocust,
im_offices oprov,
users_contact cust_contact,
users_contact prov_contact
...
...
@@ -74,15 +67,33 @@ if {![db_0or1row project_info "
and i.invoice_id = o.object_id
and c.customer_id = cust.company_id
and c.provider_id = prov.company_id
and ocust.office_id = i.invoice_office_id
and oprov.office_id = prov.main_office_id
and i.company_contact_id = cust_contact.user_id
and prov.accounting_contact_id = prov_contact.user_id
"
]}
{
ad_return_complaint 1
[
lang::message::lookup
""
intranet-ubl.Financial_Document_Not_Found
"Didn't find financial document
\#
%
project
_id%"
]
ad_return_complaint 1
[
lang::message::lookup
""
intranet-ubl.Financial_Document_Not_Found
"Didn't find financial document
\#
%
invoice
_id%"
]
return
}
if
{
!
[
db_0or1row cust_office_info
"
select
ocust.address_line1 as customer_address_line1,
ocust.address_line2 as customer_address_line2,
ocust.address_city as customer_address_city,
ocust.address_state as customer_address_state,
ocust.address_postal_code as customer_address_postal_code,
ocust.address_country_code as customer_address_country_code
from
im_offices ocust
where
ocust.office_id = :cust_office_id
"
]}
{
ad_return_complaint 1
[
lang::message::lookup
""
intranet-ubl.Office_Not_Found
"Didn't find customer's office information
\#
%cust_office_id%"
]
return
}
set
invoice_url
"/intranet-invoices/view?invoice_id=
$invoice
_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