mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #27258 from defrance/patch-313
FIX : php 8.1 depreciated strftime
This commit is contained in:
commit
83addfcef0
|
|
@ -151,7 +151,7 @@ class mod_asset_standard extends ModeleNumRefAsset
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class mod_bom_standard extends ModeleNumRefBoms
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_bordereau;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class mod_contract_serpis extends ModelNumRefContracts
|
|||
}
|
||||
|
||||
$date = $contract->date_contrat;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder
|
|||
if (empty($date)) {
|
||||
$date = dol_now();
|
||||
}
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
|||
}
|
||||
|
||||
$date = $shipment->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||
return 0;
|
||||
}
|
||||
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
return $ref;
|
||||
} elseif ($mode == 'next') {
|
||||
$date = $invoice->date; // This is invoice date (not creation date)
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class mod_pacific extends ModeleNumRefFicheinter
|
|||
|
||||
//$date=time();
|
||||
$date = $object->datec;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -151,7 +151,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
|||
}
|
||||
|
||||
$date = $holiday->date_debut;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
|
|||
|
||||
//$date=time();
|
||||
$date = $object->datepaye;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -150,9 +150,7 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
}
|
||||
|
||||
$date = empty($object->date_c) ? dol_now() : $object->date_c;
|
||||
|
||||
//$yymm = strftime("%y%m",time());
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||
}
|
||||
|
||||
$date = time();
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class mod_reception_beryl extends ModelNumRefReception
|
|||
}
|
||||
|
||||
$date = time();
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -151,7 +151,7 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1;
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices
|
|||
return $ref;
|
||||
} elseif ($mode == 'next') {
|
||||
$date = $object->date; // This is invoice date (not creation date)
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
|||
if (empty($date)) {
|
||||
$date = $object->date; // Creation date is order date for suppliers orders
|
||||
}
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
|
|||
|
||||
//$date=time();
|
||||
$date = $object->datepaye;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal
|
|||
}
|
||||
|
||||
$date = time();
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
return $ref;
|
||||
} elseif ($mode == 'next') {
|
||||
$date = $invoice->date; // This is invoice date (not creation date)
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_partnership_standard extends ModeleNumRefPartnership
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi
|
|||
|
||||
//$date=time();
|
||||
$date = $object->date_creation;
|
||||
$yymm = strftime("%y%m", $date);
|
||||
$yymm = dol_print_date($date, "%y%m");
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) {
|
||||
$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user