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
3bf9453c
authored
2011-03-22 18:10:05 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
User Manager Updates for invoices
1 parent
91e5e2eb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
10 deletions
com/UserManager/UserManager.js
com/UserManager/UserManager.php
com/UserManager/views/edit_user_payhistory.php
com/UserManager/UserManager.js
View file @
3bf9453
...
...
@@ -22,11 +22,24 @@ jQuery(function($) {
}
$
(
'#invoice_type'
).
change
(
function
()
{
if
(
$
(
'#invoice_type'
).
val
()
==
"invoice"
)
{
$
(
'.invoice_only'
).
show
();
}
else
{
$
(
'.invoice_only'
).
hide
();
var
invoice_type
=
$
(
this
).
val
();
switch
(
invoice_type
)
{
case
'invoice'
:
$
(
'tr.invoice_credit_only'
).
show
();
$
(
'tr.invoice_only'
).
show
();
break
;
case
'membership'
:
$
(
'tr.invoice_credit_only'
).
hide
();
$
(
'tr.invoice_only'
).
show
();
break
;
default
:
$
(
'tr.invoice_credit_only'
).
show
();
$
(
'tr.invoice_only'
).
hide
();
}
});
jQuery
(
'#creditNotBtn'
).
click
(
function
(
e
)
{
...
...
com/UserManager/UserManager.php
View file @
3bf9453
...
...
@@ -713,6 +713,14 @@ class Actions {
if
(
$uid
==
0
)
{
$uid
=
$_POST
[
'uid'
];
}
// All this for tax purposes....
$pp
=
strtolower
(
get_user_meta
(
$uid
,
'profile_preference'
,
true
));
if
(
empty
(
$pp
))
{
$pp
=
"home"
;
}
$pp
=
$pp
.
"_"
;
$amount
=
$_POST
[
'amount'
];
$invoice_type
=
$_POST
[
'invoice_type'
];
$paid_by
=
$_POST
[
'paid_by'
];
...
...
@@ -728,6 +736,27 @@ class Actions {
}
// if membership....
if
(
$invoice_type
==
"membership"
)
{
$paid
=
(
isset
(
$_POST
[
'paid'
])
&&
$_POST
[
'paid'
]
==
"on"
)
?
true
:
false
;
if
(
$paid
)
{
$status
=
"paid"
;
}
else
{
$status
=
"unpaid"
;
}
Invoice\GenerateMembershipInvoice
(
$uid
,
$status
,
$paid_by
,
false
);
// return json object
$return
=
array
(
'success'
=>
'true'
);
die
(
json_encode
(
$return
));
}
// if not membership.....
$items
=
array
();
$items
[]
=
array
(
...
...
@@ -753,12 +782,12 @@ class Actions {
,
'total_taxes'
=>
""
,
'subtotal'
=>
$amount
,
'total'
=>
$amount
,
'bt_address'
=>
""
,
'bt_address2'
=>
""
,
'bt_city'
=>
""
,
'bt_province'
=>
""
,
'bt_country'
=>
""
,
'bt_postal'
=>
""
,
'bt_address'
=>
get_user_meta
(
$uid
,
$pp
.
'address'
,
true
)
,
'bt_address2'
=>
get_user_meta
(
$uid
,
$pp
.
'address2'
,
true
)
,
'bt_city'
=>
get_user_meta
(
$uid
,
$pp
.
'city'
,
true
)
,
'bt_province'
=>
get_user_meta
(
$uid
,
$pp
.
'province'
,
true
)
,
'bt_country'
=>
get_user_meta
(
$uid
,
$pp
.
'country'
,
true
)
,
'bt_postal'
=>
get_user_meta
(
$uid
,
$pp
.
'postal'
,
true
)
,
'bt_card_holder'
=>
""
,
'bt_card_number'
=>
""
,
'bt_card_type'
=>
$paid_by
...
...
com/UserManager/views/edit_user_payhistory.php
View file @
3bf9453
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment