Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
cab1aff6
authored
2011-03-18 02:08:07 +0000
by
Marty Penner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Moved 'bill to' to just below CBV header
1 parent
f8ac0f12
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
com/UserManager/views/edit_user_payhistory.php
com/UserManager/views/edit_user_payhistory.php
View file @
cab1aff
...
...
@@ -102,6 +102,28 @@ use WP_User;
Toronto, ON, Canada M5V 3H2
</p>'
;
if
(
$status
==
'unpaid'
)
{
// Get the user's profile preference
$preference
=
strtolower
(
$user
->
profile_preference
);
// Build the 'Bill To:' info array
$user_fields
=
array
(
'address'
,
'address2'
,
'city'
,
'province'
,
'country'
,
'postal'
);
$bill_to
=
array
();
foreach
(
$user_fields
as
$field
)
{
// Use the preference to get the user's address info
$bill_to
[
$field
]
=
get_user_meta
(
$user
->
ID
,
"
{
$preference
}
_
{
$field
}
"
,
TRUE
);
}
// Finish it off with first and last name
$bill_to
[
'first_name'
]
=
get_user_meta
(
$user
->
ID
,
'first_name'
,
TRUE
);
$bill_to
[
'last_name'
]
=
get_user_meta
(
$user
->
ID
,
'last_name'
,
TRUE
);
// Now build the html
$html
.=
'<p><br /><h3>BILL TO:</h3>'
;
$html
.=
"
{
$bill_to
[
'first_name'
]
}
{
$bill_to
[
'last_name'
]
}
<br />"
;
$html
.=
"
{
$bill_to
[
'address'
]
}
,
{
$bill_to
[
'address2'
]
}
<br />"
;
$html
.=
"
{
$bill_to
[
'city'
]
}
,
{
$bill_to
[
'province'
]
}
,
{
$bill_to
[
'country'
]
}
{
$bill_to
[
'postal'
]
}
</p>"
;
}
$html
.=
'<h3 style="margin:0;padding:0;text-align:right;">Invoice No.: '
.
$invoice
->
ID
.
'</h3>'
;
$html
.=
'<p style="text-align:right;margin-top:0;padding-top:0;"><strong>Invoice Date:</strong> '
.
$date
.
'</p>'
;
$html
.=
'<h2>'
.
$invoice
->
post_title
.
'</h2>'
;
...
...
@@ -247,35 +269,12 @@ use WP_User;
//}
$html
.=
'</p>'
;
if
(
$status
==
'unpaid'
)
{
// Get the user's profile preference
$preference
=
strtolower
(
$user
->
profile_preference
);
// Build the 'Bill To:' info array
$user_fields
=
array
(
'address'
,
'address2'
,
'city'
,
'province'
,
'country'
,
'postal'
);
$bill_to
=
array
();
foreach
(
$user_fields
as
$field
)
{
// Use the preference to get the user's address info
$bill_to
[
$field
]
=
get_user_meta
(
$user
->
ID
,
"
{
$preference
}
_
{
$field
}
"
,
TRUE
);
}
// Finish it off with first and last name
$bill_to
[
'first_name'
]
=
get_user_meta
(
$user
->
ID
,
'first_name'
,
TRUE
);
$bill_to
[
'last_name'
]
=
get_user_meta
(
$user
->
ID
,
'last_name'
,
TRUE
);
// Now build the html
$html
.=
'<h3>BILL TO:</h3>'
;
$html
.=
"
{
$bill_to
[
'first_name'
]
}
{
$bill_to
[
'last_name'
]
}
<br />"
;
$html
.=
"
{
$bill_to
[
'address'
]
}
<br />
{
$bill_to
[
'address2'
]
}
<br />"
;
$html
.=
"
{
$bill_to
[
'city'
]
}
,
{
$bill_to
[
'province'
]
}
<br />"
;
$html
.=
"
{
$bill_to
[
'country'
]
}
{
$bill_to
[
'postal'
]
}
"
;
}
else
{
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_card_holder'
]))
?
'<h3>BILLED TO:</h3>'
:
""
;
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_card_holder'
]))
?
$invoice
->
payment
[
'bt_card_holder'
]
.
"<br />"
:
""
;
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_address'
]))
?
$invoice
->
payment
[
'bt_address'
]
.
" "
.
$invoice
->
payment
[
'bt_address2'
]
.
"<br />"
:
""
;
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_city'
]))
?
$invoice
->
payment
[
'bt_city'
]
.
", "
.
$invoice
->
payment
[
'bt_province'
]
.
"<br />"
:
""
;
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_country'
]))
?
$invoice
->
payment
[
'bt_country'
]
.
" "
.
$invoice
->
payment
[
'bt_postal'
]
.
"<br /><br />"
:
""
;
$html
.=
(
!
empty
(
$invoice
->
payment
[
'bt_card_type'
]))
?
"Paid using: <strong>"
.
CBV\get_payment_string
(
$invoice
->
payment
[
'bt_card_type'
])
.
"</strong> "
.
$invoice
->
payment
[
'bt_card_number'
]
:
""
;
}
//if ($status != "credit") {
$html
.=
'<p>GST/HST# R108075334</p>'
;
...
...
Please
register
or
sign in
to post a comment