From 3b12450fd3cdba3e30900ab06c10308367d042d9 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 9 Oct 2024 09:25:49 -0400 Subject: [PATCH] currency --- wrenchboard/src/shared_tool/account_mngt.cc | 6 +++--- www-api/app/Models/ResultFormatter.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/wrenchboard/src/shared_tool/account_mngt.cc b/wrenchboard/src/shared_tool/account_mngt.cc index 52337894..f256e3a2 100644 --- a/wrenchboard/src/shared_tool/account_mngt.cc +++ b/wrenchboard/src/shared_tool/account_mngt.cc @@ -295,7 +295,7 @@ long WrenchReturnMemberPaymentHx(CVars in, CVars &out) { const PGresult *res; res = pgsql_query("SELECT m.added::date AS trx_date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, m.id AS trx_id," - " r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS recipient,mp.confirmation, c.code, c.description, c.symbol," + " r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS recipient,mp.confirmation, c.code, c.description AS currency, c.symbol," " CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS status " " FROM money_transfer m " " LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid " @@ -317,8 +317,8 @@ long WrenchReturnMemberPaymentHx(CVars in, CVars &out) { snprintf(vname, sizeof (vname), "code_%05d", i); out[vname] = rec["code"]; - snprintf(vname, sizeof (vname), "description_%05d", i); - out[vname] = rec["description"]; + snprintf(vname, sizeof (vname), "currency_%05d", i); + out[vname] = rec["currency"]; snprintf(vname, sizeof (vname), "symbol_%05d", i); out[vname] = rec["symbol"]; diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index e4bf6a3d..cb7a98e6 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -820,7 +820,10 @@ class ResultFormatter extends Model "confirmation" => $out["confirmation_${key}"], "status" => $out["status_${key}"], "trx_date" => $out["trx_date_${key}"], - "trx_id" => $out["trx_id_${key}"] + "trx_id" => $out["trx_id_${key}"], + "code" => $out["code_${key}"], + "currency" => $out["currency_${key}"], + "symbol" => $out["symbol_${key}"] ); } break;