diff --git a/www/application/controllers/Member.php b/www/application/controllers/Member.php index e2310407..5fd48ab1 100644 --- a/www/application/controllers/Member.php +++ b/www/application/controllers/Member.php @@ -636,6 +636,22 @@ class Member extends Users_Controller { // $data['fee'] = 0; //$data['escrow_balance'] = 0; + $this->load->library('table'); + $this->table->set_template($this->template); + $mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, " + . "r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS Recitient,mp.confirmation," + . "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 " + . "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code " + . "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id " + . "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4"; + + $query = $this->db->query($mysql); + $this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status'); + $data['sendmoney_table'] = $this->table->generate($query); + $data['sendmoney_table_result'] = $query->result(); + if ($_POST) { $data['comment'] = $this->input->post('comment'); $data['amount'] = $this->input->post('amount') + 0; // must be number [still in full will be cents to go to backend latter] @@ -667,21 +683,7 @@ class Member extends Users_Controller { } } - $this->load->library('table'); - $this->table->set_template($this->template); - $mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, " - . "r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS Recitient,mp.confirmation," - . "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 " - . "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code " - . "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id " - . "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4"; - $query = $this->db->query($mysql); - $this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status'); - $data['sendmoney_table'] = $this->table->generate($query); - $data['sendmoney_table_result'] = $query->result(); $data['page_title'] ="Wallet"; $this->RenderUserPage('users/view_balance', $data); } @@ -778,7 +780,16 @@ class Member extends Users_Controller { public function confirmwithdraw() { $final_page = false; $data = $this->getSessionArray(); - + + + + + + + + + + //$data = $this->getSessionArray(); if ($_POST) { // case 'sendmoney':$in["action"] = WRENCHBOARD_USER_SENDMONEY; @@ -858,16 +869,34 @@ class Member extends Users_Controller { $data['recipient_account_combo'] = $this->combo_model->getUserRecipientCombo('recipient_account', $_SESSION['member_id'], $data['recipient_account']); // $this->load->view('users/view_header_user', $data); + $data['sendmoney_table_result'] = $this->getSendMoneyRecent(); $this->RenderUserPage('users/view_confirmwithdraw', $data); // $this->load->view('users/view_footer_user', $data); } else { //$this->load->view('users/view_header_user', $data); + $data['sendmoney_table_result'] = $this->getSendMoneyRecent(); $this->RenderUserPage('users/view_finalwithdraw', $data); // $this->load->view('users/view_footer_user', $data); } } + + private function getSendMoneyRecent(){ + + $mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, " + . "r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS Recitient,mp.confirmation," + . "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 " + . "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code " + . "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id " + . "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4"; + + $query = $this->db->query($mysql); + return $query->result(); + + } public function completewithdraw() { echo 'Not attached - backend implemented already'; diff --git a/www/application/views/users/view_confirmwithdraw.php b/www/application/views/users/view_confirmwithdraw.php index 19014a87..cfcb2ddb 100644 --- a/www/application/views/users/view_confirmwithdraw.php +++ b/www/application/views/users/view_confirmwithdraw.php @@ -1,92 +1,434 @@ - -
- + + + +
+ +
+ +
+ +
+

+ Confirm Withdraw to Account + Account Balance : Naira +

+
- -
-
-
-
-

Account Balance : Naira

-
-
-
Escrow Balance : Naira
-
-
-
-
- + + +
+ +
+ +
+
+
+
Confirm Withdraw to Account
- -
-
- - -
-
+
+
+
+ +
+
+ +
-
Confirm Withdraw to Account
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
-
-
-
- -
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- - -
- -
- -
-
- - -
- -
- -
-
- -
- -
- -
-
- - + + +
+
+
- + + +
+ +
+ +
+

+ Recent Activities + Activity Report +

+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateRecipientAmount/FeeConf/Status
+ date?> + + recitient?> + + + amount?>
fee?> +
+ confirmation?> + status?> + + + + +
+ + +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+ Who Knows Geography + By Zoey Dylan + + 3:22PM, 07 Sep + Date + + + + +
+
+ + + + + + + + + + + + +
+
+ Maths Championship + By Tom Gere + + 10:05PM, 25 Oct + Date + + + + +
+
+ + + + + + + + + + + +
+
+ School Music Festival + by Rose Liam + + 4:20PM, 03 Sep + Date + + + + +
+
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
+
+ Maths Championship + By Tom Gere + + 10:05PM, 25 Oct + Date + + + + +
+
+ + + + + + + + + + +
+
+ Who Knows Geography + By Zoey Dylan + + 3:22PM, 07 Sep + Date + + + + +
+
+ + + + + + + + + + +
+
+ Napoleon Days + By Luke Owen + + 1:20PM, 02 Dec + Date + + + + +
+
+ + + + + + + + + + + +
+
+ School Music Festival + by Rose Liam + + 4:20PM, 03 Sep + Date + + + + +
+
+ +
+ +
+
+ +
+ +
+
- + diff --git a/www/application/views/users/view_finalwithdraw.php b/www/application/views/users/view_finalwithdraw.php index a2139019..898ca941 100644 --- a/www/application/views/users/view_finalwithdraw.php +++ b/www/application/views/users/view_finalwithdraw.php @@ -1,74 +1,402 @@ -
+ - + +
+ +
+ +
+ +
+

+ Withdraw Confirmation + Account Balance : Naira +

+
- -
-
-
-
-

Account Balance : Naira

-
-
-
Escrow Balance : Naira
-
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Amount Received: Naira
Processing Fee: Naira
Recipient:
Account No:
Bank:
Confirmation No:
+ +
+
+
- + + +
+ +
+ +
+

+ Recent Activities + Activity Report +

+
- -
-
+
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + -
-
-
-
Withdraw Confirmation
- -
DateRecipientAmount/FeeConf/Status
+ date?> + + recitient?> + + + amount?>
fee?> +
+ confirmation?> + status?> + + + + +
- - - - - - - - - - - - - - - - - - - - - - - + + +
Amount Received: Naira
Processing Fee: Naira
Recipient:
Account No:
Bank:
Confirmation No:
- - - +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+ Who Knows Geography + By Zoey Dylan + + 3:22PM, 07 Sep + Date + + + + +
+
+ + + + + + + + + + + + +
+
+ Maths Championship + By Tom Gere + + 10:05PM, 25 Oct + Date + + + + +
+
+ + + + + + + + + + + +
+
+ School Music Festival + by Rose Liam + + 4:20PM, 03 Sep + Date + + + + +
+
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
+
+ Maths Championship + By Tom Gere + + 10:05PM, 25 Oct + Date + + + + +
+
+ + + + + + + + + + +
+
+ Who Knows Geography + By Zoey Dylan + + 3:22PM, 07 Sep + Date + + + + +
+
+ + + + + + + + + + +
+
+ Napoleon Days + By Luke Owen + + 1:20PM, 02 Dec + Date + + + + +
+
+ + + + + + + + + + + +
+
+ School Music Festival + by Rose Liam + + 4:20PM, 03 Sep + Date + + + + +
+
+ +
+
- - - +
+
- - +
- + diff --git a/www/application/views/users/view_smoney.php b/www/application/views/users/view_smoney.php index 9fce228c..3cf82d15 100644 --- a/www/application/views/users/view_smoney.php +++ b/www/application/views/users/view_smoney.php @@ -21,7 +21,7 @@
-
+