This commit is contained in:
CHIEFSOFT\ameye
2024-02-13 10:39:37 -05:00
parent f53fc76fa3
commit 0d40d4c57b
+9 -1
View File
@@ -2505,7 +2505,7 @@ FAMILY_ACTION_SEND_REWARD
logfmt(logINFO, "LoginWrenchBoardSetDashType()");
try {
REQ_LONG(in, "member_id", 1, -1);
long member_id = REQ_LONG(in, "member_id", 1, -1);
// Job Owner Side ***********************************************************************************************
if ( load_db_record(out, "SELECT count(id) AS pending_job_count FROM members_jobs_offer "
" WHERE expire > now() AND member_id = %lu", in["member_id"].Long()) > 0 ){
@@ -2550,6 +2550,14 @@ FAMILY_ACTION_SEND_REWARD
" FROM members_family WHERE member_id = %lu", in["member_id"].Long() ) > 0 ){
if (out["family_count"].Long() > 0 ){
out["family_action"] = "FAMILY_ACTION_SEND_REWARD";
// check wallet
// check tasks
if ( load_db_record(out, "SELECT amount AS wbalance FROM members_wallet WHERE member_id = %lu AND currency = 'USD'",member_id) > 0 ){
if (out["wbalance"].Long() > 0 ){
out["family_action"] = "FAMILY_ACTION_NO_TASKS";
}
}
}
}
}