initialize wallet
This commit is contained in:
@@ -742,8 +742,17 @@ long WrenchFamilyWallet(CVars in, CVars &out){
|
|||||||
map<const char*, const char*>f = pgsql_fetch_assoc(res0, 0);
|
map<const char*, const char*>f = pgsql_fetch_assoc(res0, 0);
|
||||||
map_to_cvars(f, rec0);
|
map_to_cvars(f, rec0);
|
||||||
family_member_id = rec0["family_member_id"].Long();
|
family_member_id = rec0["family_member_id"].Long();
|
||||||
|
|
||||||
|
CVars vw;
|
||||||
|
if( load_db_record(vw, "SELECT c.code AS currency from members m LEFT JOIN currency c ON c.country = m.country WHERE m.id=%lu AND m.country IS NOT NULL",in["member_id"].Long())> 0 ){
|
||||||
|
logfmt(logINFO, "********~~~~~~~~ WrenchFamilyWallet() ------ CheckWallet() = %lu",parent_member_id);
|
||||||
|
// vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||||
|
//vw["currency"].set_valid( true );
|
||||||
|
long wallet_id = CheckWallet(family_member_id,vw); // making sure we have a wallet
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
out["error_msg"] ="member_family_wallet_not_found";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user