Update graph.php

This commit is contained in:
Charlène Benke
2023-12-29 11:16:19 +01:00
committed by GitHub
parent 77be41720d
commit 2dfb2cc7c4

View File

@@ -208,7 +208,8 @@ if ($result < 0) {
$labels[$i] = $xday;
$day += 86400;
$textdate = strftime("%Y%m%d", $day);
//$textdate = strftime("%Y%m%d", $day);
$textdate = dol_print_date($day, "%Y%m%d");
$xyear = substr($textdate, 0, 4);
$xday = substr($textdate, 6, 2);
$xmonth = substr($textdate, 4, 2);
@@ -333,7 +334,8 @@ if ($result < 0) {
$subtotal = 0;
$now = time();
$day = dol_mktime(12, 0, 0, 1, 1, $year);
$textdate = strftime("%Y%m%d", $day);
//$textdate = strftime("%Y%m%d", $day);
$textdate = dol_print_date($day, "%Y%m%d");
$xyear = substr($textdate, 0, 4);
$xday = substr($textdate, 6, 2);
@@ -353,7 +355,8 @@ if ($result < 0) {
}*/
$labels[$i] = dol_print_date($day, "%Y%m");
$day += 86400;
$textdate = strftime("%Y%m%d", $day);
//$textdate = strftime("%Y%m%d", $day);
$textdate = dol_print_date($day, "%Y%m%d");
$xyear = substr($textdate, 0, 4);
$xday = substr($textdate, 6, 2);
$i++;
@@ -450,7 +453,8 @@ if ($result < 0) {
$subtotal = 0;
$day = $min;
$textdate = strftime("%Y%m%d", $day);
//$textdate = strftime("%Y%m%d", $day);
$textdate = dol_print_date($day, "%Y%m%d");
//print "x".$textdate;
$i = 0;
while ($day <= ($max + 86400)) { // On va au dela du dernier jour
@@ -470,7 +474,8 @@ if ($result < 0) {
$labels[$i] = substr($textdate, 0, 6);
$day += 86400;
$textdate = strftime("%Y%m%d", $day);
//$textdate = strftime("%Y%m%d", $day);
$textdate = dol_print_date($day, "%Y%m%d");
$i++;
}