AMOUNT
This commit is contained in:
@@ -1263,7 +1263,7 @@ long WrenchSendMediaOfferFamily(CVars in, CVars &out) {
|
|||||||
return ret;
|
return ret;
|
||||||
} // same client and member not allowed
|
} // same client and member not allowed
|
||||||
|
|
||||||
if (y["price"].Long() > 0) {
|
if (in["amount"].Long() > 0) {
|
||||||
} else {
|
} else {
|
||||||
out["status"] = "Unable to create offer";
|
out["status"] = "Unable to create offer";
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1272,11 +1272,11 @@ long WrenchSendMediaOfferFamily(CVars in, CVars &out) {
|
|||||||
// Now do you have money to do this ....
|
// Now do you have money to do this ....
|
||||||
z["balance"] = "0";
|
z["balance"] = "0";
|
||||||
z["balance"].set_valid(true); // just initialize it
|
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 {
|
} else {
|
||||||
out["status"] = "Insufficient balance to create this offer";
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************
|
//***************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user