fix
This commit is contained in:
@@ -479,15 +479,15 @@ Foreign-key constraints:
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", in["member_id"].Long());
|
||||
long retDb = load_db_record( out, "SELECT amount AS curr_balance FROM members_wallet WHERE member_id = %lu AND id = %lu", in["member_id"].Long(),wallet_id);
|
||||
|
||||
if (retDb)
|
||||
{ in["curr_balance"] =out["curr_balance"]; in["curr_balance"].set_valid( true ); // get this one LIVE
|
||||
}
|
||||
else
|
||||
{ out["status"] = "Invalid user";
|
||||
return PHP_API_BAD_PARAM; }
|
||||
return PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
long retDb2 = load_db_record( out, "SELECT jj.price,0 as fee FROM members_jobs_offer j LEFT JOIN members_jobs jj ON jj.id=j.job_id WHERE j.id =%lu ",in["offer_id"].Long());
|
||||
if (retDb2)
|
||||
@@ -566,14 +566,15 @@ long WrenchRefundoffer( CVars in, CVars &out )
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", in["member_id"].Long());
|
||||
long retDb = load_db_record( out, "SELECT amount AS curr_balance FROM members_wallet WHERE member_id = %lu AND id = %lu", in["member_id"].Long(),wallet_id);
|
||||
|
||||
if (retDb)
|
||||
{ in["curr_balance"] =out["curr_balance"]; in["curr_balance"].set_valid( true ); // get this one LIVE
|
||||
}
|
||||
else
|
||||
{ out["status"] = "Invalid user";
|
||||
return PHP_API_BAD_PARAM; }
|
||||
return PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
long retDb2 = load_db_record( out, "SELECT * FROM members_payments WHERE id =%lu AND what_offer = %lu AND member_id=%lu AND code = 'OFDPS' AND status = 1 AND flags = 4 AND confirmation IS NOT NULL",payment_id,offer_id,member_id);
|
||||
@@ -667,7 +668,11 @@ long WrenchContractPayment( CVars in, CVars &out )
|
||||
return PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
// TEST FOR DUPLICATE
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", client_id);
|
||||
|
||||
@@ -679,10 +684,7 @@ long WrenchContractPayment( CVars in, CVars &out )
|
||||
return PHP_API_BAD_PARAM; }
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user