Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip authored Jul 16, 2023
2 parents 2147cad + e60c667 commit c3e34ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion htdocs/timesheet/class/TimesheetTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ public function getTimesheetLine($headers, $tsUserId = 0, $blockOveride = 0, $ho
$isOpenStatus = true && $isOpenStatus;
}


/*
* info section
*/
Expand Down Expand Up @@ -1352,7 +1353,9 @@ public function saveTaskTime($Submitter, $duration, $daynote, $dayKey, $addmode
}
if ($item['id']>0) {
$this->timespent_id = $item['id'];

$this->timespent_old_duration = $item['duration'];

if ($addmode) {
if (!empty($daynote)){
$this->timespent_note .= "\n".$daynote;
Expand All @@ -1371,9 +1374,10 @@ public function saveTaskTime($Submitter, $duration, $daynote, $dayKey, $addmode
}else {
$resArray['updateError']++;
}

} else if($this->timespent_duration == 0 && empty($daynote) ) {


dol_syslog(__METHOD__." taskTimeDelete", LOG_DEBUG);
if ($this->delTimeSpent($Submitter, 0) >= 0) {
$resArray['timeSpendDeleted']++;
Expand Down
1 change: 1 addition & 0 deletions htdocs/timesheet/core/modules/modtimesheet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function __construct($db)

$this->version = '4.6.7';


// 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)
Expand Down

0 comments on commit c3e34ad

Please sign in to comment.