Browse Source

Shows amount if expired membership & status is stand time.

devel
Jonathan Rosenbaum 7 years ago
parent
commit
2508653fef
  1. 5
      js/transaction.js

5
js/transaction.js

@ -789,6 +789,7 @@ $(function() {
sold_to.change(function() {
if (this.value !== "no_selection") {
var expiration_date;
// Is this a paid member?
$.post("json/transaction.php", { membership_benefits: 1, contact_id: this.value }, function (data) {
@ -801,7 +802,7 @@ $(function() {
if (typeof obj.expiration_date && obj.expiration_date !== undefined) {
var exp = obj.expiration_date;
var expiration_date = new Date(exp.split("-").toString());
expiration_date = new Date(exp.split("-").toString());
if (d >= expiration_date) {
if ($("#expired_membership").length === 1) {
$("#expired_membership").prop("title",title).html("Expired Membership");
@ -830,7 +831,7 @@ $(function() {
if (data) {
var obj = $.parseJSON(data);
amount.val("");
if(!obj.membership) {
if(!obj.membership || expiration_date) {
amount.val(obj.total + ".00"); // should improve this for amount values with digits
price = obj.total;
}

Loading…
Cancel
Save