child message

This commit is contained in:
CHIEFSOFT\ameye
2023-11-11 13:18:48 -05:00
parent cbfdc9d723
commit e7fb78daad
2 changed files with 8 additions and 10 deletions
+3 -6
View File
@@ -938,7 +938,9 @@ long project_email(long mailtype, CVars in, CVars &out) {
" LEFT JOIN currency c ON c.country = js.country "
" WHERE j.id=%lu", contract_id);
load_db_record(out, "SELECT email AS client_email,firstname AS client_firstname FROM members WHERE id = %lu", out["client_id"].Long());
load_db_record(out, "SELECT CASE WHEN account_type='FULL' THEN email ELSE 'support+child@wrenchboard.com' END AS client_email,"
" firstname AS client_firstname,account_type"
" FROM members WHERE id = %lu", out["client_id"].Long());
out["alertemail"] = CfgReadChar("transnotif.contact");
CVars yr;
@@ -958,11 +960,6 @@ long project_email(long mailtype, CVars in, CVars &out) {
form.LetStr("email", out["client_email"].c_str());
form.Email("PROJ/contract_notifycomplete_c.mailfile");
/*
-rw-r--r--. 1 oameye dev 9374 May 19 20:07 contract_notifycomplete_c.mailfile
-rw-r--r--. 1 oameye dev 9374 May 19 20:07 contract_notifycomplete_m.mailfile
*/
break;
case CONTRACT_REQUEST_CANCEL:
+5 -4
View File
@@ -1091,7 +1091,7 @@ long WrenchContractPayment( CVars in, CVars &out )
x["what_offer"] = offer_id; x["what_offer"].set_valid( true );
x["what_contract"] = contract_id; x["what_contract"].set_valid( true );
x["currency"] = y["currency"]; x["currency"].set_valid( true );
x["flags"] = FLAG_INIT; x["flags"].set_valid( true ); // starting the pprocess
payment_id = insert_db_record( DBS_VALID, "members_payments", "members_payments_id_seq", x );
@@ -1137,9 +1137,9 @@ long WrenchSendMoneyPayment( CVars in, CVars &out )
REQ_LONG( in, "sendmoney_id", 1, -1 );
long wallet_id = REQ_LONG( in, "wallet_id", 1, -1 );
long retDb = load_db_record( out, "SELECT amount AS curr_balance FROM members_wallet WHERE id = %lu AND member_id = %lu",wallet_id, in["member_id"].Long());
long retDb = load_db_record( out, "SELECT amount AS curr_balance,currency FROM members_wallet WHERE id = %lu AND member_id = %lu",wallet_id, in["member_id"].Long());
if (retDb)
if (retDb > 0 )
{ in["curr_balance"] =out["curr_balance"]; in["curr_balance"].set_valid( true ); // get this one LIVE
}
else
@@ -1147,7 +1147,7 @@ long WrenchSendMoneyPayment( CVars in, CVars &out )
return PHP_API_BAD_PARAM; }
long retDb2 = load_db_record( out, "SELECT id,initiatingamount AS amount,fee from money_transfer WHERE member_id= %lu AND id = %lu",in["member_id"].Long(), in["sendmoney_id"].Long());
if (retDb2)
if (retDb2 > 0 )
{ in["amount"] =out["amount"]; in["amount"].set_valid( true ); // get this one LIVE
in["fee"] =out["fee"]; in["fee"].set_valid( true ); // get this one LIVE
}
@@ -1172,6 +1172,7 @@ long WrenchSendMoneyPayment( CVars in, CVars &out )
x["amount"] = in["amount"]; x["amount"].set_valid( true );
x["fee"] = in["fee"]; x["fee"].set_valid( true );
x["what_sendmoney"] = in["sendmoney_id"]; x["what_sendmoney"].set_valid( true );
x["currency"] = out["currency"]; x["currency"].set_valid( true );
x["flags"] = FLAG_INIT; x["flags"].set_valid( true ); // starting the pprocess
payment_id = insert_db_record( DBS_VALID, "members_payments", "members_payments_id_seq", x );
logfmt(logINFO, "long WrenchSendMoneyPayment(CVars in, CVars &out) payment_id = %lu",payment_id);