diff --git a/www/application/controllers/Member.php b/www/application/controllers/Member.php index 5ec096a2..808eae92 100644 --- a/www/application/controllers/Member.php +++ b/www/application/controllers/Member.php @@ -642,7 +642,7 @@ class Member extends Users_Controller { $data['comment'] = ''; // $data['fee'] = 0; //$data['escrow_balance'] = 0; - + $this->load->model('report_model'); $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, " @@ -659,6 +659,8 @@ class Member extends Users_Controller { $data['sendmoney_table'] = $this->table->generate($query); $data['sendmoney_table_result'] = $query->result(); + $data['card_payment_data_result'] = $this->report_model->getCardPurchase(6)['card_payment_data_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] @@ -1004,7 +1006,11 @@ class Member extends Users_Controller { $this->load->library('pagination'); $config = array(); - +/* + * + * 7 | MEMBER_NEWCARD_PAYM | MNCCD | 0 + 8 | MEMBER_RETCARD_PAYM | MRCCD | 0 + */ $this->load->library('table'); $this->table->set_template($this->template); @@ -1012,7 +1018,10 @@ class Member extends Users_Controller { . "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' " . "WHEN code ='SMPAY' THEN 'Account Withdraw' " . "WHEN code ='COCNL' THEN 'Cancellation Refund' " - . "WHEN code ='COPAY' THEN 'Completed Task Payment' ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation " + . "WHEN code ='COPAY' THEN 'Completed Task Payment' " + . "WHEN code ='MNCCD' THEN 'New Card Payment' " + . "WHEN code ='MRCCD' THEN 'Repeat Card Payment' " + . "ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation " . "FROM members_payments " . "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC"; $query = $this->db->query($mysql); @@ -1045,12 +1054,15 @@ class Member extends Users_Controller { $page = is_numeric($page) ? $page : 0; $mysql = "SELECT added::date,(CASE WHEN code = 'OFDPS' THEN 'Job Offer Deposit' " - . "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' " - . "WHEN code ='SMPAY' THEN 'Account Withdraw' " - . "WHEN code ='COCNL' THEN 'Cancellation Refund' " - . "WHEN code ='COPAY' THEN 'Completed Task Payment' ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation " - . "FROM members_payments " - . "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page; + . "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' " + . "WHEN code ='SMPAY' THEN 'Account Withdraw' " + . "WHEN code ='COCNL' THEN 'Cancellation Refund' " + . "WHEN code ='COPAY' THEN 'Completed Task Payment' " + . "WHEN code ='MNCCD' THEN 'New Card Payment' " + . "WHEN code ='MRCCD' THEN 'Repeat Card Payment' " + . "ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation " + . "FROM members_payments " + . "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page; $query = $this->db->query($mysql); diff --git a/www/application/models/Report_model.php b/www/application/models/Report_model.php new file mode 100644 index 00000000..71d61425 --- /dev/null +++ b/www/application/models/Report_model.php @@ -0,0 +1,24 @@ +db->query($mysql); + $data['card_payment_data_result'] = $query->result(); + return $data; + } + +} diff --git a/www/application/views/users/view_balance.php b/www/application/views/users/view_balance.php index aed089ee..46201bba 100644 --- a/www/application/views/users/view_balance.php +++ b/www/application/views/users/view_balance.php @@ -1,9 +1,5 @@ - -
@@ -148,9 +144,9 @@ Date - Recipient - Amount/Fee - Conf/Status + Recipient + Amount/Fee + Conf/Status @@ -462,6 +458,105 @@
+ +
+ +
+ +
+ +
+

+ Purchases + +

+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateDescriptionAmountFee
+ added?> + + description?> + confirmation?> + + amount?> + + fee?> + + + + +
+
+ +
+ +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ + diff --git a/www/application/views/users/view_payment.php b/www/application/views/users/view_payment.php index 0796e630..125fae33 100644 --- a/www/application/views/users/view_payment.php +++ b/www/application/views/users/view_payment.php @@ -51,7 +51,7 @@ added?> - description?> + description?> confirmation?>