From ced6cca89a07b58bfa80bb826c11b93efd0071c2 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Wed, 29 Jun 2022 21:19:47 +0200 Subject: [PATCH 1/4] update progress alone #190 --- htdocs/timesheet/class/TimesheetTask.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/timesheet/class/TimesheetTask.class.php b/htdocs/timesheet/class/TimesheetTask.class.php index 4fd0f4c..ef30e38 100644 --- a/htdocs/timesheet/class/TimesheetTask.class.php +++ b/htdocs/timesheet/class/TimesheetTask.class.php @@ -1250,7 +1250,7 @@ public function postTaskTimeActual($timesheetPost, $userId, $Submitter, $token, + $_SESSION['timesheet'][$token]['timeSpendDeleted'] + $_SESSION['timesheet'][$token]['timeSpendCreated']) ; # update the time used on the task level - if ($nbUpdate > 0) { + if (($nbUpdate + $progressUpdate) > 0) { $this->updateTimeUsed(); if ($progressUpdate)$_SESSION['timesheet'][$token]['ProgressUpdate']++; } From d89f494ef9926de834859388dca7dab473a16e5c Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Wed, 29 Jun 2022 21:20:15 +0200 Subject: [PATCH 2/4] fix: save and next --- htdocs/timesheet/Timesheet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/timesheet/Timesheet.php b/htdocs/timesheet/Timesheet.php index 1a47b37..e7f25fe 100644 --- a/htdocs/timesheet/Timesheet.php +++ b/htdocs/timesheet/Timesheet.php @@ -50,7 +50,7 @@ $postUserId = GETPOST('userid', 'int'); $submitted = GETPOST('submit', 'alpha'); $submitted_next = GETPOST('submit_next', 'alpha'); -$save_next = GETPOST('save_next', 'alpha'); +$saved_next = GETPOST('save_next', 'alpha'); $tsUserId = GETPOST('tsUserId', 'int'); $admin = $user->admin || $user->rights->timesheet->timesheet->admin; From e2008ee1de4a1689eb5a2d764cd37c85770c4a70 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Wed, 29 Jun 2022 21:45:55 +0200 Subject: [PATCH 3/4] fix: calcualte total lines --- htdocs/timesheet/core/js/timesheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/timesheet/core/js/timesheet.js b/htdocs/timesheet/core/js/timesheet.js index 3959837..9287b2a 100644 --- a/htdocs/timesheet/core/js/timesheet.js +++ b/htdocs/timesheet/core/js/timesheet.js @@ -121,7 +121,7 @@ function updateAll(){ TotalList[i].innerHTML = minutesToHTML(total); } } - //updateAllLinesTotal(); + updateAllLinesTotal(); } From 15c5fa2d43cd838ae5ff34ce253ef1de275489d0 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Wed, 29 Jun 2022 22:08:41 +0200 Subject: [PATCH 4/4] rev 4.5.4 --- htdocs/timesheet/ChangeLog.md | 5 +++++ htdocs/timesheet/core/modules/modtimesheet.class.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/timesheet/ChangeLog.md b/htdocs/timesheet/ChangeLog.md index ef289ca..1550a97 100644 --- a/htdocs/timesheet/ChangeLog.md +++ b/htdocs/timesheet/ChangeLog.md @@ -1,4 +1,9 @@ # dolibarr_project_timesheet changelog +4.5.4 +- fix: save and next +- fix: update progress only #190 +- fix: calcualte total lines + 4.5.3 - better adaptative header size in PDF diff --git a/htdocs/timesheet/core/modules/modtimesheet.class.php b/htdocs/timesheet/core/modules/modtimesheet.class.php index c66aee6..3d79c35 100644 --- a/htdocs/timesheet/core/modules/modtimesheet.class.php +++ b/htdocs/timesheet/core/modules/modtimesheet.class.php @@ -54,7 +54,7 @@ public function __construct($db) $this->editor_name = 'Patrick Delcroix'; $this->editor_url = 'https://github.com/delcroip'; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = '4.5.3'; + $this->version = '4.5.4'; // Key used in llx_cons table to save module status enabled/disabled(where timesheet is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Where to store the module in setup page(0=common, 1=interface, 2=others, 3=very specific)