diff --git a/wrenchboard/src/shared_tool/jobs.cc b/wrenchboard/src/shared_tool/jobs.cc index c4bc80c9..7d856ba6 100644 --- a/wrenchboard/src/shared_tool/jobs.cc +++ b/wrenchboard/src/shared_tool/jobs.cc @@ -1263,7 +1263,7 @@ long WrenchSendMediaOfferFamily(CVars in, CVars &out) { return ret; } // same client and member not allowed - if (y["price"].Long() > 0) { + if (in["amount"].Long() > 0) { } else { out["status"] = "Unable to create offer"; return ret; @@ -1272,11 +1272,11 @@ long WrenchSendMediaOfferFamily(CVars in, CVars &out) { // Now do you have money to do this .... z["balance"] = "0"; z["balance"].set_valid(true); // just initialize it - if (load_db_record(z, " SELECT * FROM members_wallet WHERE id =%lu AND member_id =%lu AND amount >= %lu",wallet_id, in["member_id"].Long(), y["price"].Long())) { + if (load_db_record(z, " SELECT * FROM members_wallet WHERE id =%lu AND member_id =%lu AND amount >= %lu",wallet_id, in["member_id"].Long(), in["amount"].Long())) { } else { out["status"] = "Insufficient balance to create this offer"; - logfmt(logINFO, "Price2 = %lu Balance = %lu", y["price"].Long(), z["amount"].Long()); + logfmt(logINFO, "Price2 = %lu Balance = %lu", in["amount"].Long(), z["amount"].Long()); } //***************************************