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
9827b8e2
authored
2011-04-08 19:35:50 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated UserManager allowing for Tax Exempt in Events, and membership invoices
1 parent
9e288b16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
com/UserManager/UserManager.php
com/UserManager/UserManager.php
View file @
9827b8e
...
...
@@ -1046,6 +1046,18 @@ class Actions {
$user
=
new
User\Account
(
$uid
);
$is_tax_exempt
=
false
;
// loop through special status to see if exempt is there.
if
(
isset
(
$user
->
special_statuses
)
)
{
foreach
(
$user
->
special_statuses
as
$stat
)
{
if
(
$stat
==
"tax_exempt"
)
{
$is_tax_exempt
=
true
;
break
;
}
}
}
$cost
=
get_post_meta
(
$event_id
,
'cost'
,
true
);
$role
=
$user
->
getRole
();
...
...
@@ -1110,15 +1122,33 @@ class Actions {
$tpp
=
get_user_meta
(
$user
->
ID
,
'profile_preference'
,
true
);
$tpp
=
strtolower
(
$tpp
);
$province
=
get_user_meta
(
$user
->
ID
,
$tpp
.
"_province"
,
true
);
$tax_label
=
"Taxes-
$province
"
;
$tax
=
getTaxesByProvince
(
$province
);
if
(
$is_tax_exempt
)
{
$tax_label
=
"Exempt"
;
$tax
=
0
;
$taxes
=
0
;
}
else
{
$tax_label
=
"Taxes-
$province
"
;
$tax
=
getTaxesByProvince
(
$province
);
$taxes
=
(
$new_cost
*
(
$tax
/
100
));
}
}
else
{
$tax_label
=
"Taxes-
$provstate
"
;
$tax
=
getTaxesByProvince
(
$provstate
);
// tax percentage (whole number)
if
(
$is_tax_exempt
)
{
$tax_label
=
"Exempt"
;
$tax
=
0
;
$taxes
=
0
;
}
else
{
$tax_label
=
"Taxes-
$provstate
"
;
$tax
=
getTaxesByProvince
(
$provstate
);
// tax percentage (whole number)
$taxes
=
(
$new_cost
*
(
$tax
/
100
));
}
}
$taxes
=
(
$new_cost
*
(
$tax
/
100
));
...
...
Please
register
or
sign in
to post a comment