Update bonprelevement.class.php

This commit is contained in:
Frédéric FRANCE 2022-09-21 08:44:15 +02:00 committed by GitHub
parent edef39bed9
commit 9f7c17333b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,9 +22,9 @@
*/ */
/** /**
* \file htdocs/compta/prelevement/class/bonprelevement.class.php * \file htdocs/compta/prelevement/class/bonprelevement.class.php
* \ingroup prelevement * \ingroup prelevement
* \brief File of withdrawal receipts class * \brief File of withdrawal receipts class
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
@ -760,14 +760,14 @@ class BonPrelevement extends CommonObject
$error = 0; $error = 0;
$datetimeprev = time(); $datetimeprev = dol_now('gmt');
//Choice the date of the execution direct debit //Choice the date of the execution direct debit
if (!empty($executiondate)) { if (!empty($executiondate)) {
$datetimeprev = $executiondate; $datetimeprev = $executiondate;
} }
$month = date("%m", $datetimeprev); $month = dol_print_date("%m", $datetimeprev, 'gmt');
$year = date("%Y", $datetimeprev); $year = dol_print_date("%Y", $datetimeprev, 'gmt');
$this->invoice_in_error = array(); $this->invoice_in_error = array();
$this->thirdparty_in_error = array(); $this->thirdparty_in_error = array();