diff options
Diffstat (limited to 'src/model/Prestations.php')
| -rw-r--r-- | src/model/Prestations.php | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/model/Prestations.php b/src/model/Prestations.php index 94dd805..22865df 100644 --- a/src/model/Prestations.php +++ b/src/model/Prestations.php | |||
| @@ -33,7 +33,7 @@ class Prestations extends Model | |||
| 33 | { | 33 | { |
| 34 | return $this->code_presta; | 34 | return $this->code_presta; |
| 35 | } | 35 | } |
| 36 | public function getDate(): int | 36 | public function getDate(): int // timestamp unix |
| 37 | { | 37 | { |
| 38 | return $this->date; | 38 | return $this->date; |
| 39 | } | 39 | } |
| @@ -48,7 +48,7 @@ class Prestations extends Model | |||
| 48 | public function setIDClient(int $value) | 48 | public function setIDClient(int $value) |
| 49 | { | 49 | { |
| 50 | $this->ID_client = $value; | 50 | $this->ID_client = $value; |
| 51 | return($this); | 51 | return $this; |
| 52 | } | 52 | } |
| 53 | //~ public function setCombientiemeFois(int $value) | 53 | //~ public function setCombientiemeFois(int $value) |
| 54 | //~ { | 54 | //~ { |
| @@ -58,37 +58,29 @@ class Prestations extends Model | |||
| 58 | public function setCodePresta(string $value) | 58 | public function setCodePresta(string $value) |
| 59 | { | 59 | { |
| 60 | $this->code_presta = $value; | 60 | $this->code_presta = $value; |
| 61 | return($this); | 61 | return $this; |
| 62 | } | 62 | } |
| 63 | public function setDate(int $value) | 63 | public function setDate(int $value) |
| 64 | { | 64 | { |
| 65 | $this->date = $value; | 65 | $this->date = $value; |
| 66 | return($this); | 66 | return $this; |
| 67 | } | 67 | } |
| 68 | public function setTypePresta(string $value) | 68 | public function setTypePresta(string $value) |
| 69 | { | 69 | { |
| 70 | $this->type_presta = $value; | 70 | $this->type_presta = $value; |
| 71 | return($this); | 71 | return $this; |
| 72 | } | 72 | } |
| 73 | public function setModePaiement(string $value) | 73 | public function setModePaiement(string $value) |
| 74 | { | 74 | { |
| 75 | $this->mode_paiement = $value; | 75 | $this->mode_paiement = $value; |
| 76 | return($this); | 76 | return $this; |
| 77 | } | 77 | } |
| 78 | public function setCommentaires(string $value) | 78 | public function setCommentaires(string $value) |
| 79 | { | 79 | { |
| 80 | $this->commentaires = $value; | 80 | $this->commentaires = $value; |
| 81 | return($this); | 81 | return $this; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | //~ protected function combientiemeFois() | ||
| 85 | //~ { | ||
| 86 | //~ // on récupère un tableau contenant toutes les prestations d'un client tous types confondus (devis, facture, cesu, location, enregistrement sans vente) | ||
| 87 | //~ $array = $this->find(['ID_client' => $this->ID_client]); | ||
| 88 | //~ //$this->combientieme_fois = count($array) + 1; | ||
| 89 | //~ return count($array) + 1; | ||
| 90 | //~ } | ||
| 91 | |||
| 92 | // code client = année-mois-jour-codeclient-combientièmefois | 84 | // code client = année-mois-jour-codeclient-combientièmefois |
| 93 | public function makeCodePresta(Dates $Date, string $code_client) | 85 | public function makeCodePresta(Dates $Date, string $code_client) |
| 94 | { | 86 | { |
