From 6c55a096b0c1430babe9d43804960c59f3b89f96 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 30 Oct 2023 18:13:18 -0400 Subject: [PATCH] family recip --- wrenchboard/src/shared_tool/family_acc.cc | 5 +++++ www-api/app/Models/ResultFormatter.php | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/wrenchboard/src/shared_tool/family_acc.cc b/wrenchboard/src/shared_tool/family_acc.cc index 29e60db9..5cf3f4c5 100644 --- a/wrenchboard/src/shared_tool/family_acc.cc +++ b/wrenchboard/src/shared_tool/family_acc.cc @@ -598,12 +598,17 @@ Indexes: CVars rec; map_to_cvars(f, rec); + + snprintf(vname, sizeof (vname), "uid_%05d", i); out[vname] = rec["uid"]; snprintf(vname, sizeof (vname), "amount_%05d", i); out[vname] = rec["amount"]; + snprintf(vname, sizeof (vname), "currency_%05d", i); + out[vname] = rec["currency"]; + snprintf(vname, sizeof (vname), "recipient_%05d", i); out[vname] = rec["recipient"]; diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index a6405aac..b4058def 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -787,6 +787,29 @@ class ResultFormatter extends Model } break; + case WRENCHBOARD_FAMILY_TRANSFERHX: + $total = $out["total_record"]; + $res = array( + "status" => $out["status"], + "total_record" => ($total - 0), + "internal_return" => $out["internal_return"], + "result_list" => array(), + ); + for ($i = 0; $i < $total; $i++) { + $key = sprintf("%05d", $i); + $res["result_list"][] = array( + "currency" => $out["currency_${key}"], + "amount" => $out["amount_${key}"], + "symbol" => $out["symbol_${key}"], + "description" => $out["description_${key}"], + "confirmation" => $out["confirmation_${key}"], + "rec_lastname_" => $out["rec_lastname_${key}"], + "rec_firstname" => $out["rec_firstname_${key}"], + "added" => $out["added_${key}"], + "uid" => $out["uid_${key}"], + ); + } + break; default: return $out; }