From edef39bed984a9c01848593e3a5e0d03dffff9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 14 Sep 2022 09:01:56 +0200 Subject: [PATCH 1/5] strftime is deprecated in php8.1 --- .../prelevement/class/bonprelevement.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index d87317e2420..9a1789dd49b 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -419,8 +419,8 @@ class BonPrelevement extends CommonObject } else { $paiement = new Paiement($this->db); } - $paiement->datepaye = $date; - $paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice + $paiement->datepaye = $date; + $paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice if ($this->type == 'bank-transfer') { $paiement->paiementid = 2; @@ -766,8 +766,8 @@ class BonPrelevement extends CommonObject $datetimeprev = $executiondate; } - $month = strftime("%m", $datetimeprev); - $year = strftime("%Y", $datetimeprev); + $month = date("%m", $datetimeprev); + $year = date("%Y", $datetimeprev); $this->invoice_in_error = array(); $this->thirdparty_in_error = array(); @@ -1746,8 +1746,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, strftime("%d%m", $this->date_echeance)); - fputs($this->file, substr(strftime("%y", $this->date_echeance), 1)); + fputs($this->file, date("%d%m", $this->date_echeance)); + fputs($this->file, substr(date("%y", $this->date_echeance), 1)); // Raison Sociale Destinataire C2 @@ -1972,8 +1972,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, strftime("%d%m", $this->date_echeance)); - fputs($this->file, substr(strftime("%y", $this->date_echeance), 1)); + fputs($this->file, date("%d%m", $this->date_echeance)); + fputs($this->file, substr(date("%y", $this->date_echeance), 1)); // Raison Sociale C2 From 9f7c17333b62af9e07360472b59591716e0686ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 21 Sep 2022 08:44:15 +0200 Subject: [PATCH 2/5] Update bonprelevement.class.php --- .../prelevement/class/bonprelevement.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 9a1789dd49b..464051926f2 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -22,9 +22,9 @@ */ /** - * \file htdocs/compta/prelevement/class/bonprelevement.class.php - * \ingroup prelevement - * \brief File of withdrawal receipts class + * \file htdocs/compta/prelevement/class/bonprelevement.class.php + * \ingroup prelevement + * \brief File of withdrawal receipts class */ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; @@ -760,14 +760,14 @@ class BonPrelevement extends CommonObject $error = 0; - $datetimeprev = time(); + $datetimeprev = dol_now('gmt'); //Choice the date of the execution direct debit if (!empty($executiondate)) { $datetimeprev = $executiondate; } - $month = date("%m", $datetimeprev); - $year = date("%Y", $datetimeprev); + $month = dol_print_date("%m", $datetimeprev, 'gmt'); + $year = dol_print_date("%Y", $datetimeprev, 'gmt'); $this->invoice_in_error = array(); $this->thirdparty_in_error = array(); From 744d1b0218f3fc318f51d4bdfaba0644fb67a619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 21 Sep 2022 21:52:39 +0200 Subject: [PATCH 3/5] Update bonprelevement.class.php --- htdocs/compta/prelevement/class/bonprelevement.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 464051926f2..a0beccfaff1 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1746,8 +1746,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, date("%d%m", $this->date_echeance)); - fputs($this->file, substr(date("%y", $this->date_echeance), 1)); + fputs($this->file, dol_print_date("%d%m", $this->date_echeance, 'gmt')); + fputs($this->file, substr(dol_print_date("%y", $this->date_echeance, 'gmt'), 1)); // Raison Sociale Destinataire C2 @@ -1972,8 +1972,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, date("%d%m", $this->date_echeance)); - fputs($this->file, substr(date("%y", $this->date_echeance), 1)); + fputs($this->file, dol_print_date("%d%m", $this->date_echeance, 'gmt')); + fputs($this->file, substr(dol_print_date("%y", $this->date_echeance, 'gmt'), 1)); // Raison Sociale C2 From 50c60c8f344d646cfa46d93a807781ee3ec86551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 26 Sep 2022 11:46:07 +0200 Subject: [PATCH 4/5] Update bonprelevement.class.php --- htdocs/compta/prelevement/class/bonprelevement.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index a0beccfaff1..c177baeead9 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -766,8 +766,8 @@ class BonPrelevement extends CommonObject $datetimeprev = $executiondate; } - $month = dol_print_date("%m", $datetimeprev, 'gmt'); - $year = dol_print_date("%Y", $datetimeprev, 'gmt'); + $month = dol_print_date($datetimeprev, "%m", 'gmt'); + $year = dol_print_date($datetimeprev, "%Y", 'gmt'); $this->invoice_in_error = array(); $this->thirdparty_in_error = array(); From 61844cd50fac4645cc1fb88e9b28d131f631af34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 26 Sep 2022 11:48:29 +0200 Subject: [PATCH 5/5] Update bonprelevement.class.php --- htdocs/compta/prelevement/class/bonprelevement.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index c177baeead9..ccf522c73c1 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1746,8 +1746,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, dol_print_date("%d%m", $this->date_echeance, 'gmt')); - fputs($this->file, substr(dol_print_date("%y", $this->date_echeance, 'gmt'), 1)); + fputs($this->file, dol_print_date($this->date_echeance, "%d%m", 'gmt')); + fputs($this->file, substr(dol_print_date($this->date_echeance, "%y", 'gmt'), 1)); // Raison Sociale Destinataire C2 @@ -1972,8 +1972,8 @@ class BonPrelevement extends CommonObject // Date d'echeance C1 fputs($this->file, " "); - fputs($this->file, dol_print_date("%d%m", $this->date_echeance, 'gmt')); - fputs($this->file, substr(dol_print_date("%y", $this->date_echeance, 'gmt'), 1)); + fputs($this->file, dol_print_date($this->date_echeance, "%d%m", 'gmt')); + fputs($this->file, substr(dol_print_date($this->date_echeance, "%y", 'gmt'), 1)); // Raison Sociale C2