Commit cccac752e520faa4e5d396d778c3deb58d2b9c50
1 parent
b2b6828b
Exists in
master
and in
3 other branches
Version: 2.4.6.8
Bugfixes calcul frequence (suivi) Version majeure en cours (2.4): https://projects.irap.omp.eu/versions/107 ROADMAP: https://projects.irap.omp.eu/projects/labinvent/roadmap
Showing
5 changed files
with
47 additions
and
27 deletions
Show diff stats
README-LABINVENT.md
... | ... | @@ -51,9 +51,9 @@ Logiciel testé et validé sur les configurations suivantes : |
51 | 51 | VERSION ACTUELLE |
52 | 52 | |
53 | 53 | Date: 23/06/2016 |
54 | -Version: 2.4.6.7 | |
54 | +Version: 2.4.6.8 | |
55 | 55 | |
56 | -Bugfixes + update script IAS | |
56 | +Bugfixes calcul frequence (suivi) | |
57 | 57 | |
58 | 58 | Version majeure en cours (2.4): https://projects.irap.omp.eu/versions/107 |
59 | 59 | ... | ... |
database/labinvent_2.1_12-05-16.sql
... | ... | @@ -325,9 +325,9 @@ CREATE TABLE IF NOT EXISTS `configurations` ( |
325 | 325 | `host_ldap` text DEFAULT NULL, |
326 | 326 | `port_ldap` varchar(10) DEFAULT NULL, |
327 | 327 | `authentificationType_ldap` varchar(30) DEFAULT 'xxx', |
328 | - `baseDn_ldap` varchar(30) DEFAULT NULL, | |
328 | + `baseDn_ldap` varchar(300) DEFAULT null, | |
329 | 329 | `filter_ldap` varchar(30) DEFAULT NULL, |
330 | - `labName` varchar(30) DEFAULT NULL, | |
330 | + `labName` varchar(200) DEFAULT 'NOM COMPLET', | |
331 | 331 | `labNameShort` varchar(20) DEFAULT NULL, |
332 | 332 | `labPresent` varchar(10) DEFAULT NULL, |
333 | 333 | `labUmr` varchar(30) DEFAULT NULL, | ... | ... |
src/Controller/SuivisController.php
... | ... | @@ -257,25 +257,49 @@ class SuivisController extends AppController |
257 | 257 | } |
258 | 258 | |
259 | 259 | // called from Javascript (Ajax) |
260 | - public function getNextDate($date, $frequence, $typeFrequence) { | |
261 | - //str_replace("/", "-", $date); | |
262 | - $date_next = date_create_from_format('d-m-Y', $date); | |
263 | - | |
264 | - switch($typeFrequence) { | |
265 | - case "Jours": | |
266 | - date_add($date_next, date_interval_create_from_date_string($frequence.' days')); | |
267 | - break; | |
268 | - case "Semaines": | |
269 | - date_add($date_next, date_interval_create_from_date_string((7*$frequence).' days')); | |
270 | - break; | |
271 | - case "Mois": | |
272 | - date_add($date_next, date_interval_create_from_date_string($frequence.' months')); | |
273 | - break; | |
274 | - case "Ans": | |
275 | - date_add($date_next, date_interval_create_from_date_string($frequence.' years')); | |
276 | - break; | |
277 | - } | |
260 | + public function getNextDate($dateORjour, $frequenceORmois, $typeFrequenceORannee, $frequence, $typeFrequence) { | |
278 | 261 | |
262 | + if(isset($frequence) && isset($typeFrequence)) { | |
263 | + $date = $dateORjour.'-'.$frequenceORmois.'-'.$typeFrequenceORannee; | |
264 | + | |
265 | + $date_next = date_create_from_format('d-m-Y', $date); | |
266 | + | |
267 | + switch($typeFrequence) { | |
268 | + case "Jours": | |
269 | + date_add($date_next, date_interval_create_from_date_string($frequence.' days')); | |
270 | + break; | |
271 | + case "Semaines": | |
272 | + date_add($date_next, date_interval_create_from_date_string((7*$frequence).' days')); | |
273 | + break; | |
274 | + case "Mois": | |
275 | + date_add($date_next, date_interval_create_from_date_string($frequence.' months')); | |
276 | + break; | |
277 | + case "Ans": | |
278 | + date_add($date_next, date_interval_create_from_date_string($frequence.' years')); | |
279 | + break; | |
280 | + } | |
281 | + } else { | |
282 | + $date = $dateORjour; | |
283 | + | |
284 | + $date_next = date_create_from_format('d-m-Y', $date); | |
285 | + | |
286 | + switch($typeFrequenceORannee) { | |
287 | + case "Jours": | |
288 | + date_add($date_next, date_interval_create_from_date_string($frequenceORmois.' days')); | |
289 | + break; | |
290 | + case "Semaines": | |
291 | + date_add($date_next, date_interval_create_from_date_string((7*$frequenceORmois).' days')); | |
292 | + break; | |
293 | + case "Mois": | |
294 | + date_add($date_next, date_interval_create_from_date_string($frequenceORmois.' months')); | |
295 | + break; | |
296 | + case "Ans": | |
297 | + date_add($date_next, date_interval_create_from_date_string($frequenceORmois.' years')); | |
298 | + break; | |
299 | + } | |
300 | + } | |
301 | + | |
302 | + | |
279 | 303 | $this->set ('date', date_format($date_next, 'd-m-Y')); |
280 | 304 | |
281 | 305 | ... | ... |
src/Template/Layout/default.ctp
... | ... | @@ -94,7 +94,7 @@ $cakeDescription = 'Labinvent 2'; |
94 | 94 | </i></td> |
95 | 95 | <td id="version"> |
96 | 96 | <!-- VERSION M.m.f.b (version (M)ajeure, version (m)ineure, numero de nouvelle (f)onctionnalite, numero de (b)ugfix) --> |
97 | - <font color="black">VERSION 2.4.6.7 (23/06/2016)</font> | |
97 | + <font color="black">VERSION 2.4.6.8 (23/06/2016)</font> | |
98 | 98 | </td> |
99 | 99 | </tr> |
100 | 100 | </table> | ... | ... |
src/Template/Suivis/view.ctp
... | ... | @@ -35,10 +35,6 @@ |
35 | 35 | $displayElement(__('Date Prochaine Intervention'), h($suivi->date_prochain_controle)); |
36 | 36 | $displayElement(__('Type d\'intervention'), $suivi->has('type_suivi') ? h($suivi->type_suivi->nom) : ''); |
37 | 37 | |
38 | - if($suivi->type_suivi_id == 9) { | |
39 | - $displayElement(__('Panne résolue'), $resolu); | |
40 | - } | |
41 | - | |
42 | 38 | $displayElement(__('Prestataire'), h($suivi->organisme)); |
43 | 39 | $displayElement(__('Fréquence'), h($suivi->frequence).' '.h($suivi->type_frequence)); |
44 | 40 | ... | ... |