diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index 39b639110c5..9d958d5d7dd 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -447,7 +447,7 @@ if (GETPOST('action') == 'create')
print '
| '.$langs->trans("DateActionStart").' | ';
+ if (GETPOST("afaire") == 1) $html->select_date($actioncomm->datep,'ap',1,1,0,"action",1,1);
+ else if (GETPOST("afaire") == 2) $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1);
+ else $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1);
+ print ' |
';
+ // Date end
+ print '| '.$langs->trans("DateActionEnd").' | ';
+ if (GETPOST("afaire") == 1) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
+ else if (GETPOST("afaire") == 2) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
+ else $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
+ print ' |
';
+
+ // Avancement
+ print '';
-
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/',GETPOST("datep"),$reg))
{
$actioncomm->datep=dol_mktime(0,0,0,$reg[2],$reg[3],$reg[1]);
}
- // Date start
- print '| '.$langs->trans("DateActionStart").' | ';
- if (GETPOST("afaire") == 1) $html->select_date($actioncomm->datep,'ap',1,1,0,"action",1,1);
- else if (GETPOST("afaire") == 2) $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1);
- else $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1);
- print ' |
';
- // Date end
- print '| '.$langs->trans("DateActionEnd").' | ';
- if (GETPOST("afaire") == 1) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
- else if (GETPOST("afaire") == 2) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
- else $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1);
- print ' |
';
-
- // Avancement
- print '| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
- print '';
- $percent=0;
- if (GETPOST('percentage'))
- {
- $percent=GETPOST('percentage');
- }
- else
- {
- if (GETPOST("afaire") == 1) $percent=0;
- if (GETPOST("afaire") == 2) $percent=100;
- }
- print $htmlactions->form_select_status_action('formaction',$percent,1);
- print ' |
';
-
// Priority
print '| '.$langs->trans("Priority").' | ';
print 'priority).'" size="5">';
@@ -659,8 +659,48 @@ if ($id)
// Location
print ' |
| '.$langs->trans("Location").' | |
';
+ // Date start
+ print '| '.$langs->trans("DateActionStart").' | ';
+ if (GETPOST("afaire") == 1) $html->select_date($act->datep,'ap',1,1,0,"action",1,1);
+ else if (GETPOST("afaire") == 2) $html->select_date($act->datep,'ap',1,1,1,"action",1,1);
+ else $html->select_date($act->datep,'ap',1,1,1,"action",1,1);
+ print ' |
';
+ // Date end
+ print '| '.$langs->trans("DateActionEnd").' | ';
+ if (GETPOST("afaire") == 1) $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
+ else if (GETPOST("afaire") == 2) $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
+ else $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
+ print ' |
';
+
+ // Status
+ print '| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
+ $percent=GETPOST("percentage")?GETPOST("percentage"):$act->percentage;
+ print $htmlactions->form_select_status_action('formaction',$percent,1);
+ print ' |
';
+
+ print '
';
-
- // Date start
- print '| '.$langs->trans("DateActionStart").' | ';
- if (GETPOST("afaire") == 1) $html->select_date($act->datep,'ap',1,1,0,"action",1,1);
- else if (GETPOST("afaire") == 2) $html->select_date($act->datep,'ap',1,1,1,"action",1,1);
- else $html->select_date($act->datep,'ap',1,1,1,"action",1,1);
- print ' |
';
- // Date end
- print '| '.$langs->trans("DateActionEnd").' | ';
- if (GETPOST("afaire") == 1) $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
- else if (GETPOST("afaire") == 2) $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
- else $html->select_date($act->datef,'p2',1,1,1,"action",1,1);
- print ' |
';
-
- // Status
- print '| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
- $percent=GETPOST("percentage")?GETPOST("percentage"):$act->percentage;
- print $htmlactions->form_select_status_action('formaction',$percent,1);
- print ' |
';
-
// Priority
print '| '.$langs->trans("Priority").' | ';
print '';
@@ -770,8 +772,45 @@ if ($id)
// Location
print ' |
| '.$langs->trans("Location").' | '.$act->location.' |
';
+ // Date debut
+ print '| '.$langs->trans("DateActionStart").' | ';
+ print dol_print_date($act->datep,'dayhour');
+ if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
+ print ' |
';
+
+ // Date fin
+ print '| '.$langs->trans("DateActionEnd").' | ';
+ print dol_print_date($act->datef,'dayhour');
+ if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
+ print ' |
';
+
+ // Statut
+ print '| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
+ print $act->getLibStatut(4);
+ print ' |
';
+
+ print '