From 2a1d4f05f04c64647b1893945d54abbd49dc7176 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Fri, 15 Oct 2021 09:41:18 +0100 Subject: [PATCH] Clear some bullshit code --- .../nano_health/hyper/gestion_wallet.php | 64 +++---------------- 1 file changed, 10 insertions(+), 54 deletions(-) diff --git a/application/views/nano_health/hyper/gestion_wallet.php b/application/views/nano_health/hyper/gestion_wallet.php index 5c614895..3a241c52 100755 --- a/application/views/nano_health/hyper/gestion_wallet.php +++ b/application/views/nano_health/hyper/gestion_wallet.php @@ -10,60 +10,16 @@ use Brick\Money\Money; $context = new \Brick\Money\Context\AutoContext(); -$month = time(); -$months[] = convertDate(date("M")); -$label_months [] = date("M") . " " . date("Y"); -$years[] = date("Y"); -for ($i = 1; $i <= 11; $i++) { - $month = strtotime('last month', $month); - $months [] = convertDate(date("M", $month)); - $years[] = date("Y", $month); - $label_months [] = date("M", $month) . " " . date("Y", $month); -} - -/** - ** Retraits - **/ -$date = date("Y"); - -$retraits_data[] = ''; -$retraits_data = array(); -for ($i = 1; $i <= 12; $i++) { - $retraits_query_mounth = $this->db->query("SELECT id FROM infos_transaction - WHERE network_id='" . $network_id . "' - AND MONTH(date_created) = '" . $months[$i - 1] . "' - AND YEAR(date_created) = '" . $years[$i - 1] . "' - AND type_transac='debit'"); - $retraits_data[] = $retraits_query_mounth->num_rows(); -} - -$startDate = (new DateTime('01-' . $months[11] . '-' . $years[11]))->format('Y-m-d H:i:s'); -$endDate = date_create_from_format('m/Y', $months[0] . '/' . $years[0])->format('Y-m-d H:i:s'); - -$retraits = $this->db->query("SELECT * FROM infos_transaction - WHERE network_id='" . $network_id . "' - AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "' - AND type_transac='debit'"); - -/** - ** Dépots - **/ -$date = date("Y"); - -$depots_data[] = ''; -$depots_data = array(); -for ($i = 1; $i <= 12; $i++) { - $depots_query_mounth = $this->db->query("SELECT id FROM infos_transaction - WHERE network_id='" . $network_id . "' - AND MONTH(date_created) = '" . $months[$i - 1] . "' - AND YEAR(date_created) = '" . $years[$i - 1] . "' - AND type_transac='credit'"); - $depots_data[] = $depots_query_mounth->num_rows(); -} -$depots = $this->db->query("SELECT * FROM infos_transaction - WHERE network_id='" . $network_id . "' - AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "' - AND type_transac='credit'"); +//$month = time(); +//$months[] = convertDate(date("M")); +//$label_months [] = date("M") . " " . date("Y"); +//$years[] = date("Y"); +//for ($i = 1; $i <= 11; $i++) { +// $month = strtotime('last month', $month); +// $months [] = convertDate(date("M", $month)); +// $years[] = date("Y", $month); +// $label_months [] = date("M", $month) . " " . date("Y", $month); +//} //if ($transactions != false) { // $transac = $transactions->num_rows();