diff options
Diffstat (limited to 'src/model/Prestations.php')
-rw-r--r-- | src/model/Prestations.php | 1 |
1 files changed, 1 insertions, 0 deletions
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 | |||
93 | public function makeCodePresta(Dates $Date, string $code_client) | 93 | public function makeCodePresta(Dates $Date, string $code_client) |
94 | { | 94 | { |
95 | // on récupère un tableau contenant toutes les prestations d'un client tous types confondus (devis, facture, cesu, location, enregistrement sans vente) | 95 | // on récupère un tableau contenant toutes les prestations d'un client tous types confondus (devis, facture, cesu, location, enregistrement sans vente) |
96 | // inconvénient: il peut y avoir plusieurs prestations avec le même numéro au compteur, à améliorer | ||
96 | $combientieme_fois = count($this->find(['ID_client' => $this->ID_client])) + 1; | 97 | $combientieme_fois = count($this->find(['ID_client' => $this->ID_client])) + 1; |
97 | 98 | ||
98 | $array_code = [$Date->getYear(), $Date->getMonth(), $Date->getDay(), $code_client, $this->type_presta, $combientieme_fois]; | 99 | $array_code = [$Date->getYear(), $Date->getMonth(), $Date->getDay(), $code_client, $this->type_presta, $combientieme_fois]; |