mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-23 09:13:23 -05:00
Shows amount if expired membership & status is stand time.
This commit is contained in:
parent
23d8bcf60e
commit
2508653fef
@ -789,6 +789,7 @@ $(function() {
|
|||||||
sold_to.change(function() {
|
sold_to.change(function() {
|
||||||
|
|
||||||
if (this.value !== "no_selection") {
|
if (this.value !== "no_selection") {
|
||||||
|
var expiration_date;
|
||||||
|
|
||||||
// Is this a paid member?
|
// Is this a paid member?
|
||||||
$.post("json/transaction.php", { membership_benefits: 1, contact_id: this.value }, function (data) {
|
$.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) {
|
if (typeof obj.expiration_date && obj.expiration_date !== undefined) {
|
||||||
var exp = obj.expiration_date;
|
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 (d >= expiration_date) {
|
||||||
if ($("#expired_membership").length === 1) {
|
if ($("#expired_membership").length === 1) {
|
||||||
$("#expired_membership").prop("title",title).html("Expired Membership");
|
$("#expired_membership").prop("title",title).html("Expired Membership");
|
||||||
@ -830,7 +831,7 @@ $(function() {
|
|||||||
if (data) {
|
if (data) {
|
||||||
var obj = $.parseJSON(data);
|
var obj = $.parseJSON(data);
|
||||||
amount.val("");
|
amount.val("");
|
||||||
if(!obj.membership) {
|
if(!obj.membership || expiration_date) {
|
||||||
amount.val(obj.total + ".00"); // should improve this for amount values with digits
|
amount.val(obj.total + ".00"); // should improve this for amount values with digits
|
||||||
price = obj.total;
|
price = obj.total;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user