diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index ef64c1746f1..c6513038854 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Charles-Fr BENKE + * Copyright (C) 2013-2023 Charlene BENKE * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +51,8 @@ if ($user->socid) { $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); $year_start = GETPOST('year_start'); -$year_current = strftime("%Y", time()); +//$year_current = strftime("%Y", time()); +$year_current = dol_print_date(time(), "%Y"); if (!$year_start) { $year_start = $year_current - 2; $year_end = $year_current; diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 490107e4893..c7be41eed61 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -188,7 +188,8 @@ if ($result < 0) { $subtotal = 0; $day = dol_mktime(12, 0, 0, $month, 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); $xmonth = substr($textdate, 4, 2); @@ -207,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); @@ -332,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); @@ -352,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++; @@ -449,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 @@ -469,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++; } diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 49925556725..09e52081228 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -75,7 +75,8 @@ llxHeader('', $langs->trans("PurchasesJournal"), '', '', 0, 0, '', '', $morequer $form = new Form($db); $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$pastmonth = strftime("%m", dol_now()) - 1; +//$pastmonth = strftime("%m", dol_now()) - 1; +$pastmonth = dol_print_date(dol_now(), "%m") - 1; $pastmonthyear = $year_current; if ($pastmonth == 0) { $pastmonth = 12; diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 6f76ebfcedb..0ecdf3b2f0c 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -79,7 +79,8 @@ llxHeader('', $langs->trans("SellsJournal"), '', '', 0, 0, '', '', $morequery); $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$pastmonth = strftime("%m", dol_now()) - 1; +//$pastmonth = strftime("%m", dol_now()) - 1; +$pastmonth = dol_print_date(dol_now(), "%m") - 1; $pastmonthyear = $year_current; if ($pastmonth == 0) { $pastmonth = 12; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 059084dec0e..5f70269512d 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -1044,8 +1044,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { if ($mois > 12) { $annee_decalage = $annee + 1; } - $case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage)); - + //$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage)); + $case = dol_print_date(dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage), "%Y-%m"); print ''; if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'BOOKKEEPING') { if (isset($decaiss[$case]) && $decaiss[$case] != 0) { diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 7b5b23f726f..835d8a999fe 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -377,7 +377,8 @@ $now_show_delta = 0; $minyear = substr($minyearmonth, 0, 4); $maxyear = substr($maxyearmonth, 0, 4); $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$nowyearmonth = strftime("%Y-%m", dol_now()); +$nowyearmonth = dol_print_date(dol_now(), "%Y%m"); +//$nowyearmonth = strftime("%Y-%m", dol_now()); $maxyearmonth = max($maxyearmonth, $nowyearmonth); $now = dol_now(); $casenow = dol_print_date($now, "%Y-%m"); diff --git a/htdocs/compta/stats/supplier_turnover.php b/htdocs/compta/stats/supplier_turnover.php index 245967dcd8b..3a78dc0c6a4 100644 --- a/htdocs/compta/stats/supplier_turnover.php +++ b/htdocs/compta/stats/supplier_turnover.php @@ -328,7 +328,8 @@ $now_show_delta = 0; $minyear = substr($minyearmonth, 0, 4); $maxyear = substr($maxyearmonth, 0, 4); $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$nowyearmonth = strftime("%Y-%m", dol_now()); +//$nowyearmonth = strftime("%Y-%m", dol_now()); +$nowyearmonth = dol_print_date(dol_now(), "%Y-%m"); $maxyearmonth = max($maxyearmonth, $nowyearmonth); $now = dol_now(); $casenow = dol_print_date($now, "%Y-%m");