Clear some bullshit code
This commit is contained in:
parent
532241006a
commit
2a1d4f05f0
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue