From 27238f212bd68dacd5a602fb71a82918e065b4b4 Mon Sep 17 00:00:00 2001 From: Olusesan Ameye Date: Thu, 22 Sep 2022 20:08:55 -0400 Subject: [PATCH] fix --- www/application/controllers/Member.php | 2 +- www/application/models/Account_model.php | 6 ++++++ .../views/users/sections/mgs_reply.php | 3 ++- www/application/views/users/view_balance.php | 15 ++++++++++++++- www/application/views/users/view_message.php | 8 ++++++-- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/www/application/controllers/Member.php b/www/application/controllers/Member.php index 7f9575e5..70ef4c0d 100644 --- a/www/application/controllers/Member.php +++ b/www/application/controllers/Member.php @@ -749,7 +749,7 @@ class Member extends Users_Controller { $data['card_coupon_data_result'] = $this->report_model->getRedeemCouponsList(6)['card_coupon_data_result']; $data['wallet'] = $this->account_model->getUserWallet( $_SESSION['member_id']); - + $data['escrow'] = $this->account_model->getUserEscrowWallet( $_SESSION['member_id']); if ($_POST) { $data['comment'] = $this->input->post('comment'); diff --git a/www/application/models/Account_model.php b/www/application/models/Account_model.php index 00233353..6e93e328 100644 --- a/www/application/models/Account_model.php +++ b/www/application/models/Account_model.php @@ -18,6 +18,12 @@ class Account_model extends CI_Model { return $query->result_array(); } + public function getUserEscrowWallet($member_id) { + $mysql = "SELECT sum(amount),currency FROM members_payments WHERE code ='OFDPS' AND member_id = $member_id AND confirmation IS NOT NULL GROUP BY currency"; + $query = $this->db->query($mysql); + return $query->result_array(); + } + public function verify_link($data) { $q = $this ->db diff --git a/www/application/views/users/sections/mgs_reply.php b/www/application/views/users/sections/mgs_reply.php index 044c6261..41444d3d 100644 --- a/www/application/views/users/sections/mgs_reply.php +++ b/www/application/views/users/sections/mgs_reply.php @@ -42,7 +42,8 @@
+ data-kt-element="message-text"> + diff --git a/www/application/views/users/view_balance.php b/www/application/views/users/view_balance.php index 656b82e2..dd8cc7a8 100644 --- a/www/application/views/users/view_balance.php +++ b/www/application/views/users/view_balance.php @@ -54,7 +54,20 @@ function getAddWithdrawButtons(){ - + $val) { + if ($val['currency'] === $wlt['code']) { + $escrow_amount = $val['sum']; + } + } + + echo money_format('%.2n', $escrow_amount * 0.01); + + ?>
+ onclick="RelyBoxShow(,'');"> + Replied : '.$row['reply'].'' : '' ?> + @@ -50,7 +52,9 @@
+ onclick="RelyBoxShow(,'');"> + Replied : '.$row['reply'].'' : '
Reply Now' ?> +