Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project: make tasks accept a time #1507

Merged
merged 2 commits into from
Mar 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions htdocs/core/lib/project.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t

// Date start
print '<td align="center">';
print dol_print_date($lines[$i]->date_start,'day');
print dol_print_date($lines[$i]->date_start,'dayhour');
print '</td>';

// Date end
print '<td align="center">';
print dol_print_date($lines[$i]->date_end,'day');
print dol_print_date($lines[$i]->date_end,'dayhour');
print '</td>';

// Planned Workload (in working hours)
Expand Down Expand Up @@ -480,12 +480,12 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr

// Date start
print '<td align="center">';
print dol_print_date($lines[$i]->date_start,'day');
print dol_print_date($lines[$i]->date_start,'dayhour');
print '</td>';

// Date end
print '<td align="center">';
print dol_print_date($lines[$i]->date_end,'day');
print dol_print_date($lines[$i]->date_end,'dayhour');
print '</td>';

// Planned Workload
Expand Down
12 changes: 6 additions & 6 deletions htdocs/projet/tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
{
$error=0;

$date_start = dol_mktime(0,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
$date_end = dol_mktime(0,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
$date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyeassskr'],'user');
$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');

if (empty($_POST["cancel"]))
{
Expand Down Expand Up @@ -234,12 +234,12 @@

// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print dol_print_date($object->date_start,'day');
print dol_print_date($object->date_start,'dayhour');
print '</td></tr>';

// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print dol_print_date($object->date_end,'day');
print dol_print_date($object->date_end,'dayhour');
print '</td></tr>';

// Other options
Expand Down Expand Up @@ -304,12 +304,12 @@

// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print $form->select_date(($date_start?$date_start:''),'dateo',0,0,0,'',1,1);
print $form->select_date(($date_start?$date_start:''),'dateo',1,1,0,'',1,1);
print '</td></tr>';

// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print $form->select_date(($date_end?$date_end:-1),'datee',0,0,0,'',1,1);
print $form->select_date(($date_end?$date_end:-1),'datee',1,1,0,'',1,1);
print '</td></tr>';

// planned workload
Expand Down
12 changes: 6 additions & 6 deletions htdocs/projet/tasks/task.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
$object->description = $_POST['description'];
$object->fk_task_parent = $task_parent;
$object->planned_workload = $planned_workload;
$object->date_start = dol_mktime(0,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
$object->date_end = dol_mktime(0,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
$object->date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user');
$object->date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
$object->progress = $_POST['progress'];

// Fill array 'array_options' with data from add form
Expand Down Expand Up @@ -326,12 +326,12 @@

// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
print $form->select_date($object->date_start,'dateo');
print $form->select_date($object->date_start,'dateo',1,1);
print '</td></tr>';

// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
print $form->select_date($object->date_end?$object->date_end:-1,'datee');
print $form->select_date($object->date_end?$object->date_end:-1,'datee',1,1);
print '</td></tr>';

// Planned workload
Expand Down Expand Up @@ -415,12 +415,12 @@

// Date start
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="3">';
print dol_print_date($object->date_start,'day');
print dol_print_date($object->date_start,'dayhour');
print '</td></tr>';

// Date end
print '<tr><td>'.$langs->trans("DateEnd").'</td><td colspan="3">';
print dol_print_date($object->date_end,'day');
print dol_print_date($object->date_end,'dayhour');
print '</td></tr>';

// Planned workload
Expand Down