From 1766952a8499919a1275b0214f6ebda8dfc812e2 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 6 Mar 2023 12:54:43 +0100 Subject: =?UTF-8?q?Config.ini=20renseigner=20''=20=3D=20valeur=20par=20d?= =?UTF-8?q?=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/Prestations.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/model/Prestations.php') diff --git a/src/model/Prestations.php b/src/model/Prestations.php index 2011dbe..d246a3d 100644 --- a/src/model/Prestations.php +++ b/src/model/Prestations.php @@ -93,6 +93,7 @@ class Prestations extends Model public function makeCodePresta(Dates $Date, string $code_client) { // on récupère un tableau contenant toutes les prestations d'un client tous types confondus (devis, facture, cesu, location, enregistrement sans vente) + // inconvénient: il peut y avoir plusieurs prestations avec le même numéro au compteur, à améliorer $combientieme_fois = count($this->find(['ID_client' => $this->ID_client])) + 1; $array_code = [$Date->getYear(), $Date->getMonth(), $Date->getDay(), $code_client, $this->type_presta, $combientieme_fois]; -- cgit v1.2.3