From ffa88b803ffd4636b626b6631d1a79b9122597cb Mon Sep 17 00:00:00 2001
From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com>
Date: Fri, 19 Nov 2021 16:03:41 +0100
Subject: [PATCH] FIX: project timesheet by week: cleanup unused code
---
htdocs/projet/activity/perweek.php | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index 267106c5721..2e1926c8847 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -98,7 +98,6 @@ $next_day = $next['day'];
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year);
$firstdaytoshowgmt = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'gmt');
-$lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd');
if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id)
{
@@ -522,14 +521,6 @@ for ($idw = 0; $idw < 7; $idw++)
{
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
$dayinloopfromfirstdaytoshowgmt = dol_time_plus_duree($firstdaytoshowgmt, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
- $dayinloop = dol_time_plus_duree($startday, $idw, 'd');
-
- // Useless because $dayinloopwithouthours should be same than $dayinloopfromfirstdaytoshow
- //$tmparray = dol_getdate($dayinloop);
- //$dayinloopwithouthours=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
- //print dol_print_date($dayinloop, 'dayhour').' ';
- //print dol_print_date($dayinloopwithouthours, 'dayhour').' ';
- //print dol_print_date($dayinloopfromfirstdaytoshow, 'dayhour').'
';
$statusofholidaytocheck = Holiday::STATUS_APPROVED;
@@ -539,7 +530,6 @@ for ($idw = 0; $idw < 7; $idw++)
$test = num_public_holiday($dayinloopfromfirstdaytoshowgmt, $dayinloopfromfirstdaytoshowgmt + 86400, $mysoc->country_code);
if ($test) $isavailable[$dayinloopfromfirstdaytoshow] = array('morning'=>false, 'afternoon'=>false, 'morning_reason'=>'public_holiday', 'afternoon_reason'=>'public_holiday');
}
-//var_dump($isavailable);
@@ -659,7 +649,6 @@ print '